Mercurial > hg
comparison mercurial/merge.py @ 42918:f059d6ffcdf0
merge with stable
author | Augie Fackler <augie@google.com> |
---|---|
date | Mon, 09 Sep 2019 17:26:17 -0400 |
parents | 7b80ad5af239 a4ca0610c754 |
children | 2c14bf83b58b |
comparison
equal
deleted
inserted
replaced
42916:96b22e58dc67 | 42918:f059d6ffcdf0 |
---|---|
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 | |
2253 if keepconflictparent and stats.unresolvedcount: | 2254 if keepconflictparent and stats.unresolvedcount: |
2254 pother = ctx.node() | 2255 pother = ctx.node() |
2255 else: | 2256 else: |
2256 pother = nullid | 2257 pother = nullid |
2257 parents = ctx.parents() | 2258 parents = ctx.parents() |
2258 if keepparent and len(parents) == 2 and pctx in parents: | 2259 if keepparent and len(parents) == 2 and pctx in parents: |
2260 if pctx == parents[0]: | |
2261 potherp1 = True | |
2259 parents.remove(pctx) | 2262 parents.remove(pctx) |
2260 pother = parents[0].node() | 2263 pother = parents[0].node() |
2261 | 2264 |
2262 with repo.dirstate.parentchange(): | 2265 with repo.dirstate.parentchange(): |
2263 repo.setparents(repo['.'].node(), pother) | 2266 if potherp1: |
2267 repo.setparents(pother, repo['.'].node()) | |
2268 else: | |
2269 repo.setparents(repo['.'].node(), pother) | |
2264 repo.dirstate.write(repo.currenttransaction()) | 2270 repo.dirstate.write(repo.currenttransaction()) |
2265 # fix up dirstate for copies and renames | 2271 # fix up dirstate for copies and renames |
2266 copies.duplicatecopies(repo, repo[None], ctx.rev(), pctx.rev()) | 2272 copies.duplicatecopies(repo, repo[None], ctx.rev(), pctx.rev()) |
2267 return stats | 2273 return stats |
2268 | 2274 |