changeset 41165:a3a24ad10efb

histedit: drop unused constructor arguments (API) All in-tree callers pass a repo and nothing else. Differential Revision: https://phab.mercurial-scm.org/D5541
author Martin von Zweigbergk <martinvonz@google.com>
date Wed, 09 Jan 2019 15:32:26 -0800
parents 43fd1947301d
children 9365b8cb90e0
files hgext/histedit.py
diffstat 1 files changed, 8 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/histedit.py	Sat Jan 05 19:50:30 2019 -0500
+++ b/hgext/histedit.py	Wed Jan 09 15:32:26 2019 -0800
@@ -308,21 +308,17 @@
     return ''.join(['# %s\n' % l if l else '#\n' for l in lines])
 
 class histeditstate(object):
-    def __init__(self, repo, parentctxnode=None, actions=None, keep=None,
-            topmost=None, replacements=None, lock=None, wlock=None):
+    def __init__(self, repo):
         self.repo = repo
-        self.actions = actions
-        self.keep = keep
-        self.topmost = topmost
-        self.parentctxnode = parentctxnode
-        self.lock = lock
-        self.wlock = wlock
+        self.actions = None
+        self.keep = None
+        self.topmost = None
+        self.parentctxnode = None
+        self.lock = None
+        self.wlock = None
         self.backupfile = None
         self.stateobj = statemod.cmdstate(repo, 'histedit-state')
-        if replacements is None:
-            self.replacements = []
-        else:
-            self.replacements = replacements
+        self.replacements = []
 
     def read(self):
         """Load histedit state from disk and set fields appropriately."""