Mercurial > hg
comparison hgext/convert/subversion.py @ 38406:65d1d7da63d1
convert: use progress helper
Differential Revision: https://phab.mercurial-scm.org/D3807
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Mon, 18 Jun 2018 15:05:52 -0700 |
parents | aac4be30e250 |
children | 34fe76b31ca4 |
comparison
equal
deleted
inserted
replaced
38405:76a08cec029d | 38406:65d1d7da63d1 |
---|---|
748 new_module, revnum = revsplit(rev)[1:] | 748 new_module, revnum = revsplit(rev)[1:] |
749 if new_module != self.module: | 749 if new_module != self.module: |
750 self.module = new_module | 750 self.module = new_module |
751 self.reparent(self.module) | 751 self.reparent(self.module) |
752 | 752 |
753 progress = self.ui.makeprogress(_('scanning paths'), unit=_('paths'), | |
754 total=len(paths)) | |
753 for i, (path, ent) in enumerate(paths): | 755 for i, (path, ent) in enumerate(paths): |
754 self.ui.progress(_('scanning paths'), i, item=path, | 756 progress.update(i, item=path) |
755 total=len(paths), unit=_('paths')) | |
756 entrypath = self.getrelpath(path) | 757 entrypath = self.getrelpath(path) |
757 | 758 |
758 kind = self._checkpath(entrypath, revnum) | 759 kind = self._checkpath(entrypath, revnum) |
759 if kind == svn.core.svn_node_file: | 760 if kind == svn.core.svn_node_file: |
760 changed.add(self.recode(entrypath)) | 761 changed.add(self.recode(entrypath)) |
836 continue | 837 continue |
837 copytopath = path + childpath[len(copyfrompath):] | 838 copytopath = path + childpath[len(copyfrompath):] |
838 copytopath = self.getrelpath(copytopath) | 839 copytopath = self.getrelpath(copytopath) |
839 copies[self.recode(copytopath)] = self.recode(childpath) | 840 copies[self.recode(copytopath)] = self.recode(childpath) |
840 | 841 |
841 self.ui.progress(_('scanning paths'), None) | 842 progress.complete() |
842 changed.update(removed) | 843 changed.update(removed) |
843 return (list(changed), removed, copies) | 844 return (list(changed), removed, copies) |
844 | 845 |
845 def _fetch_revisions(self, from_revnum, to_revnum): | 846 def _fetch_revisions(self, from_revnum, to_revnum): |
846 if from_revnum < to_revnum: | 847 if from_revnum < to_revnum: |