convert: Compatibility fixes for python2.3
authorThomas Arendsen Hein <thomas@intevation.de>
Sat, 09 Feb 2008 13:08:02 +0100
changeset 6053 4e87e785c5bf
parent 6052 75425961e955
child 6054 e2cbdd931341
convert: Compatibility fixes for python2.3 set -> util.set sort(reverse=True) -> sort(); reverse()
hgext/convert/subversion.py
--- a/hgext/convert/subversion.py	Thu Feb 07 22:25:00 2008 +0100
+++ b/hgext/convert/subversion.py	Sat Feb 09 13:08:02 2008 +0100
@@ -947,7 +947,7 @@
                 os.rename(tempname, wdest)
 
     def dirs_of(self, files):
-        dirs = set()
+        dirs = util.set()
         for f in files:
             if os.path.isdir(self.wjoin(f)):
                 dirs.add(f)
@@ -970,7 +970,8 @@
 
     def tidy_dirs(self, names):
         dirs = list(self.dirs_of(names))
-        dirs.sort(reverse=True)
+        dirs.sort()
+        dirs.reverse()
         deleted = []
         for d in dirs:
             wd = self.wjoin(d)
@@ -991,7 +992,7 @@
                 return self.revid(self.childmap[parent])
             except KeyError:
                 pass
-        entries = set(self.delete)
+        entries = util.set(self.delete)
         files = util.frozenset(files)
         entries.update(self.add_dirs(files.difference(entries)))
         if self.copies: