changeset 39195:9539553f6d17

dagutil: remove internalize() and internalizeall() The previous commit removed the last consumer. .. api:: removed internalize() and internalizeall() from dagutil Use .rev(node) on storage objects to convert nodes to revisions. Differential Revision: https://phab.mercurial-scm.org/D4307
author Gregory Szorc <gregory.szorc@gmail.com>
date Thu, 16 Aug 2018 19:51:01 +0000
parents 858a12846f4f
children 26f3d075f36e
files mercurial/dagutil.py
diffstat 1 files changed, 0 insertions(+), 28 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/dagutil.py	Thu Aug 16 19:47:30 2018 +0000
+++ b/mercurial/dagutil.py	Thu Aug 16 19:51:01 2018 +0000
@@ -8,7 +8,6 @@
 
 from __future__ import absolute_import
 
-from .i18n import _
 from .node import nullrev
 
 class basedag(object):
@@ -62,18 +61,6 @@
         '''
         raise NotImplementedError
 
-    def internalize(self, id):
-        '''return a node ix'''
-        return self._internalize(id)
-
-    def internalizeall(self, ids, filterunknown=False):
-        '''return a list of (or set if given a set) of node ixs'''
-        ixs = self._internalizeall(ids, filterunknown)
-        if isinstance(ids, set):
-            return set(ixs)
-        return list(ixs)
-
-
 class genericdag(basedag):
     '''generic implementations for DAGs'''
 
@@ -119,21 +106,6 @@
             self._heads = self._getheads()
         return self._heads
 
-    def _internalize(self, id):
-        ix = self._revlog.rev(id)
-        if ix == nullrev:
-            raise LookupError(id, self._revlog.indexfile, _('nullid'))
-        return ix
-    def _internalizeall(self, ids, filterunknown):
-        rl = self._revlog
-        if filterunknown:
-            return [r for r in map(rl.nodemap.get, ids)
-                    if (r is not None
-                        and r != nullrev
-                        and r not in rl.filteredrevs)]
-        return [self._internalize(i) for i in ids]
-
-
 class revlogdag(revlogbaseddag):
     '''dag interface to a revlog'''