[PATCH 1 of 3] histedit: add inprogress method to state class
Christian Delahousse
cdelahousse at fb.com
Wed Oct 7 22:19:12 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 a4ca3731ba2ccb54d2a549876fa74f55a84216bb
# Parent 875e5d89dc86a616ac43c12519ded0d1d75e13f5
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