Show More
@@ -185,7 +185,7 b' def _forgetremoved(wctx, mctx, branchmer' | |||||
185 |
|
185 | |||
186 | return actions |
|
186 | return actions | |
187 |
|
187 | |||
188 |
def manifestmerge(repo, |
|
188 | def manifestmerge(repo, wctx, p2, pa, branchmerge, force, partial): | |
189 | """ |
|
189 | """ | |
190 | Merge p1 and p2 with ancestor pa and generate merge action list |
|
190 | Merge p1 and p2 with ancestor pa and generate merge action list | |
191 |
|
191 | |||
@@ -197,11 +197,11 b' def manifestmerge(repo, p1, p2, pa, bran' | |||||
197 | actions, copy, movewithdir = [], {}, {} |
|
197 | actions, copy, movewithdir = [], {}, {} | |
198 |
|
198 | |||
199 | if overwrite: |
|
199 | if overwrite: | |
200 |
pa = |
|
200 | pa = wctx | |
201 | elif pa == p2: # backwards |
|
201 | elif pa == p2: # backwards | |
202 |
pa = |
|
202 | pa = wctx.p1() | |
203 | elif pa and repo.ui.configbool("merge", "followcopies", True): |
|
203 | elif pa and repo.ui.configbool("merge", "followcopies", True): | |
204 |
ret = copies.mergecopies(repo, |
|
204 | ret = copies.mergecopies(repo, wctx, p2, pa) | |
205 | copy, movewithdir, diverge, renamedelete = ret |
|
205 | copy, movewithdir, diverge, renamedelete = ret | |
206 | for of, fl in diverge.iteritems(): |
|
206 | for of, fl in diverge.iteritems(): | |
207 | actions.append((of, "dr", (fl,), "divergent renames")) |
|
207 | actions.append((of, "dr", (fl,), "divergent renames")) | |
@@ -211,16 +211,16 b' def manifestmerge(repo, p1, p2, pa, bran' | |||||
211 | repo.ui.note(_("resolving manifests\n")) |
|
211 | repo.ui.note(_("resolving manifests\n")) | |
212 | repo.ui.debug(" branchmerge: %s, force: %s, partial: %s\n" |
|
212 | repo.ui.debug(" branchmerge: %s, force: %s, partial: %s\n" | |
213 | % (bool(branchmerge), bool(force), bool(partial))) |
|
213 | % (bool(branchmerge), bool(force), bool(partial))) | |
214 |
repo.ui.debug(" ancestor: %s, local: %s, remote: %s\n" % (pa, |
|
214 | repo.ui.debug(" ancestor: %s, local: %s, remote: %s\n" % (pa, wctx, p2)) | |
215 |
|
215 | |||
216 |
m1, m2, ma = |
|
216 | m1, m2, ma = wctx.manifest(), p2.manifest(), pa.manifest() | |
217 | copied = set(copy.values()) |
|
217 | copied = set(copy.values()) | |
218 | copied.update(movewithdir.values()) |
|
218 | copied.update(movewithdir.values()) | |
219 |
|
219 | |||
220 | if '.hgsubstate' in m1: |
|
220 | if '.hgsubstate' in m1: | |
221 | # check whether sub state is modified |
|
221 | # check whether sub state is modified | |
222 |
for s in sorted( |
|
222 | for s in sorted(wctx.substate): | |
223 |
if |
|
223 | if wctx.sub(s).dirty(): | |
224 | m1['.hgsubstate'] += "+" |
|
224 | m1['.hgsubstate'] += "+" | |
225 | break |
|
225 | break | |
226 |
|
226 | |||
@@ -300,7 +300,7 b' def manifestmerge(repo, p1, p2, pa, bran' | |||||
300 | if force and not branchmerge: |
|
300 | if force and not branchmerge: | |
301 | actions.append((f, "g", (m2.flags(f),), "remote created")) |
|
301 | actions.append((f, "g", (m2.flags(f),), "remote created")) | |
302 | else: |
|
302 | else: | |
303 |
different = _checkunknownfile(repo, |
|
303 | different = _checkunknownfile(repo, wctx, p2, f) | |
304 | if force and branchmerge and different: |
|
304 | if force and branchmerge and different: | |
305 | actions.append((f, "m", (f, f, False), |
|
305 | actions.append((f, "m", (f, f, False), | |
306 | "remote differs from untracked local")) |
|
306 | "remote differs from untracked local")) |
General Comments 0
You need to be logged in to leave comments.
Login now