diff mercurial/localrepo.py @ 27167:3fe8cb40c9c5

commands: inline definition of localrepo.parents() and drop the method (API) localrepo.parents() has relatively few users, and most of those were actually implicitly looking at the wctx, which is now made explicit via repo[None].
author Augie Fackler <augie@google.com>
date Wed, 11 Nov 2015 20:07:15 -0500
parents 263db31329a6
children dfb836a31b61
line wrap: on
line diff
--- a/mercurial/localrepo.py	Wed Nov 11 20:02:05 2015 -0500
+++ b/mercurial/localrepo.py	Wed Nov 11 20:07:15 2015 -0500
@@ -852,10 +852,6 @@
     def changectx(self, changeid):
         return self[changeid]
 
-    def parents(self, changeid=None):
-        '''get list of changectxs for parents of changeid'''
-        return self[changeid].parents()
-
     def setparents(self, p1, p2=nullid):
         self.dirstate.beginparentchange()
         copies = self.dirstate.setparents(p1, p2)
@@ -1170,7 +1166,7 @@
                         % self.dirstate.branch())
 
             self.dirstate.invalidate()
-            parents = tuple([p.rev() for p in self.parents()])
+            parents = tuple([p.rev() for p in self[None].parents()])
             if len(parents) > 1:
                 ui.status(_('working directory now based on '
                             'revisions %d and %d\n') % parents)