##// END OF EJS Templates
merge: move reverse-merge logic out of filemerge (issue2342)
Matt Mackall -
r12008:fad5ed0f stable
parent child Browse files
Show More
@@ -138,9 +138,6 b' def filemerge(repo, mynode, orig, fcd, f'
138 if not fco.cmp(fcd.data()): # files identical?
138 if not fco.cmp(fcd.data()): # files identical?
139 return None
139 return None
140
140
141 if fca == fco: # backwards, use working dir parent as ancestor
142 fca = fcd.parents()[0]
143
144 ui = repo.ui
141 ui = repo.ui
145 fd = fcd.path()
142 fd = fcd.path()
146 binary = isbin(fcd) or isbin(fco) or isbin(fca)
143 binary = isbin(fcd) or isbin(fco) or isbin(fca)
@@ -270,7 +270,12 b' def applyupdates(repo, action, wctx, mct'
270 repo.ui.debug("preserving %s for resolve of %s\n" % (f, fd))
270 repo.ui.debug("preserving %s for resolve of %s\n" % (f, fd))
271 fcl = wctx[f]
271 fcl = wctx[f]
272 fco = mctx[f2]
272 fco = mctx[f2]
273 fca = fcl.ancestor(fco, actx) or repo.filectx(f, fileid=nullrev)
273 if mctx == actx: # backwards, use working dir parent as ancestor
274 fca = fcl.parents()[0]
275 else:
276 fca = fcl.ancestor(fco, actx)
277 if not fca:
278 fca = repo.filectx(f, fileid=nullrev)
274 ms.add(fcl, fco, fca, fd, flags)
279 ms.add(fcl, fco, fca, fd, flags)
275 if f != fd and move:
280 if f != fd and move:
276 moves.append(f)
281 moves.append(f)
General Comments 0
You need to be logged in to leave comments. Login now