comparison mercurial/fileset.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 1310489eb5d6
children 3ce3f2b059a1
comparison
equal deleted inserted replaced
18363:c6e033a7dd38 18364:6252b4f1c4b4
371 Subrepositories whose paths match the given pattern. 371 Subrepositories whose paths match the given pattern.
372 """ 372 """
373 # i18n: "subrepo" is a keyword 373 # i18n: "subrepo" is a keyword
374 getargs(x, 0, 1, _("subrepo takes at most one argument")) 374 getargs(x, 0, 1, _("subrepo takes at most one argument"))
375 ctx = mctx.ctx 375 ctx = mctx.ctx
376 sstate = ctx.substate 376 sstate = sorted(ctx.substate)
377 if x: 377 if x:
378 pat = getstring(x, _("subrepo requires a pattern or no arguments")) 378 pat = getstring(x, _("subrepo requires a pattern or no arguments"))
379 379
380 import match as matchmod # avoid circular import issues 380 import match as matchmod # avoid circular import issues
381 fast = not matchmod.patkind(pat) 381 fast = not matchmod.patkind(pat)