Mercurial > hg
diff hgext/largefiles/overrides.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 | ed23d6100dd3 |
children | de685145f5c2 |
line wrap: on
line diff
--- a/hgext/largefiles/overrides.py Tue Jan 15 02:59:12 2013 +0100 +++ b/hgext/largefiles/overrides.py Wed Dec 12 02:38:14 2012 +0100 @@ -871,7 +871,7 @@ write(f, 'x' in ff and 0755 or 0644, 'l' in ff, getdata) if subrepos: - for subpath in ctx.substate: + for subpath in sorted(ctx.substate): sub = ctx.sub(subpath) submatch = match_.narrowmatcher(subpath, matchfn) sub.archive(repo.ui, archiver, prefix, submatch) @@ -918,7 +918,7 @@ write(f, 'x' in ff and 0755 or 0644, 'l' in ff, getdata) - for subpath in ctx.substate: + for subpath in sorted(ctx.substate): sub = ctx.sub(subpath) submatch = match_.narrowmatcher(subpath, match) sub.archive(ui, archiver, os.path.join(prefix, repo._path) + '/',