Mercurial > public > mercurial-scm > hg-stable
diff mercurial/context.py @ 18364:6252b4f1c4b4
subrepos: process subrepos in sorted order
Add sorted() in places found by testing with PYTHONHASHSEED=random and code
inspection.
An alternative to sprinkling sorted() all over would be to change substate to a
custom dict with sorted iterators...
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Wed, 12 Dec 2012 02:38:14 +0100 |
parents | 3f1552c6bf71 |
children | f3b21beb9802 |
line wrap: on
line diff
--- a/mercurial/context.py Tue Jan 15 02:59:12 2013 +0100 +++ b/mercurial/context.py Wed Dec 12 02:38:14 2012 +0100 @@ -1035,13 +1035,13 @@ return self._parents[0].ancestor(c2) # punt on two parents for now def walk(self, match): - return sorted(self._repo.dirstate.walk(match, self.substate.keys(), + return sorted(self._repo.dirstate.walk(match, sorted(self.substate), True, False)) def dirty(self, missing=False, merge=True, branch=True): "check whether a working directory is modified" # check subrepos first - for s in self.substate: + for s in sorted(self.substate): if self.sub(s).dirty(): return True # check current working dir