histedit: add inprogress method to state class
authorChristian Delahousse <cdelahousse@fb.com>
Mon, 05 Oct 2015 16:34:17 -0700
changeset 26582 42b908673866
parent 26581 6e715040c172
child 26583 49b568a4e539
histedit: add inprogress method to state class If a histedit is progress, the 'histedit-state' file should exist. The patch implements a convenience function to do check if a histedit is in progress. This method will be use in next patch in the series.
hgext/histedit.py
--- a/hgext/histedit.py	Fri Oct 09 03:53:47 2015 +0900
+++ b/hgext/histedit.py	Mon Oct 05 16:34:17 2015 -0700
@@ -312,6 +312,9 @@
     def clear(self):
         self.repo.vfs.unlink('histedit-state')
 
+    def inprogress(self):
+        return self.repo.vfs.exists('histedit-state')
+
 class histeditaction(object):
     def __init__(self, state, node):
         self.state = state