Mercurial > hg
changeset 26991:2ddc92bae4a7
mergestate: add a constructor that reads state from disk
At the moment it's the same as just creating a new mergestate, but we'll soon
move the _read call out of __init__ and in here.
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Tue, 17 Nov 2015 13:55:30 -0800 |
parents | 11b1832db8ae |
children | b3b5ed560283 |
files | mercurial/merge.py |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/merge.py Tue Nov 17 17:04:53 2015 -0800 +++ b/mercurial/merge.py Tue Nov 17 13:55:30 2015 -0800 @@ -83,6 +83,12 @@ ms.reset(node, other) return ms + @staticmethod + def read(repo): + """Initialize the merge state, reading it from disk.""" + ms = mergestate(repo) + return ms + def __init__(self, repo): self._repo = repo self._dirty = False