# HG changeset patch # User Sverre Rabbelier # Date 1242340058 -7200 # Node ID 421c992c058b62d7bfe1ee64ef2a85c8a396123c # Parent 324a1ad9212a298d2b4194b03ad2c9704e889d62 import_git_objects: add progress indicator diff -r 324a1ad9212a -r 421c992c058b git_handler.py --- a/git_handler.py Thu May 14 23:55:13 2009 +0200 +++ b/git_handler.py Fri May 15 00:27:38 2009 +0200 @@ -465,7 +465,11 @@ commits = toposort.TopoSort(convert_list).items() # import each of the commits, oldest first - for csha in commits: + total = len(commits) + magnitude = int(math.log(total, 10)) + 1 if total else 1 + for i, csha in enumerate(commits): + if i%100 == 0: + self.ui.status(_("at: %*d/%d\n") % (magnitude, i, total)) commit = convert_list[csha] if not self.map_hg_get(csha): # it's already here self.import_git_commit(commit)