changeset 4835:5e365008360f

python 2.3 does not have sorted
author Brendan Cully <brendan@kublai.com>
date Fri, 06 Jul 2007 10:29:09 -0700
parents 845e0071b704
children 035489f60842 7031d9e2fa45
files hgext/convert/subversion.py mercurial/changelog.py
diffstat 2 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/convert/subversion.py
+++ b/hgext/convert/subversion.py
@@ -286,7 +286,9 @@ class convert_svn(converter_source):
             except IndexError:
                 branch = None
 
-            for path in sorted(orig_paths):
+            paths = orig_paths.keys()
+            paths.sort()
+            for path in paths:
                 # self.ui.write("path %s\n" % path)
                 if path == self.module: # Follow branching back in history
                     ent = orig_paths[path]
--- a/mercurial/changelog.py
+++ b/mercurial/changelog.py
@@ -132,7 +132,9 @@ class changelog(revlog):
 
     def encode_extra(self, d):
         # keys must be sorted to produce a deterministic changelog entry
-        items = [_string_escape('%s:%s' % (k, d[k])) for k in sorted(d)]
+        keys = d.keys()
+        keys.sort()
+        items = [_string_escape('%s:%s' % (k, d[k])) for k in keys]
         return "\0".join(items)
 
     def extract(self, text):