diff hgext/rebase.py @ 42532:12243f15d53e

statecheck: added support for STATES This removes `STATES` from `state.py` and adds support to `statecheck` class to handle its features. `getrepostate()` function is modified accordingly. This adds a method 'cmdutil.addunfinished()' for appending to the unfinishedstate list so as to keep 'merge' and 'bisect' at the last. This also makes two separate message formats for `checkunfinished()` and `getrepostate()` as there were previously present. Results of test changed are shown. Differential Revision: https://phab.mercurial-scm.org/D6503
author Taapas Agrawal <taapas2897@gmail.com>
date Sun, 09 Jun 2019 02:12:58 +0530
parents dc3fdd1b5af4
children 0231032729c4
line wrap: on
line diff
--- a/hgext/rebase.py	Sun Jun 09 01:13:13 2019 +0530
+++ b/hgext/rebase.py	Sun Jun 09 02:12:58 2019 +0530
@@ -1822,7 +1822,7 @@
                 ui.debug('--update and --rebase are not compatible, ignoring '
                          'the update flag\n')
 
-            cmdutil.checkunfinished(repo)
+            cmdutil.checkunfinished(repo, skipmerge=True)
             cmdutil.bailifchanged(repo, hint=_('cannot pull with rebase: '
                 'please commit or shelve your changes first'))
 
@@ -1950,6 +1950,6 @@
     entry[1].append(('t', 'tool', '',
                      _("specify merge tool for rebase")))
     cmdutil.summaryhooks.add('rebase', summaryhook)
-    statemod.addunfinished('rebase', fname='rebasestate')
+    statemod.addunfinished('rebase', fname='rebasestate', stopflag=True)
     cmdutil.afterresolvedstates.append(
         ['rebasestate', _('hg rebase --continue')])