##// END OF EJS Templates
merge: handle no file parent in backwards merge (issue2364)
Matt Mackall -
r12664:545ec177 default
parent child Browse files
Show More
@@ -276,8 +276,11 def applyupdates(repo, action, wctx, mct
276 fcl = wctx[f]
276 fcl = wctx[f]
277 fco = mctx[f2]
277 fco = mctx[f2]
278 if mctx == actx: # backwards, use working dir parent as ancestor
278 if mctx == actx: # backwards, use working dir parent as ancestor
279 if fcl.parents():
279 fca = fcl.parents()[0]
280 fca = fcl.parents()[0]
280 else:
281 else:
282 fca = repo.filectx(f, fileid=nullrev)
283 else:
281 fca = fcl.ancestor(fco, actx)
284 fca = fcl.ancestor(fco, actx)
282 if not fca:
285 if not fca:
283 fca = repo.filectx(f, fileid=nullrev)
286 fca = repo.filectx(f, fileid=nullrev)
@@ -166,3 +166,11 merge of b expected
166 +This is file b33
166 +This is file b33
167 $ hg status
167 $ hg status
168 M b
168 M b
169
170 Test for issue2364
171
172 $ hg up -qC .
173 $ hg rm b
174 $ hg ci -md
175 $ hg revert -r -2 b
176 $ hg up -q -- -2
General Comments 0
You need to be logged in to leave comments. Login now