##// END OF EJS Templates
revlog: accept a revs argument in `headrevs`...
Boris Feld -
r41311:1421d048 default
parent child Browse files
Show More
@@ -347,8 +347,8 b' class changelog(revlog.revlog):'
347 def reachableroots(self, minroot, heads, roots, includepath=False):
347 def reachableroots(self, minroot, heads, roots, includepath=False):
348 return self.index.reachableroots2(minroot, heads, roots, includepath)
348 return self.index.reachableroots2(minroot, heads, roots, includepath)
349
349
350 def headrevs(self):
350 def headrevs(self, revs=None):
351 if self.filteredrevs:
351 if revs is None and self.filteredrevs:
352 try:
352 try:
353 return self.index.headrevsfiltered(self.filteredrevs)
353 return self.index.headrevsfiltered(self.filteredrevs)
354 # AttributeError covers non-c-extension environments and
354 # AttributeError covers non-c-extension environments and
@@ -356,7 +356,7 b' class changelog(revlog.revlog):'
356 except AttributeError:
356 except AttributeError:
357 return self._headrevs()
357 return self._headrevs()
358
358
359 return super(changelog, self).headrevs()
359 return super(changelog, self).headrevs(revs)
360
360
361 def strip(self, *args, **kwargs):
361 def strip(self, *args, **kwargs):
362 # XXX make something better than assert
362 # XXX make something better than assert
@@ -1102,11 +1102,13 b' class revlog(object):'
1102 assert heads
1102 assert heads
1103 return (orderedout, roots, heads)
1103 return (orderedout, roots, heads)
1104
1104
1105 def headrevs(self):
1105 def headrevs(self, revs=None):
1106 try:
1106 if revs is None:
1107 return self.index.headrevs()
1107 try:
1108 except AttributeError:
1108 return self.index.headrevs()
1109 return self._headrevs()
1109 except AttributeError:
1110 return self._headrevs()
1111 return dagop.headrevs(revs, self.parentrevs)
1110
1112
1111 def computephases(self, roots):
1113 def computephases(self, roots):
1112 return self.index.computephasesmapsets(roots)
1114 return self.index.computephasesmapsets(roots)
General Comments 0
You need to be logged in to leave comments. Login now