Changeset View
Changeset View
Standalone View
Standalone View
hgext/rebase.py
Show First 20 Lines • Show All 1917 Lines • ▼ Show 20 Line(s) | for srcrev in rebaseobsrevs: | ||||
obsoletewithoutsuccessorindestination.add(srcrev) | obsoletewithoutsuccessorindestination.add(srcrev) | ||||
return ( | return ( | ||||
obsoletenotrebased, | obsoletenotrebased, | ||||
obsoletewithoutsuccessorindestination, | obsoletewithoutsuccessorindestination, | ||||
obsoleteextinctsuccessors, | obsoleteextinctsuccessors, | ||||
) | ) | ||||
def abortrebase(ui, repo): | |||||
pulkit: we can name this function abortrebase, no need to add hg in front. | |||||
with repo.wlock(), repo.lock(): | |||||
rbsrt = rebaseruntime(repo, ui) | |||||
Done Replyaborting rebase .. pulkit: `aborting rebase ..` | |||||
rbsrt._prepareabortorcontinue(isabort=True) | |||||
Done ReplyIf I am correct, the call to abort from hg rebase --abort does not pass backup and suppwarns as these values. Look for line 1023 in this file. pulkit: If I am correct, the call to abort from `hg rebase --abort` does not pass backup and suppwarns… | |||||
def summaryhook(ui, repo): | def summaryhook(ui, repo): | ||||
if not repo.vfs.exists('rebasestate'): | if not repo.vfs.exists('rebasestate'): | ||||
return | return | ||||
try: | try: | ||||
rbsrt = rebaseruntime(repo, ui, {}) | rbsrt = rebaseruntime(repo, ui, {}) | ||||
rbsrt.restorestatus() | rbsrt.restorestatus() | ||||
state = rbsrt.state | state = rbsrt.state | ||||
except error.RepoLookupError: | except error.RepoLookupError: | ||||
Show All 12 Lines | def uisetup(ui): | ||||
#Replace pull with a decorator to provide --rebase option | #Replace pull with a decorator to provide --rebase option | ||||
entry = extensions.wrapcommand(commands.table, 'pull', pullrebase) | entry = extensions.wrapcommand(commands.table, 'pull', pullrebase) | ||||
entry[1].append(('', 'rebase', None, | entry[1].append(('', 'rebase', None, | ||||
_("rebase working directory to branch head"))) | _("rebase working directory to branch head"))) | ||||
entry[1].append(('t', 'tool', '', | entry[1].append(('t', 'tool', '', | ||||
_("specify merge tool for rebase"))) | _("specify merge tool for rebase"))) | ||||
cmdutil.summaryhooks.add('rebase', summaryhook) | cmdutil.summaryhooks.add('rebase', summaryhook) | ||||
statemod.addunfinished('rebase', fname='rebasestate', stopflag=True, | statemod.addunfinished('rebase', fname='rebasestate', stopflag=True, | ||||
continueflag=True) | continueflag=True, abortfunc=abortrebase) |
we can name this function abortrebase, no need to add hg in front.