comparison mercurial/merge.py @ 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 2ddc92bae4a7
children 9d58dc193c46
comparison
equal deleted inserted replaced
27004:a4c26918fb23 27005:3185c01c551c
85 85
86 @staticmethod 86 @staticmethod
87 def read(repo): 87 def read(repo):
88 """Initialize the merge state, reading it from disk.""" 88 """Initialize the merge state, reading it from disk."""
89 ms = mergestate(repo) 89 ms = mergestate(repo)
90 ms._read()
90 return ms 91 return ms
91 92
92 def __init__(self, repo): 93 def __init__(self, repo):
94 """Initialize the merge state.
95
96 Do not use this directly! Instead call read() or clean()."""
93 self._repo = repo 97 self._repo = repo
94 self._dirty = False 98 self._dirty = False
95 self._read()
96 99
97 def reset(self, node=None, other=None): 100 def reset(self, node=None, other=None):
98 self._state = {} 101 self._state = {}
99 self._local = None 102 self._local = None
100 self._other = None 103 self._other = None