Mercurial > public > mercurial-scm > hg
comparison mercurial/hg.py @ 44856:b7808443ed6a
mergestate: split out merge state handling code from main merge module
There's already some pretty reasonable encapsulation here, but I want
to make the mergestate storage a property of the context so memctx
instances can do a reasonable thing. This is the first step in a
reshuffle to make that easier.
Differential Revision: https://phab.mercurial-scm.org/D8550
author | Augie Fackler <augie@google.com> |
---|---|
date | Mon, 18 May 2020 14:59:59 -0400 |
parents | 843418dc0b1b |
children | a03c177a4679 |
comparison
equal
deleted
inserted
replaced
44855:1d2d353e5c4a | 44856:b7808443ed6a |
---|---|
31 localrepo, | 31 localrepo, |
32 lock, | 32 lock, |
33 logcmdutil, | 33 logcmdutil, |
34 logexchange, | 34 logexchange, |
35 merge as mergemod, | 35 merge as mergemod, |
36 mergestate as mergestatemod, | |
36 narrowspec, | 37 narrowspec, |
37 node, | 38 node, |
38 phases, | 39 phases, |
39 pycompat, | 40 pycompat, |
40 scmutil, | 41 scmutil, |
1162 repo.ui.status(_(b"(branch merge, don't forget to commit)\n")) | 1163 repo.ui.status(_(b"(branch merge, don't forget to commit)\n")) |
1163 return stats.unresolvedcount > 0 | 1164 return stats.unresolvedcount > 0 |
1164 | 1165 |
1165 | 1166 |
1166 def abortmerge(ui, repo): | 1167 def abortmerge(ui, repo): |
1167 ms = mergemod.mergestate.read(repo) | 1168 ms = mergestatemod.mergestate.read(repo) |
1168 if ms.active(): | 1169 if ms.active(): |
1169 # there were conflicts | 1170 # there were conflicts |
1170 node = ms.localctx.hex() | 1171 node = ms.localctx.hex() |
1171 else: | 1172 else: |
1172 # there were no conficts, mergestate was not stored | 1173 # there were no conficts, mergestate was not stored |