# HG changeset patch # User Bryan O'Sullivan # Date 1122861826 28800 # Node ID b678e6d4f92dc9ff6999c90d0b26bd6e2fbebab2 # Parent 72d9bd4841f377b5e06eecd3f5b29dee6847d801 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. diff --git a/mercurial/hg.py b/mercurial/hg.py --- a/mercurial/hg.py +++ b/mercurial/hg.py @@ -458,13 +458,17 @@ class dirstate: 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