diff mercurial/archival.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 87923db0ecff
children 88d1b59f6906
line wrap: on
line diff
--- a/mercurial/archival.py	Tue Jan 15 02:59:12 2013 +0100
+++ b/mercurial/archival.py	Wed Dec 12 02:38:14 2012 +0100
@@ -299,7 +299,7 @@
     repo.ui.progress(_('archiving'), None)
 
     if subrepos:
-        for subpath in ctx.substate:
+        for subpath in sorted(ctx.substate):
             sub = ctx.sub(subpath)
             submatch = matchmod.narrowmatcher(subpath, matchfn)
             sub.archive(repo.ui, archiver, prefix, submatch)