comparison hgext/convert/subversion.py @ 11137:94afe7bc87a9

convert/svn: report path discovery progress When converting non-local repositories, scanning changed paths before retrieving data can be almost as slow as retrieving the data itself, thanks to HTTP calls overhead.
author Patrick Mezard <pmezard@gmail.com>
date Sun, 09 May 2010 22:51:25 +0200
parents 33010ff1fd6f
children b5ef95b5ae14
comparison
equal deleted inserted replaced
11136:ecc8b18736da 11137:94afe7bc87a9
608 new_module, revnum = self.revsplit(rev)[1:] 608 new_module, revnum = self.revsplit(rev)[1:]
609 if new_module != self.module: 609 if new_module != self.module:
610 self.module = new_module 610 self.module = new_module
611 self.reparent(self.module) 611 self.reparent(self.module)
612 612
613 for path, ent in paths: 613 for i, (path, ent) in enumerate(paths):
614 self.ui.progress(_('scanning paths'), i, item=path,
615 total=len(paths))
614 entrypath = self.getrelpath(path) 616 entrypath = self.getrelpath(path)
615 617
616 kind = self._checkpath(entrypath, revnum) 618 kind = self._checkpath(entrypath, revnum)
617 if kind == svn.core.svn_node_file: 619 if kind == svn.core.svn_node_file:
618 changed.add(self.recode(entrypath)) 620 changed.add(self.recode(entrypath))
687 continue 689 continue
688 copytopath = path + childpath[len(copyfrompath):] 690 copytopath = path + childpath[len(copyfrompath):]
689 copytopath = self.getrelpath(copytopath) 691 copytopath = self.getrelpath(copytopath)
690 copies[self.recode(copytopath)] = self.recode(childpath) 692 copies[self.recode(copytopath)] = self.recode(childpath)
691 693
694 self.ui.progress(_('scanning paths'), None)
692 changed.update(removed) 695 changed.update(removed)
693 return (list(changed), removed, copies) 696 return (list(changed), removed, copies)
694 697
695 def _fetch_revisions(self, from_revnum, to_revnum): 698 def _fetch_revisions(self, from_revnum, to_revnum):
696 if from_revnum < to_revnum: 699 if from_revnum < to_revnum: