histedit: add a stateobj variable to histeditstate class
authorPulkit Goyal <7895pulkit@gmail.com>
Sat, 30 Jun 2018 07:21:21 +0530
changeset 38510 18f348e035fb
parent 38509 c6a2ce82e60b
child 38511 03e7ec8180f0
histedit: add a stateobj variable to histeditstate class The stateobj variable will be an instance of state.cmdstate() class. The stateobj variable will be used in upcoming patches to simplify the code a bit and start using cbor to write state files. Differential Revision: https://phab.mercurial-scm.org/D3864
hgext/histedit.py
--- a/hgext/histedit.py	Sat Jun 30 07:10:49 2018 +0530
+++ b/hgext/histedit.py	Sat Jun 30 07:21:21 2018 +0530
@@ -207,6 +207,7 @@
     registrar,
     repair,
     scmutil,
+    state as statemod,
     util,
 )
 from mercurial.utils import (
@@ -304,6 +305,7 @@
         self.lock = lock
         self.wlock = wlock
         self.backupfile = None
+        self.stateobj = statemod.cmdstate(repo, 'histedit-state')
         if replacements is None:
             self.replacements = []
         else: