changeset 822:b678e6d4f92d

Attempt to yield names in sorted order when walking. This is an improvement in behaviour, but the walk and changes code still has some flaws that make sorted name presentation difficult: - changes returns tuples of names, instead of a sorted list of (name, status) pairs. - walk yields deleted names after all others.
author Bryan O'Sullivan <bos@serpentine.com>
date Sun, 31 Jul 2005 18:03:46 -0800
parents 72d9bd4841f3
children f0446f6963d2
files mercurial/hg.py
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/hg.py	Sun Jul 31 17:54:00 2005 -0800
+++ b/mercurial/hg.py	Sun Jul 31 18:03:46 2005 -0800
@@ -458,13 +458,17 @@
                             ds = os.path.join(nd, sd +'/')
                             if self.ignore(ds) or not match(ds):
                                 subdirs.remove(sd)
+                        subdirs.sort()
+                        fl.sort()
                         for fn in fl:
                             fn = util.pconvert(os.path.join(d, fn))
                             yield 'f', fn
                 else:
                     yield 'f', f[len(self.root) + 1:]
 
-            for k in dc.keys():
+            ks = dc.keys()
+            ks.sort()
+            for k in ks:
                 yield 'm', k
 
         # yield only files that match: all in dirstate, others only if