Merge lp:~federicoculloca/bzr/bug317357 into lp:bzr

Proposed by Federico Culloca
Status: Merged
Merged at revision: 5768
Proposed branch: lp:~federicoculloca/bzr/bug317357
Merge into: lp:bzr
Diff against target: 26 lines (+5/-2)
2 files modified
bzrlib/builtins.py (+4/-1)
bzrlib/tests/test_trace.py (+1/-1)
To merge this branch: bzr merge lp:~federicoculloca/bzr/bug317357
Reviewer Review Type Date Requested Status
John A Meinel Needs Fixing
Andrew Bennetts Pending
Review via email: mp+56605@code.launchpad.net

This proposal supersedes a proposal from 2011-04-06.

Description of the change

Corrected what was unintentionally changed.

To post a comment you must log in.
Revision history for this message
Andrew Bennetts (spiv) wrote : Posted in a previous version of this proposal

Thanks for the patch.

Unfortunately, this doesn't appear to fix the linked bug, which is that “aborting commit write group: PointlessCommit(No changes to commit)” is shown to the user, rather than just the following line (“bzr: ERROR: no changes to commit…”)

You're probably right that it's worth suggesting “bzr add” to the user, not just “bzr commit --unchanged”. You have a typo in your suggested text, and I think it can be more concise and clearer by directly saying “bzr add”. Here's my idea:

“Please 'bzr add' the files you want to commit, or use --unchanged to force an empty commit.”

What do you think?

review: Needs Fixing
Revision history for this message
Federico Culloca (federicoculloca) wrote : Posted in a previous version of this proposal

It's ok. After re-reading the bug I realized I was mistaken.

If it's ok with you, later this evening I'll re-submit the file with your suggestion.

Can you merge it even if it doesn't solve the bug?

Revision history for this message
Andrew Bennetts (spiv) wrote : Posted in a previous version of this proposal

> Can you merge it even if it doesn't solve the bug?

Sure, if it's an improvement I'm happy to merge it.

Revision history for this message
Martin Pool (mbp) wrote : Posted in a previous version of this proposal

Why the change to test_trace?

Martin

Revision history for this message
Martin Pool (mbp) wrote : Posted in a previous version of this proposal

Thanks for tackling this, though.

Revision history for this message
John A Meinel (jameinel) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 4/6/2011 6:13 PM, Federico Culloca wrote:
> Federico Culloca has proposed merging lp:~djthrottle/bzr/bug317357 into lp:bzr.
>
> Requested reviews:
> Andrew Bennetts (spiv)
> Related bugs:
> Bug #317357 in Bazaar: "pointless commit message now ugly"
> https://bugs.launchpad.net/bzr/+bug/317357
>
> For more details, see:
> https://code.launchpad.net/~djthrottle/bzr/bug317357/+merge/56605
>
> Corrected what was unintentionally changed.

=== modified file 'bzrlib/tests/test_trace.py'
- --- bzrlib/tests/test_trace.py 2011-01-10 22:20:12 +0000
+++ bzrlib/tests/test_trace.py 2011-04-06 16:13:39 +0000
@@ -44,7 +44,7 @@
 def _format_exception():
     """Format an exception as it would normally be displayed to the user"""
     buf = StringIO()
- - report_exception(sys.exc_info(), buf)
+ report_exception(sys.exc_info, buf)
     return buf.getvalue()

You didn't quite get that one right.

John
=:->

 review: needsfixing

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk2dnMgACgkQJdeBCYSNAAOCPQCgt47PxQVKIhOqBOkCn8QSUKwq
McEAn0T6FFNi4Nc0eCOjEoTfjkj0YTol
=/OwM
-----END PGP SIGNATURE-----

review: Needs Fixing
Revision history for this message
John A Meinel (jameinel) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 4/7/2011 1:16 PM, John A Meinel wrote:
> Review: Needs Fixing
> On 4/6/2011 6:13 PM, Federico Culloca wrote:
>> Federico Culloca has proposed merging lp:~djthrottle/bzr/bug317357 into lp:bzr.
>
>> Requested reviews:
>> Andrew Bennetts (spiv)
>> Related bugs:
>> Bug #317357 in Bazaar: "pointless commit message now ugly"
>> https://bugs.launchpad.net/bzr/+bug/317357
>
>> For more details, see:
>> https://code.launchpad.net/~djthrottle/bzr/bug317357/+merge/56605
>
>> Corrected what was unintentionally changed.
>
> === modified file 'bzrlib/tests/test_trace.py'
> --- bzrlib/tests/test_trace.py 2011-01-10 22:20:12 +0000
> +++ bzrlib/tests/test_trace.py 2011-04-06 16:13:39 +0000
> @@ -44,7 +44,7 @@
> def _format_exception():
> """Format an exception as it would normally be displayed to the user"""
> buf = StringIO()
> - report_exception(sys.exc_info(), buf)
> + report_exception(sys.exc_info, buf)
> return buf.getvalue()
>
>
>
> You didn't quite get that one right.
>

To clarify, I'll go ahead and merge your code and clean it up on my end.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk2dnkkACgkQJdeBCYSNAAOiuACfboi9BxPB/QCEibtJrVCsqi9T
fs4An1HhNFLOwmHE0xCAPC13YgpPFwCN
=5Ye4
-----END PGP SIGNATURE-----

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bzrlib/builtins.py'
2--- bzrlib/builtins.py 2011-04-01 08:00:04 +0000
3+++ bzrlib/builtins.py 2011-04-06 16:13:39 +0000
4@@ -3273,7 +3273,10 @@
5 exclude=tree.safe_relpath_files(exclude))
6 except PointlessCommit:
7 raise errors.BzrCommandError("No changes to commit."
8- " Use --unchanged to commit anyhow.")
9+ "Please 'bzr add' the files "
10+ "you want to commit, or use "
11+ "--unchanged to force "
12+ "an empty commit.")
13 except ConflictsInTree:
14 raise errors.BzrCommandError('Conflicts detected in working '
15 'tree. Use "bzr conflicts" to list, "bzr resolve FILE" to'
16
17=== modified file 'bzrlib/tests/test_trace.py'
18--- bzrlib/tests/test_trace.py 2011-01-10 22:20:12 +0000
19+++ bzrlib/tests/test_trace.py 2011-04-06 16:13:39 +0000
20@@ -44,7 +44,7 @@
21 def _format_exception():
22 """Format an exception as it would normally be displayed to the user"""
23 buf = StringIO()
24- report_exception(sys.exc_info(), buf)
25+ report_exception(sys.exc_info, buf)
26 return buf.getvalue()
27
28