[PATCH 1 of 2] compat: drop compatibility for `context.descendant`

Gregory Szorc gregory.szorc at gmail.com
Tue Aug 14 16:39:16 EDT 2018


On Tue, Aug 14, 2018 at 6:35 AM, Boris Feld <boris.feld at octobus.net> wrote:

> # HG changeset patch
> # User Boris Feld <boris.feld at octobus.net>
> # Date 1534234106 -7200
> #      Tue Aug 14 10:08:26 2018 +0200
> # Node ID 27efa73dcb8082e41923a3b834d92f505daa509d
> # Parent  d99468d2b09acc8f5c6c5ce5c1b08b47a742841f
> # EXP-Topic compat-drop
> # Available At https://bitbucket.org/octobus/mercurial-devel/
> #              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r
> 27efa73dcb80
> compat: drop compatibility for `context.descendant`
>

Queued this series with minor commit message tweaks to add (API) and
annotate to proper changed module.


>
> As advertised, the method is dropped in 4.8.
>
> diff --git a/mercurial/context.py b/mercurial/context.py
> --- a/mercurial/context.py
> +++ b/mercurial/context.py
> @@ -593,12 +593,6 @@ class changectx(basectx):
>                              short(n) for n in sorted(cahs) if n != anc))
>          return changectx(self._repo, anc)
>
> -    def descendant(self, other):
> -        msg = (b'ctx.descendant(other) is deprecated, '
> -               b'use ctx.isancestorof(other)')
> -        self._repo.ui.deprecwarn(msg, b'4.7')
> -        return self.isancestorof(other)
> -
>      def isancestorof(self, other):
>          """True if this changeset is an ancestor of other"""
>          return self._repo.changelog.isancestorrev(self._rev, other._rev)
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20180814/14c40e3d/attachment.html>


More information about the Mercurial-devel mailing list