##// END OF EJS Templates
merge: pass constant cset ancestor to fctx.ancestor
Peter Arrenbrecht -
r11454:9b0406b2 stable
parent child Browse files
Show More
@@ -242,8 +242,13 b' def manifestmerge(repo, p1, p2, pa, over'
242 def actionkey(a):
242 def actionkey(a):
243 return a[1] == 'r' and -1 or 0, a
243 return a[1] == 'r' and -1 or 0, a
244
244
245 def applyupdates(repo, action, wctx, mctx):
245 def applyupdates(repo, action, wctx, mctx, actx):
246 "apply the merge action list to the working directory"
246 """apply the merge action list to the working directory
247
248 wctx is the working copy context
249 mctx is the context to be merged into the working copy
250 actx is the context of the common ancestor
251 """
247
252
248 updated, merged, removed, unresolved = 0, 0, 0, 0
253 updated, merged, removed, unresolved = 0, 0, 0, 0
249 ms = mergestate(repo)
254 ms = mergestate(repo)
@@ -263,7 +268,7 b' def applyupdates(repo, action, wctx, mct'
263 repo.ui.debug("preserving %s for resolve of %s\n" % (f, fd))
268 repo.ui.debug("preserving %s for resolve of %s\n" % (f, fd))
264 fcl = wctx[f]
269 fcl = wctx[f]
265 fco = mctx[f2]
270 fco = mctx[f2]
266 fca = fcl.ancestor(fco) or repo.filectx(f, fileid=nullrev)
271 fca = fcl.ancestor(fco, actx) or repo.filectx(f, fileid=nullrev)
267 ms.add(fcl, fco, fca, fd, flags)
272 ms.add(fcl, fco, fca, fd, flags)
268 if f != fd and move:
273 if f != fd and move:
269 moves.append(f)
274 moves.append(f)
@@ -505,7 +510,7 b' def update(repo, node, branchmerge, forc'
505 if not partial:
510 if not partial:
506 repo.hook('preupdate', throw=True, parent1=xp1, parent2=xp2)
511 repo.hook('preupdate', throw=True, parent1=xp1, parent2=xp2)
507
512
508 stats = applyupdates(repo, action, wc, p2)
513 stats = applyupdates(repo, action, wc, p2, pa)
509
514
510 if not partial:
515 if not partial:
511 repo.dirstate.setparents(fp1, fp2)
516 repo.dirstate.setparents(fp1, fp2)
General Comments 0
You need to be logged in to leave comments. Login now