Mercurial > hg
changeset 27005:3185c01c551c
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.
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Tue, 17 Nov 2015 14:04:56 -0800 |
parents | a4c26918fb23 |
children | 9d58dc193c46 |
files | mercurial/merge.py |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/merge.py Tue Nov 17 14:22:30 2015 -0800 +++ b/mercurial/merge.py Tue Nov 17 14:04:56 2015 -0800 @@ -87,12 +87,15 @@ 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 = {}