Show More
@@ -2249,17 +2249,23 b' def graft(repo, ctx, pctx, labels=None, ' | |||
|
2249 | 2249 | mergeancestor=mergeancestor, labels=labels) |
|
2250 | 2250 | |
|
2251 | 2251 | |
|
2252 | potherp1 = False | |
|
2252 | 2253 | if keepconflictparent and stats.unresolvedcount: |
|
2253 | 2254 | pother = ctx.node() |
|
2254 | 2255 | else: |
|
2255 | 2256 | pother = nullid |
|
2256 | 2257 | parents = ctx.parents() |
|
2257 | 2258 | if keepparent and len(parents) == 2 and pctx in parents: |
|
2259 | if pctx == parents[0]: | |
|
2260 | potherp1 = True | |
|
2258 | 2261 | parents.remove(pctx) |
|
2259 | 2262 | pother = parents[0].node() |
|
2260 | 2263 | |
|
2261 | 2264 | with repo.dirstate.parentchange(): |
|
2262 | repo.setparents(repo['.'].node(), pother) | |
|
2265 | if potherp1: | |
|
2266 | repo.setparents(pother, repo['.'].node()) | |
|
2267 | else: | |
|
2268 | repo.setparents(repo['.'].node(), pother) | |
|
2263 | 2269 | repo.dirstate.write(repo.currenttransaction()) |
|
2264 | 2270 | # fix up dirstate for copies and renames |
|
2265 | 2271 | copies.duplicatecopies(repo, repo[None], ctx.rev(), pctx.rev()) |
General Comments 0
You need to be logged in to leave comments.
Login now