##// 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,7 +276,10 b' 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 fca = fcl.parents()[0]
279 if fcl.parents():
280 fca = fcl.parents()[0]
281 else:
282 fca = repo.filectx(f, fileid=nullrev)
280 else:
283 else:
281 fca = fcl.ancestor(fco, actx)
284 fca = fcl.ancestor(fco, actx)
282 if not fca:
285 if not fca:
@@ -166,3 +166,11 b' 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