comparison mercurial/merge.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 760c0d67ce5e
children 8a811fa9a9c0
comparison
equal deleted inserted replaced
18363:c6e033a7dd38 18364:6252b4f1c4b4
220 copied = set(copy.values()) 220 copied = set(copy.values())
221 copied.update(movewithdir.values()) 221 copied.update(movewithdir.values())
222 222
223 if '.hgsubstate' in m1: 223 if '.hgsubstate' in m1:
224 # check whether sub state is modified 224 # check whether sub state is modified
225 for s in p1.substate: 225 for s in sorted(p1.substate):
226 if p1.sub(s).dirty(): 226 if p1.sub(s).dirty():
227 m1['.hgsubstate'] += "+" 227 m1['.hgsubstate'] += "+"
228 break 228 break
229 229
230 # Compare manifests 230 # Compare manifests
591 hint=_("use 'hg update' " 591 hint=_("use 'hg update' "
592 "or check 'hg heads'")) 592 "or check 'hg heads'"))
593 if not force and (wc.files() or wc.deleted()): 593 if not force and (wc.files() or wc.deleted()):
594 raise util.Abort(_("outstanding uncommitted changes"), 594 raise util.Abort(_("outstanding uncommitted changes"),
595 hint=_("use 'hg status' to list changes")) 595 hint=_("use 'hg status' to list changes"))
596 for s in wc.substate: 596 for s in sorted(wc.substate):
597 if wc.sub(s).dirty(): 597 if wc.sub(s).dirty():
598 raise util.Abort(_("outstanding uncommitted changes in " 598 raise util.Abort(_("outstanding uncommitted changes in "
599 "subrepository '%s'") % s) 599 "subrepository '%s'") % s)
600 600
601 elif not overwrite: 601 elif not overwrite: