comparison hgext/histedit.py @ 26582:42b908673866

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.
author Christian Delahousse <cdelahousse@fb.com>
date Mon, 05 Oct 2015 16:34:17 -0700
parents 6c93834d7d66
children 49b568a4e539
comparison
equal deleted inserted replaced
26581:6e715040c172 26582:42b908673866
309 309
310 return parentctxnode, rules, keep, topmost, replacements, backupfile 310 return parentctxnode, rules, keep, topmost, replacements, backupfile
311 311
312 def clear(self): 312 def clear(self):
313 self.repo.vfs.unlink('histedit-state') 313 self.repo.vfs.unlink('histedit-state')
314
315 def inprogress(self):
316 return self.repo.vfs.exists('histedit-state')
314 317
315 class histeditaction(object): 318 class histeditaction(object):
316 def __init__(self, state, node): 319 def __init__(self, state, node):
317 self.state = state 320 self.state = state
318 self.repo = state.repo 321 self.repo = state.repo