Merge lp:~mbp/launchpad/mbp-trivial into lp:launchpad

Proposed by Martin Pool
Status: Merged
Approved by: Deryck Hodge
Approved revision: no longer in the source branch.
Merged at revision: not available
Proposed branch: lp:~mbp/launchpad/mbp-trivial
Merge into: lp:launchpad
Diff against target: 21 lines (+4/-0)
1 file modified
lib/devscripts/sourcecode.py (+4/-0)
To merge this branch: bzr merge lp:~mbp/launchpad/mbp-trivial
Reviewer Review Type Date Requested Status
Deryck Hodge (community) code Approve
Review via email: mp+12732@code.launchpad.net

Commit message

Show progress when updating bzr branches from rocketfuel-setup.

To post a comment you must log in.
Revision history for this message
Martin Pool (mbp) wrote :

This script, run from rocketfuel-setup, reimplements something like bzr branch and ought to set up a uifactory so it can show progress.

Revision history for this message
Deryck Hodge (deryck) wrote :

Hi, Martin.

Welcome to Launchpad development! :)

This looks nice. It's a small change with a nice benefit.

I don't want to be too nit-picky about such a small diff, but our style guidelines would have us format the function call differently:

ui.ui_factory = ui.make_ui_for_terminal(
    sys.stdin, sys.stdout, sys.stderr)

See https://dev.launchpad.net/PythonStyleGuide#Multiline%20function%20calls.

Other than this very minor thing, it looks ready to land. Thanks again!

Cheers,
deryck

review: Approve (code)
Revision history for this message
Martin Pool (mbp) wrote :

Thanks for the speedy review. I've updated it.

bjornt asked offline why this line is useful. The reason is that bzrlib defaults to a SilentUI that prints nothing. With this change, if you're on a tty, it will show progress bars and network activity while branching.

Revision history for this message
Martin Pool (mbp) wrote :

@deryck, could you land this for me?

Revision history for this message
Deryck Hodge (deryck) wrote :

Martin,

Sure, when PQM opens again, I'll land it. Sorry I missed doing it before now. Been meaning to, but just failed. Sorry.

Cheers,
deryck

Revision history for this message
Martin Pool (mbp) wrote :

2009/12/3 Deryck Hodge <email address hidden>:
> Martin,
>
> Sure, when PQM opens again, I'll land it.  Sorry I missed doing it before now.  Been meaning to, but just failed.  Sorry.

No problem, thanks very much.
--
Martin <http://launchpad.net/~mbp/>

Revision history for this message
Martin Pool (mbp) wrote :

OK, I've re-pushed with a merge from launchpad devel. Could you please resubmit?

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/devscripts/sourcecode.py'
--- lib/devscripts/sourcecode.py 2009-11-25 16:32:51 +0000
+++ lib/devscripts/sourcecode.py 2009-12-09 07:48:18 +0000
@@ -22,6 +22,7 @@
22from bzrlib.revisionspec import RevisionSpec22from bzrlib.revisionspec import RevisionSpec
23from bzrlib.trace import report_exception23from bzrlib.trace import report_exception
24from bzrlib.transport import get_transport24from bzrlib.transport import get_transport
25from bzrlib import ui
25from bzrlib.workingtree import WorkingTree26from bzrlib.workingtree import WorkingTree
2627
27from devscripts import get_launchpad_root28from devscripts import get_launchpad_root
@@ -276,6 +277,9 @@
276 parser.error("Too many arguments.")277 parser.error("Too many arguments.")
277 print 'Sourcecode: %s' % (sourcecode_directory,)278 print 'Sourcecode: %s' % (sourcecode_directory,)
278 print 'Config: %s' % (config_filename,)279 print 'Config: %s' % (config_filename,)
280 # Tell bzr to use the terminal (if any) to show progress bars
281 ui.ui_factory = ui.make_ui_for_terminal(
282 sys.stdin, sys.stdout, sys.stderr)
279 load_plugins()283 load_plugins()
280 update_sourcecode(284 update_sourcecode(
281 sourcecode_directory, config_filename,285 sourcecode_directory, config_filename,