# HG changeset patch # User Siddharth Agarwal # Date 2015-11-17 22:04:56 # Node ID 3185c01c551c84e0feeb9d277e8eb39d7393f9cd # Parent a4c26918fb23c4fa8d3cf34ca146251fde572039 mergestate: move _read() call to read constructor With this patch, mergestate.clean() will no longer abort when it encounters an unsupported merge type. However we hold off on testing it until backwards compatibility is in place. diff --git a/mercurial/merge.py b/mercurial/merge.py --- a/mercurial/merge.py +++ b/mercurial/merge.py @@ -87,12 +87,15 @@ class mergestate(object): def read(repo): """Initialize the merge state, reading it from disk.""" ms = mergestate(repo) + ms._read() return ms def __init__(self, repo): + """Initialize the merge state. + + Do not use this directly! Instead call read() or clean().""" self._repo = repo self._dirty = False - self._read() def reset(self, node=None, other=None): self._state = {}