hgext/histedit.py
changeset 26981 cda2e980281e
parent 26798 38dcb85f9370
child 27051 1168499e5266
--- a/hgext/histedit.py	Mon Nov 16 11:23:32 2015 -0800
+++ b/hgext/histedit.py	Thu Nov 12 12:44:15 2015 +0100
@@ -502,6 +502,9 @@
                          editor=editor)
     return repo.commitctx(new)
 
+def _isdirtywc(repo):
+    return repo[None].dirty(missing=True)
+
 class pick(histeditaction):
     def run(self):
         rulectx = self.repo[self.node]
@@ -971,11 +974,9 @@
 
         actobj = actiontable[action].fromrule(state, currentnode)
 
-        s = repo.status()
-        if s.modified or s.added or s.removed or s.deleted:
+        if _isdirtywc(repo):
             actobj.continuedirty()
-            s = repo.status()
-            if s.modified or s.added or s.removed or s.deleted:
+            if _isdirtywc(repo):
                 raise error.Abort(_("working copy still dirty"))
 
         parentctx, replacements = actobj.continueclean()