Merge lp:~stevenk/bzr-pipeline/add-current-arg-to-pipes into lp:bzr-pipeline

Proposed by Steve Kowalik
Status: Rejected
Rejected by: Aaron Bentley
Proposed branch: lp:~stevenk/bzr-pipeline/add-current-arg-to-pipes
Merge into: lp:bzr-pipeline
Diff against target: 30 lines (+9/-2)
1 file modified
commands.py (+9/-2)
To merge this branch: bzr merge lp:~stevenk/bzr-pipeline/add-current-arg-to-pipes
Reviewer Review Type Date Requested Status
Aaron Bentley Disapprove
Review via email: mp+47175@code.launchpad.net

Description of the change

Add a -c/--current option to show-pipeline, which will only display the name of the current pipe.

To post a comment you must log in.
Revision history for this message
Aaron Bentley (abentley) wrote :

Thanks for your branch. I'm going to change the implementation and add tests, but this gets me going.

review: Approve
Revision history for this message
Aaron Bentley (abentley) wrote :

Actually, since 'bzr nick' already shows this info, I'll just put a see-also in the docs.

review: Disapprove

Unmerged revisions

196. By Steve Kowalik

Add a -c/--current option to show-pipeline.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'commands.py'
2--- commands.py 2010-12-03 01:13:57 +0000
3+++ commands.py 2011-01-22 23:20:10 +0000
4@@ -287,9 +287,11 @@
5 """
6
7 takes_args = ['location?']
8+ takes_options = [Option('current', short_name='c',
9+ help="Only show the current pipe.")]
10 aliases = ['pipes']
11
12- def run(self, location='.'):
13+ def run(self, location='.', current=False):
14 manager = self._get_location_manager(location)
15 for pipe in manager.list_pipes():
16 if pipe is manager.storage.branch:
17@@ -300,7 +302,12 @@
18 uncommitted = 'U'
19 else:
20 uncommitted = ' '
21- self.outf.write('%s%s %s\n' % (selected, uncommitted, pipe.nick))
22+ if current:
23+ if selected == '*':
24+ self.outf.write('%s\n' % pipe.nick)
25+ else:
26+ self.outf.write(
27+ '%s%s %s\n' % (selected, uncommitted, pipe.nick))
28
29
30 class cmd_pump(PipeCommand):

Subscribers

People subscribed via source and target branches