##// END OF EJS Templates
dagutil: remove nodeset()...
Gregory Szorc -
r39200:01ab7f65 default
parent child Browse files
Show More
@@ -24,10 +24,6 b' class basedag(object):'
24 def __init__(self):
24 def __init__(self):
25 self._inverse = None
25 self._inverse = None
26
26
27 def nodeset(self):
28 '''set of all node ixs'''
29 raise NotImplementedError
30
31 def heads(self):
27 def heads(self):
32 '''list of head ixs'''
28 '''list of head ixs'''
33 raise NotImplementedError
29 raise NotImplementedError
@@ -92,14 +88,10 b' class genericdag(basedag):'
92 class revlogbaseddag(basedag):
88 class revlogbaseddag(basedag):
93 '''generic dag interface to a revlog'''
89 '''generic dag interface to a revlog'''
94
90
95 def __init__(self, revlog, nodeset):
91 def __init__(self, revlog):
96 basedag.__init__(self)
92 basedag.__init__(self)
97 self._revlog = revlog
93 self._revlog = revlog
98 self._heads = None
94 self._heads = None
99 self._nodeset = nodeset
100
101 def nodeset(self):
102 return self._nodeset
103
95
104 def heads(self):
96 def heads(self):
105 if self._heads is None:
97 if self._heads is None:
@@ -110,7 +102,7 b' class revlogdag(revlogbaseddag):'
110 '''dag interface to a revlog'''
102 '''dag interface to a revlog'''
111
103
112 def __init__(self, revlog, localsubset=None):
104 def __init__(self, revlog, localsubset=None):
113 revlogbaseddag.__init__(self, revlog, set(revlog))
105 revlogbaseddag.__init__(self, revlog)
114 self._heads = localsubset
106 self._heads = localsubset
115
107
116 def _getheads(self):
108 def _getheads(self):
@@ -204,7 +196,7 b' class inverserevlogdag(revlogbaseddag, g'
204 '''inverse of an existing revlog dag; see revlogdag.inverse()'''
196 '''inverse of an existing revlog dag; see revlogdag.inverse()'''
205
197
206 def __init__(self, orig):
198 def __init__(self, orig):
207 revlogbaseddag.__init__(self, orig._revlog, orig._nodeset)
199 revlogbaseddag.__init__(self, orig._revlog)
208 self._orig = orig
200 self._orig = orig
209 self._children = {}
201 self._children = {}
210 self._roots = []
202 self._roots = []
General Comments 0
You need to be logged in to leave comments. Login now