[PATCH 2 of 4 mergedriver] mergestate: move _read() call to read constructor
Martin von Zweigbergk
martinvonz at google.com
Wed Nov 18 00:57:17 CST 2015
On Tue, Nov 17, 2015 at 10:43 PM Siddharth Agarwal <sid0 at fb.com> wrote:
> # HG changeset patch
> # User Siddharth Agarwal <sid0 at fb.com>
> # Date 1447797896 28800
> # Tue Nov 17 14:04:56 2015 -0800
> # Node ID 631058f5fee42e8a0b719807a97bf40903df7551
> # Parent 2869fd1811666940c049c171ee074c0020e776eb
> # Available At http://42.netv6.net/sid0-wip/hg/
> # hg pull http://42.netv6.net/sid0-wip/hg/ -r 631058f5fee4
> mergestate: move _read() call to read constructor
>
> With this patch, mergestate.fresh() will no longer abort when it
> encounters an
>
I'll fix this up in flight with s/fresh/clean/ here and in the patch body.
> 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 fresh()."""
> self._repo = repo
> self._dirty = False
> - self._read()
>
> def reset(self, node=None, other=None):
> self._state = {}
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20151118/4e9fc992/attachment.html>
More information about the Mercurial-devel
mailing list