Patchwork localrepo: jettison parents() method per deprecation policy (API)

login
register
mail settings
Submitter Pierre-Yves David
Date May 5, 2016, 1:51 p.m.
Message ID <7d44de50a789ef601bca.1462456299@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/14915/
State Accepted
Headers show

Comments

Pierre-Yves David - May 5, 2016, 1:51 p.m.
# HG changeset patch
# User Augie Fackler <augie@google.com>
# Date 1462410123 14400
#      Wed May 04 21:02:03 2016 -0400
# Node ID 7d44de50a789ef601bca6d281513d537d2e6eab7
# Parent  e0e72d67a8cd370218453ca0444e02aadabd56a8
localrepo: jettison parents() method per deprecation policy (API)
Pierre-Yves David - May 5, 2016, 3:59 p.m.
I ended up patcbombing the wrong changeset, please ignore.

On 05/05/2016 03:51 PM, Pierre-Yves David wrote:
> # HG changeset patch
> # User Augie Fackler <augie@google.com>
> # Date 1462410123 14400
> #      Wed May 04 21:02:03 2016 -0400
> # Node ID 7d44de50a789ef601bca6d281513d537d2e6eab7
> # Parent  e0e72d67a8cd370218453ca0444e02aadabd56a8
> localrepo: jettison parents() method per deprecation policy (API)
>
> diff -r e0e72d67a8cd -r 7d44de50a789 mercurial/localrepo.py
> --- a/mercurial/localrepo.py	Sun Apr 17 13:06:44 2016 +0900
> +++ b/mercurial/localrepo.py	Wed May 04 21:02:03 2016 -0400
> @@ -881,12 +881,6 @@
>               f = f[1:]
>           return filelog.filelog(self.svfs, f)
>   
> -    def parents(self, changeid=None):
> -        '''get list of changectxs for parents of changeid'''
> -        msg = 'repo.parents() is deprecated, use repo[%r].parents()' % changeid
> -        self.ui.deprecwarn(msg, '3.7')
> -        return self[changeid].parents()
> -
>       def changectx(self, changeid):
>           return self[changeid]
>   
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Patch

diff -r e0e72d67a8cd -r 7d44de50a789 mercurial/localrepo.py
--- a/mercurial/localrepo.py	Sun Apr 17 13:06:44 2016 +0900
+++ b/mercurial/localrepo.py	Wed May 04 21:02:03 2016 -0400
@@ -881,12 +881,6 @@ 
             f = f[1:]
         return filelog.filelog(self.svfs, f)
 
-    def parents(self, changeid=None):
-        '''get list of changectxs for parents of changeid'''
-        msg = 'repo.parents() is deprecated, use repo[%r].parents()' % changeid
-        self.ui.deprecwarn(msg, '3.7')
-        return self[changeid].parents()
-
     def changectx(self, changeid):
         return self[changeid]