Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/merge.py @ 42961:af2b5562fcaf
merge with stable
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Mon, 23 Sep 2019 21:29:53 +0900 |
parents | 2c14bf83b58b 181e52f2b62f |
children | 1ad3ebb39c61 |
comparison
equal
deleted
inserted
replaced
42960:7a01778bc7b7 | 42961:af2b5562fcaf |
---|---|
2248 | 2248 |
2249 stats = update(repo, ctx.node(), True, True, pctx.node(), | 2249 stats = update(repo, ctx.node(), True, True, pctx.node(), |
2250 mergeancestor=mergeancestor, labels=labels) | 2250 mergeancestor=mergeancestor, labels=labels) |
2251 | 2251 |
2252 | 2252 |
2253 potherp1 = False | |
2254 if keepconflictparent and stats.unresolvedcount: | 2253 if keepconflictparent and stats.unresolvedcount: |
2255 pother = ctx.node() | 2254 pother = ctx.node() |
2256 else: | 2255 else: |
2257 pother = nullid | 2256 pother = nullid |
2258 parents = ctx.parents() | 2257 parents = ctx.parents() |
2259 if keepparent and len(parents) == 2 and pctx in parents: | 2258 if keepparent and len(parents) == 2 and pctx in parents: |
2260 if pctx == parents[1]: | |
2261 potherp1 = True | |
2262 parents.remove(pctx) | 2259 parents.remove(pctx) |
2263 pother = parents[0].node() | 2260 pother = parents[0].node() |
2264 | 2261 |
2265 with repo.dirstate.parentchange(): | 2262 with repo.dirstate.parentchange(): |
2266 if potherp1: | 2263 repo.setparents(repo['.'].node(), pother) |
2267 repo.setparents(pother, repo['.'].node()) | |
2268 else: | |
2269 repo.setparents(repo['.'].node(), pother) | |
2270 repo.dirstate.write(repo.currenttransaction()) | 2264 repo.dirstate.write(repo.currenttransaction()) |
2271 # fix up dirstate for copies and renames | 2265 # fix up dirstate for copies and renames |
2272 copies.duplicatecopies(repo, repo[None], ctx.rev(), pctx.rev()) | 2266 copies.duplicatecopies(repo, repo[None], ctx.rev(), pctx.rev()) |
2273 return stats | 2267 return stats |
2274 | 2268 |