Mercurial > public > mercurial-scm > hg
comparison mercurial/state.py @ 42600:3bc400ccbf99
abort: added support for merge
This adds support of `hg merge --abort` to `hg abort` plan.
This involves refactoring `hg.merge` into two different
functions removing the abort logic of `merge` from `hg.merge`
and then creating a seperate `hg.abortmerge` to handle the
abort logic so that the abortion of merge can be called
independently.
`hg.abortmerge` is then registered as `abortfunc` for the
state detection API so that `commands.abort` can use it to
deal with an unfinished merge operation.
Results are shown as tests.
Differential Revision: https://phab.mercurial-scm.org/D6588
author | Taapas Agrawal <taapas2897@gmail.com> |
---|---|
date | Sun, 30 Jun 2019 01:07:14 +0530 |
parents | 3fb0493812c0 |
children | 3c16b9c0b099 |
comparison
equal
deleted
inserted
replaced
42599:3fb0493812c0 | 42600:3bc400ccbf99 |
---|---|
203 'bisect', fname='bisect.state', allowcommit=True, reportonly=True, | 203 'bisect', fname='bisect.state', allowcommit=True, reportonly=True, |
204 statushint=_('To mark the changeset good: hg bisect --good\n' | 204 statushint=_('To mark the changeset good: hg bisect --good\n' |
205 'To mark the changeset bad: hg bisect --bad\n' | 205 'To mark the changeset bad: hg bisect --bad\n' |
206 'To abort: hg bisect --reset\n') | 206 'To abort: hg bisect --reset\n') |
207 ) | 207 ) |
208 addunfinished( | |
209 'merge', fname=None, clearable=True, allowcommit=True, | |
210 cmdmsg=_('outstanding uncommitted merge'), | |
211 statushint=_('To continue: hg commit\n' | |
212 'To abort: hg merge --abort'), | |
213 cmdhint=_("use 'hg commit' or 'hg merge --abort'") | |
214 ) | |
215 | 208 |
216 def getrepostate(repo): | 209 def getrepostate(repo): |
217 # experimental config: commands.status.skipstates | 210 # experimental config: commands.status.skipstates |
218 skip = set(repo.ui.configlist('commands', 'status.skipstates')) | 211 skip = set(repo.ui.configlist('commands', 'status.skipstates')) |
219 for state in _unfinishedstates: | 212 for state in _unfinishedstates: |