Mercurial > public > mercurial-scm > hg
diff mercurial/merge.py @ 9783:ee00ef6f9be7
submerge: properly deal with overwrites
also pull .hgsubstate check out of inner loop
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sun, 08 Nov 2009 10:29:52 -0600 |
parents | 1ee085511b89 |
children | 25e572394f5c |
line wrap: on
line diff
--- a/mercurial/merge.py Sun Nov 08 10:24:18 2009 -0600 +++ b/mercurial/merge.py Sun Nov 08 10:29:52 2009 -0600 @@ -167,14 +167,15 @@ m1, m2, ma = p1.manifest(), p2.manifest(), pa.manifest() copied = set(copy.values()) + if not overwrite and '.hgsubstate' in m1: + # check whether sub state is modified + for s in p1.substate: + if p1.sub(s).dirty(): + m1['.hgsubstate'] += "+" + break + # Compare manifests for f, n in m1.iteritems(): - if f == '.hgsubstate': - # check whether sub state is modified - for s in p1.substate: - if p1.sub(s).dirty(): - n += "+" - break if partial and not partial(f): continue if f in m2: