Merge lp:~parthm/bzr/571467-ci-show-diff-short-opt-p into lp:bzr

Proposed by Parth Malwankar
Status: Merged
Merged at revision: not available
Proposed branch: lp:~parthm/bzr/571467-ci-show-diff-short-opt-p
Merge into: lp:bzr
Diff against target: 12 lines (+1/-1)
1 file modified
bzrlib/builtins.py (+1/-1)
To merge this branch: bzr merge lp:~parthm/bzr/571467-ci-show-diff-short-opt-p
Reviewer Review Type Date Requested Status
Andrew Bennetts Approve
Review via email: mp+24411@code.launchpad.net

Commit message

Define -p (for patch) as the short form of --show-diff in 'bzr commit'

Description of the change

=== Fixed Bug #571467 ===
Adds short option -p as short_name for --show-diff for commit command.

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

I had to read the bug to figure out why "-p" (it's short for "patch"). It'd be nice to explain that somewhere, but I don't know where would be appropriate. Anyway, this seems fine.

review: Approve
Revision history for this message
Andrew Bennetts (spiv) wrote :

Hmm, new option names really deserve a NEWS entry. I'll add one and submit this.

Revision history for this message
Parth Malwankar (parthm) wrote :

> I had to read the bug to figure out why "-p" (it's short for "patch"). It'd
> be nice to explain that somewhere, but I don't know where would be
> appropriate. Anyway, this seems fine.

bzr log is somewhat clear on this:
-p, --show-diff Show changes made in each revision as a patch.

For bzr ci its:
-p, --show-diff When no message is supplied, show the diff along with
                      the status summary in the message editor.

John suggested for another proposal[1] that --null can be pulled into
bzrlib.option.
Maybe we should do something similar for --show-diff/-p?
-p, --show-diff Show changes made in the revision as a patch.

The help message won't be as specific but then the options go together.

[1] https://code.launchpad.net/~parthm/bzr/181124-ls-short-opts/+merge/24414

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 2010-04-28 10:33:44 +0000
3+++ bzrlib/builtins.py 2010-04-29 12:16:21 +0000
4@@ -3073,7 +3073,7 @@
5 "the master branch until a normal commit "
6 "is performed."
7 ),
8- Option('show-diff',
9+ Option('show-diff', short_name='p',
10 help='When no message is supplied, show the diff along'
11 ' with the status summary in the message editor.'),
12 ]