Merge lp://staging/~parthm/bzr/403687-status-shows-shelves into lp://staging/bzr

Proposed by Parth Malwankar
Status: Rejected
Rejected by: Parth Malwankar
Proposed branch: lp://staging/~parthm/bzr/403687-status-shows-shelves
Merge into: lp://staging/bzr
Diff against target: 232 lines (+92/-18)
7 files modified
NEWS (+2/-0)
bzrlib/builtins.py (+16/-18)
bzrlib/help_topics/__init__.py (+1/-0)
bzrlib/shelf.py (+21/-0)
bzrlib/status.py (+10/-0)
bzrlib/tests/blackbox/test_status.py (+25/-0)
bzrlib/tests/test_shelf.py (+17/-0)
To merge this branch: bzr merge lp://staging/~parthm/bzr/403687-status-shows-shelves
Reviewer Review Type Date Requested Status
Vincent Ladeuil Needs Fixing
Review via email: mp+31182@code.staging.launchpad.net

Description of the change

=== Fixes bug #403687 ===
This patch updates the status command to list shelves if any. --short option shows shelves with 'S' in the second column. This patch doesn't do exactly what the bug describes i.e. display files with shelves. Instead it lists shelves with their ids. List of files can probably be looked at in the context of bug #330311.

Shelf listing function cmd_shelf.run_for_list is pulled out into the common location shelf.list_shelves which is used by cmd_shelf and status. list_shelves returns the shelves as a list of strings rather than directly displaying them.

Sample output:

[bzr-grep]% ~/src/bzr.dev/403687-st-shows-shelve/bzr st -S
 M INSTALL
? x
 S 1: <no message>

[bzr-grep]% ~/src/bzr.dev/403687-st-shows-shelve/bzr st
modified:
  INSTALL
unknown:
  x
shelves:
  1: <no message>

To post a comment you must log in.
5370. By Parth Malwankar

make imports in bzrlib.shelf lazy to pass test_import_tariff

5371. By Parth Malwankar

update status doc to mentioned 'shelved' as a state

5372. By Parth Malwankar

merged in trunk and resolved NEWS conflict.

Revision history for this message
Vincent Ladeuil (vila) wrote :

I agree with the comments on bug #403687, a single line in the output to mention the number
of shelves would better suit 'bzr status'.

A dedicated command 'bzr shelf-status' or 'bzr shelf --status' or something else
sounds more appropriate for a detailed output.

There are some compatibility issues to consider too here, some programs already parse the output
of status and adding new indicators can't be done lightly.

May be you should bring the subject to the mailing list so it can be discussed more broadly.

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

> I agree with the comments on bug #403687, a single line in the output to
> mention the number
> of shelves would better suit 'bzr status'.
>
> A dedicated command 'bzr shelf-status' or 'bzr shelf --status' or something
> else
> sounds more appropriate for a detailed output.
>
> There are some compatibility issues to consider too here, some programs
> already parse the output
> of status and adding new indicators can't be done lightly.
>
> May be you should bring the subject to the mailing list so it can be discussed
> more broadly.

Yes. This is quite a bit of a change in UI. I will start a discussion in the mailing list.

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

I am rejecting this in favor of the hook based and single line suggestion that came up on the mailing list. The proposed post_status hook can be found here https://code.launchpad.net/~parthm/bzr/601749-status-options-show/+merge/33985

Unmerged revisions

5372. By Parth Malwankar

merged in trunk and resolved NEWS conflict.

5371. By Parth Malwankar

update status doc to mentioned 'shelved' as a state

5370. By Parth Malwankar

make imports in bzrlib.shelf lazy to pass test_import_tariff

5369. By Parth Malwankar

test case for short status

5368. By Parth Malwankar

support for 'st -S' with shelf listing

5367. By Parth Malwankar

added blackbox test case

5366. By Parth Malwankar

test case cleanup

5365. By Parth Malwankar

test case for shelf.list_shelves()

5364. By Parth Malwankar

updated NEWS

5363. By Parth Malwankar

show 'no changes' message only for shelve command

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.