Skip to content
Snippets Groups Projects
Commit 18c2184c authored by Bryan O'Sullivan's avatar Bryan O'Sullivan
Browse files

merge: rename p1 to wctx in manifestmerge

This is always a workingctx, and this name is more in line with other
functions in this module.
parent 46edbc49
No related merge requests found
......@@ -185,7 +185,7 @@
return actions
def manifestmerge(repo, p1, p2, pa, branchmerge, force, partial):
def manifestmerge(repo, wctx, p2, pa, branchmerge, force, partial):
"""
Merge p1 and p2 with ancestor pa and generate merge action list
......@@ -197,5 +197,5 @@
actions, copy, movewithdir = [], {}, {}
if overwrite:
pa = p1
pa = wctx
elif pa == p2: # backwards
......@@ -201,3 +201,3 @@
elif pa == p2: # backwards
pa = p1.p1()
pa = wctx.p1()
elif pa and repo.ui.configbool("merge", "followcopies", True):
......@@ -203,5 +203,5 @@
elif pa and repo.ui.configbool("merge", "followcopies", True):
ret = copies.mergecopies(repo, p1, p2, pa)
ret = copies.mergecopies(repo, wctx, p2, pa)
copy, movewithdir, diverge, renamedelete = ret
for of, fl in diverge.iteritems():
actions.append((of, "dr", (fl,), "divergent renames"))
......@@ -211,5 +211,5 @@
repo.ui.note(_("resolving manifests\n"))
repo.ui.debug(" branchmerge: %s, force: %s, partial: %s\n"
% (bool(branchmerge), bool(force), bool(partial)))
repo.ui.debug(" ancestor: %s, local: %s, remote: %s\n" % (pa, p1, p2))
repo.ui.debug(" ancestor: %s, local: %s, remote: %s\n" % (pa, wctx, p2))
......@@ -215,7 +215,7 @@
m1, m2, ma = p1.manifest(), p2.manifest(), pa.manifest()
m1, m2, ma = wctx.manifest(), p2.manifest(), pa.manifest()
copied = set(copy.values())
copied.update(movewithdir.values())
if '.hgsubstate' in m1:
# check whether sub state is modified
......@@ -217,10 +217,10 @@
copied = set(copy.values())
copied.update(movewithdir.values())
if '.hgsubstate' in m1:
# check whether sub state is modified
for s in sorted(p1.substate):
if p1.sub(s).dirty():
for s in sorted(wctx.substate):
if wctx.sub(s).dirty():
m1['.hgsubstate'] += "+"
break
......@@ -300,7 +300,7 @@
if force and not branchmerge:
actions.append((f, "g", (m2.flags(f),), "remote created"))
else:
different = _checkunknownfile(repo, p1, p2, f)
different = _checkunknownfile(repo, wctx, p2, f)
if force and branchmerge and different:
actions.append((f, "m", (f, f, False),
"remote differs from untracked local"))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment