Mercurial > hg
diff hgext/rebase.py @ 42613:35ebdbb38efb
continue: added support for rebase
This adds support of rebase to hg continue plan.
An independent continue logic for rebase is created
under continuerebase() function. For this a seperate
rebaseruntime object is created under the function to
handle an interrupted rebasestate.
Results of tests are shown.
Differential Revision: https://phab.mercurial-scm.org/D6646
author | Taapas Agrawal <taapas2897@gmail.com> |
---|---|
date | Tue, 16 Jul 2019 01:59:28 +0530 |
parents | b9bc47211cf5 |
children | 43c84b816445 |
line wrap: on
line diff
--- a/hgext/rebase.py Mon Jul 15 22:23:31 2019 +0530 +++ b/hgext/rebase.py Tue Jul 16 01:59:28 2019 +0530 @@ -1928,6 +1928,17 @@ rbsrt = rebaseruntime(repo, ui) rbsrt._prepareabortorcontinue(isabort=True) +def continuerebase(ui, repo): + with repo.wlock(), repo.lock(): + rbsrt = rebaseruntime(repo, ui) + ms = mergemod.mergestate.read(repo) + mergeutil.checkunresolved(ms) + retcode = rbsrt._prepareabortorcontinue(isabort=False) + if retcode is not None: + return retcode + rbsrt._performrebase(None) + rbsrt._finishrebase() + def summaryhook(ui, repo): if not repo.vfs.exists('rebasestate'): return @@ -1956,4 +1967,5 @@ _("specify merge tool for rebase"))) cmdutil.summaryhooks.add('rebase', summaryhook) statemod.addunfinished('rebase', fname='rebasestate', stopflag=True, - continueflag=True, abortfunc=abortrebase) + continueflag=True, abortfunc=abortrebase, + continuefunc=continuerebase)