[PATCH 2 of 7 mergedriver] merge.mergestate: add a way to get the other side of the merge
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Sun Oct 18 07:44:17 CDT 2015
On 10/17/2015 04:35 AM, Siddharth Agarwal wrote:
> # HG changeset patch
> # User Siddharth Agarwal <sid0 at fb.com>
> # Date 1444895347 25200
> # Thu Oct 15 00:49:07 2015 -0700
> # Node ID a1d0e62becae8276351a7dd9a76912cb3ea9f905
> # Parent b7d49ea007826ec28354bb67b10f651a5cbbf905
> merge.mergestate: add a way to get the other side of the merge
>
> It's surprising there was no API at all for this until now. In any case this
> will be needed from custom merge drivers.
>
> diff --git a/mercurial/merge.py b/mercurial/merge.py
> --- a/mercurial/merge.py
> +++ b/mercurial/merge.py
> @@ -84,6 +84,8 @@ class mergestate(object):
> self._state = {}
> self._local = None
> self._other = None
> + if 'otherctx' in vars(self):
> + del self.__dict__['otherctx']
I've turned that into:
del self.otherctx
because it seemed more simple.
--
Pierre-Yves David
More information about the Mercurial-devel
mailing list