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