[PATCH 1 of 3 V2] histedit: add inprogress method to state class
Christian Delahousse
cdelahousse at fb.com
Fri Oct 9 18:11:32 UTC 2015
# HG changeset patch
# User Christian Delahousse <cdelahousse at fb.com>
# Date 1444088057 25200
# Mon Oct 05 16:34:17 2015 -0700
# Node ID 95c5584b9a2f7aa755ebb196d1c2edbb04d281ae
# Parent 6e715040c1725b5debce888c4f7d3fdbf55cc900
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.
diff --git a/hgext/histedit.py b/hgext/histedit.py
--- a/hgext/histedit.py
+++ b/hgext/histedit.py
@@ -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
More information about the Mercurial-devel
mailing list