Mercurial > public > mercurial-scm > hg-stable
comparison 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 |
comparison
equal
deleted
inserted
replaced
9782:c1c40511c276 | 9783:ee00ef6f9be7 |
---|---|
165 repo.ui.debug(" ancestor %s local %s remote %s\n" % (pa, p1, p2)) | 165 repo.ui.debug(" ancestor %s local %s remote %s\n" % (pa, p1, p2)) |
166 | 166 |
167 m1, m2, ma = p1.manifest(), p2.manifest(), pa.manifest() | 167 m1, m2, ma = p1.manifest(), p2.manifest(), pa.manifest() |
168 copied = set(copy.values()) | 168 copied = set(copy.values()) |
169 | 169 |
170 if not overwrite and '.hgsubstate' in m1: | |
171 # check whether sub state is modified | |
172 for s in p1.substate: | |
173 if p1.sub(s).dirty(): | |
174 m1['.hgsubstate'] += "+" | |
175 break | |
176 | |
170 # Compare manifests | 177 # Compare manifests |
171 for f, n in m1.iteritems(): | 178 for f, n in m1.iteritems(): |
172 if f == '.hgsubstate': | |
173 # check whether sub state is modified | |
174 for s in p1.substate: | |
175 if p1.sub(s).dirty(): | |
176 n += "+" | |
177 break | |
178 if partial and not partial(f): | 179 if partial and not partial(f): |
179 continue | 180 continue |
180 if f in m2: | 181 if f in m2: |
181 rflags = fmerge(f, f, f) | 182 rflags = fmerge(f, f, f) |
182 a = ma.get(f, nullid) | 183 a = ma.get(f, nullid) |