Mercurial > hg
comparison hgext/histedit.py @ 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 | 7b7e081f8954 |
children | 9365b8cb90e0 |
comparison
equal
deleted
inserted
replaced
41164:43fd1947301d | 41165:a3a24ad10efb |
---|---|
306 lines = (intro % (first, last)).split('\n') + actions + hints | 306 lines = (intro % (first, last)).split('\n') + actions + hints |
307 | 307 |
308 return ''.join(['# %s\n' % l if l else '#\n' for l in lines]) | 308 return ''.join(['# %s\n' % l if l else '#\n' for l in lines]) |
309 | 309 |
310 class histeditstate(object): | 310 class histeditstate(object): |
311 def __init__(self, repo, parentctxnode=None, actions=None, keep=None, | 311 def __init__(self, repo): |
312 topmost=None, replacements=None, lock=None, wlock=None): | |
313 self.repo = repo | 312 self.repo = repo |
314 self.actions = actions | 313 self.actions = None |
315 self.keep = keep | 314 self.keep = None |
316 self.topmost = topmost | 315 self.topmost = None |
317 self.parentctxnode = parentctxnode | 316 self.parentctxnode = None |
318 self.lock = lock | 317 self.lock = None |
319 self.wlock = wlock | 318 self.wlock = None |
320 self.backupfile = None | 319 self.backupfile = None |
321 self.stateobj = statemod.cmdstate(repo, 'histedit-state') | 320 self.stateobj = statemod.cmdstate(repo, 'histedit-state') |
322 if replacements is None: | 321 self.replacements = [] |
323 self.replacements = [] | |
324 else: | |
325 self.replacements = replacements | |
326 | 322 |
327 def read(self): | 323 def read(self): |
328 """Load histedit state from disk and set fields appropriately.""" | 324 """Load histedit state from disk and set fields appropriately.""" |
329 if not self.stateobj.exists(): | 325 if not self.stateobj.exists(): |
330 cmdutil.wrongtooltocontinue(self.repo, _('histedit')) | 326 cmdutil.wrongtooltocontinue(self.repo, _('histedit')) |