[Updated] D9033: mergestate: split up reset() for its two use cases
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Fri Sep 18 02:36:21 UTC 2020
Closed by commit rHG08c6d6962b2a: mergestate: split up reset() for its two use cases (authored by martinvonz).
This revision was automatically updated to reflect the committed changes.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D9033?vs=22681&id=22700
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D9033/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D9033
AFFECTED FILES
mercurial/mergestate.py
CHANGE DETAILS
diff --git a/mercurial/mergestate.py b/mercurial/mergestate.py
--- a/mercurial/mergestate.py
+++ b/mercurial/mergestate.py
@@ -181,7 +181,8 @@
"""Initialize a brand new merge state, removing any existing state on
disk."""
ms = mergestate(repo)
- ms.reset(node, other, labels)
+ ms.reset()
+ ms.start(node, other, labels)
return ms
@staticmethod
@@ -199,12 +200,9 @@
self._dirty = False
self._labels = None
- def reset(self, node=None, other=None, labels=None):
+ def reset(self):
self._state = {}
self._stateextras = collections.defaultdict(dict)
- self._local = node
- self._other = other
- self._labels = labels
for var in ('localctx', 'otherctx'):
if var in vars(self):
delattr(self, var)
@@ -217,6 +215,11 @@
self._results = {}
self._dirty = False
+ def start(self, node, other, labels=None):
+ self._local = node
+ self._other = other
+ self._labels = labels
+
def _read(self):
"""Analyse each record content to restore a serialized state from disk
To: martinvonz, #hg-reviewers, indygreg
Cc: indygreg, mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20200918/4df65297/attachment-0002.html>
More information about the Mercurial-patches
mailing list