D4325: dagutil: remove unused classes

indygreg (Gregory Szorc) phabricator at mercurial-scm.org
Sat Aug 18 04:07:19 EDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rHG4cf3f54cc8e7: dagutil: remove unused classes (authored by indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D4325?vs=10419&id=10446

REVISION DETAIL
  https://phab.mercurial-scm.org/D4325

AFFECTED FILES
  mercurial/dagutil.py

CHANGE DETAILS

diff --git a/mercurial/dagutil.py b/mercurial/dagutil.py
--- a/mercurial/dagutil.py
+++ b/mercurial/dagutil.py
@@ -10,56 +10,11 @@
 
 from .node import nullrev
 
-class basedag(object):
-    '''generic interface for DAGs
-
-    terms:
-    "ix" (short for index) identifies a nodes internally,
-    "id" identifies one externally.
-
-    All params are ixs unless explicitly suffixed otherwise.
-    Pluralized params are lists or sets.
-    '''
-
-    def parents(self, ix):
-        '''list of parents ixs of ix'''
-        raise NotImplementedError
-
-    def headsetofconnecteds(self, ixs):
-        '''
-        subset of connected list of ixs so that no node has a descendant in it
-
-        By "connected list" we mean that if an ancestor and a descendant are in
-        the list, then so is at least one path connecting them.
-        '''
-        raise NotImplementedError
-
-class genericdag(basedag):
-    '''generic implementations for DAGs'''
-
-    def headsetofconnecteds(self, ixs):
-        hds = set(ixs)
-        if not hds:
-            return hds
-        for n in ixs:
-            for p in self.parents(n):
-                hds.discard(p)
-        assert hds
-        return hds
-
-
-class revlogbaseddag(basedag):
-    '''generic dag interface to a revlog'''
-
-    def __init__(self, revlog):
-        basedag.__init__(self)
-        self._revlog = revlog
-
-class revlogdag(revlogbaseddag):
+class revlogdag(object):
     '''dag interface to a revlog'''
 
     def __init__(self, revlog):
-        revlogbaseddag.__init__(self, revlog)
+        self._revlog = revlog
 
     def parents(self, ix):
         rlog = self._revlog



To: indygreg, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list