Mercurial > hgsubversion
changeset 559:66a8bdff9ced
pull: report progress to ui.progress so progress bars can appear
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Sun, 14 Feb 2010 14:19:57 -0600 |
parents | e841e65390d0 |
children | 9cac09f91728 |
files | hgsubversion/wrappers.py |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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