diff -r c6e033a7dd38 -r 6252b4f1c4b4 mercurial/archival.py --- 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)