##// END OF EJS Templates
convert/svn: remove useless sort
Patrick Mezard -
r11133:d7b6aab6 default
parent child Browse files
Show More
@@ -649,7 +649,7 b' class svn_source(converter_source):'
649 elif fromkind == svn.core.svn_node_dir:
649 elif fromkind == svn.core.svn_node_dir:
650 oroot = parentpath.strip('/')
650 oroot = parentpath.strip('/')
651 nroot = path.strip('/')
651 nroot = path.strip('/')
652 children = self._listfiles(oroot, prevnum)
652 children = self._iterfiles(oroot, prevnum)
653 for childpath in children:
653 for childpath in children:
654 childpath = childpath.replace(oroot, nroot)
654 childpath = childpath.replace(oroot, nroot)
655 childpath = self.getrelpath("/" + childpath, pmodule)
655 childpath = self.getrelpath("/" + childpath, pmodule)
@@ -671,8 +671,7 b' class svn_source(converter_source):'
671 if pkind == svn.core.svn_node_file:
671 if pkind == svn.core.svn_node_file:
672 removed.add(self.recode(entrypath))
672 removed.add(self.recode(entrypath))
673
673
674 children = sorted(self._listfiles(path, revnum))
674 for childpath in self._iterfiles(path, revnum):
675 for childpath in children:
676 childpath = self.getrelpath("/" + childpath)
675 childpath = self.getrelpath("/" + childpath)
677 if childpath:
676 if childpath:
678 changed.add(self.recode(childpath))
677 changed.add(self.recode(childpath))
@@ -690,8 +689,7 b' class svn_source(converter_source):'
690 continue
689 continue
691 self.ui.debug("mark %s came from %s:%d\n"
690 self.ui.debug("mark %s came from %s:%d\n"
692 % (path, copyfrompath, ent.copyfrom_rev))
691 % (path, copyfrompath, ent.copyfrom_rev))
693 children = self._listfiles(ent.copyfrom_path, ent.copyfrom_rev)
692 children = self._iterfiles(ent.copyfrom_path, ent.copyfrom_rev)
694 children.sort()
695 for childpath in children:
693 for childpath in children:
696 childpath = self.getrelpath("/" + childpath, pmodule)
694 childpath = self.getrelpath("/" + childpath, pmodule)
697 if not childpath:
695 if not childpath:
@@ -860,14 +858,14 b' class svn_source(converter_source):'
860 data = data[len(link_prefix):]
858 data = data[len(link_prefix):]
861 return data, mode
859 return data, mode
862
860
863 def _listfiles(self, path, revnum):
861 def _iterfiles(self, path, revnum):
864 """List all files in path at revnum, recursively."""
862 """Enumerate all files in path at revnum, recursively."""
865 path = path.strip('/')
863 path = path.strip('/')
866 pool = Pool()
864 pool = Pool()
867 rpath = '/'.join([self.baseurl, urllib.quote(path)]).strip('/')
865 rpath = '/'.join([self.baseurl, urllib.quote(path)]).strip('/')
868 entries = svn.client.ls(rpath, optrev(revnum), True, self.ctx, pool)
866 entries = svn.client.ls(rpath, optrev(revnum), True, self.ctx, pool)
869 return [(path + '/' + p) for p, e in entries.iteritems()
867 return ((path + '/' + p) for p, e in entries.iteritems()
870 if e.kind == svn.core.svn_node_file]
868 if e.kind == svn.core.svn_node_file)
871
869
872 def getrelpath(self, path, module=None):
870 def getrelpath(self, path, module=None):
873 if module is None:
871 if module is None:
General Comments 0
You need to be logged in to leave comments. Login now