comparison hgext/rebase.py @ 42530:dc3fdd1b5af4

state: created new class statecheck to handle unfinishedstates For the purpose of handling states for various multistep operations like `hg graft`, `hg histedit`, `hg bisect` et al a new class called statecheck is created .This will help in having a unified approach towards these commands and handle them with ease. The class takes in 4 basic arguments which include the name of the command, the name of the state file associated with it , clearable flag , allowcommit flag. This also also adds the support of`checkunfinished()` and `clearunfinished()` to the class. Tests remain unchanged. Differential Revision: https://phab.mercurial-scm.org/D6501
author Taapas Agrawal <taapas2897@gmail.com>
date Sun, 09 Jun 2019 00:43:36 +0530
parents 5f2f6912c9e6
children 12243f15d53e
comparison
equal deleted inserted replaced
42529:5f2f6912c9e6 42530:dc3fdd1b5af4
1948 entry[1].append(('', 'rebase', None, 1948 entry[1].append(('', 'rebase', None,
1949 _("rebase working directory to branch head"))) 1949 _("rebase working directory to branch head")))
1950 entry[1].append(('t', 'tool', '', 1950 entry[1].append(('t', 'tool', '',
1951 _("specify merge tool for rebase"))) 1951 _("specify merge tool for rebase")))
1952 cmdutil.summaryhooks.add('rebase', summaryhook) 1952 cmdutil.summaryhooks.add('rebase', summaryhook)
1953 statemod.unfinishedstates.append( 1953 statemod.addunfinished('rebase', fname='rebasestate')
1954 ['rebasestate', False, False, _('rebase in progress'),
1955 _("use 'hg rebase --continue' or 'hg rebase --abort'")])
1956 cmdutil.afterresolvedstates.append( 1954 cmdutil.afterresolvedstates.append(
1957 ['rebasestate', _('hg rebase --continue')]) 1955 ['rebasestate', _('hg rebase --continue')])