changeset 6053:4e87e785c5bf

convert: Compatibility fixes for python2.3 set -> util.set sort(reverse=True) -> sort(); reverse()
author Thomas Arendsen Hein <thomas@intevation.de>
date Sat, 09 Feb 2008 13:08:02 +0100
parents 75425961e955
children e2cbdd931341
files hgext/convert/subversion.py
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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: