diff hgext/strip.py @ 42539: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 4bcabb5ae9b6
children 2372284d9457
line wrap: on
line diff
--- a/hgext/strip.py	Sun Jun 09 01:13:13 2019 +0530
+++ b/hgext/strip.py	Sun Jun 09 02:12:58 2019 +0530
@@ -32,10 +32,12 @@
 testedwith = 'ships-with-hg-core'
 
 def checklocalchanges(repo, force=False):
-    cmdutil.checkunfinished(repo)
     s = repo.status()
     if not force:
+        cmdutil.checkunfinished(repo)
         cmdutil.bailifchanged(repo)
+    else:
+        cmdutil.checkunfinished(repo, skipmerge=True)
     return s
 
 def _findupdatetarget(repo, nodes):