comparison mercurial/mergestate.py @ 45493:2c10876bb320

mergestate: make clean() only be about creating a clean mergestate This is similar to the previous patch, but moves the separation one step further out, to `merge.py`. Differential Revision: https://phab.mercurial-scm.org/D9034
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 17 Sep 2020 09:23:21 -0700
parents 08c6d6962b2a
children 9ea4b52ac6bb
comparison
equal deleted inserted replaced
45492:08c6d6962b2a 45493:2c10876bb320
175 175
176 statepathv1 = b'merge/state' 176 statepathv1 = b'merge/state'
177 statepathv2 = b'merge/state2' 177 statepathv2 = b'merge/state2'
178 178
179 @staticmethod 179 @staticmethod
180 def clean(repo, node=None, other=None, labels=None): 180 def clean(repo):
181 """Initialize a brand new merge state, removing any existing state on 181 """Initialize a brand new merge state, removing any existing state on
182 disk.""" 182 disk."""
183 ms = mergestate(repo) 183 ms = mergestate(repo)
184 ms.reset() 184 ms.reset()
185 ms.start(node, other, labels)
186 return ms 185 return ms
187 186
188 @staticmethod 187 @staticmethod
189 def read(repo): 188 def read(repo):
190 """Initialize the merge state, reading it from disk.""" 189 """Initialize the merge state, reading it from disk."""