# HG changeset patch # User Augie Fackler # Date 1266178797 21600 # Node ID 66a8bdff9cedf46088dca5b814fba902bdc59b67 # Parent e841e65390d0688698d7ba0c901caa1f0cd3765f pull: report progress to ui.progress so progress bars can appear diff --git a/hgsubversion/wrappers.py b/hgsubversion/wrappers.py --- a/hgsubversion/wrappers.py +++ b/hgsubversion/wrappers.py @@ -256,6 +256,11 @@ def pull(repo, source, heads=[], force=F 'remains unimplemented.') oldrevisions = len(meta.revmap) + cnt = 0 + if stopat_rev: + total = stopat_rev - start + else: + total = svn.HEAD - start try: try: # start converting revisions @@ -277,6 +282,8 @@ def pull(repo, source, heads=[], force=F msg = [s.strip() for s in msg.splitlines() if s][0] w = hgutil.termwidth() bits = (r.revnum, r.author, msg) + cnt += 1 + ui.progress('pull', cnt, total=total) ui.status(('[r%d] %s: %s\n' % bits)[:w]) meta.save_tbdelta(tbdelta) @@ -305,6 +312,7 @@ def pull(repo, source, heads=[], force=F except KeyboardInterrupt: pass finally: + ui.progress('pull', None, total=total) util.swap_out_encoding(old_encoding) revisions = len(meta.revmap) - oldrevisions