##// END OF EJS Templates
dagop: unnest inner generator of revdescendants()...
Yuya Nishihara -
r33073:b04cf7a6 default
parent child Browse files
Show More
@@ -84,14 +84,12 b' def revancestors(repo, revs, followfirst'
84 gen = _genrevancestors(repo, revs, followfirst, startdepth, stopdepth)
84 gen = _genrevancestors(repo, revs, followfirst, startdepth, stopdepth)
85 return generatorset(gen, iterasc=False)
85 return generatorset(gen, iterasc=False)
86
86
87 def revdescendants(repo, revs, followfirst):
87 def _genrevdescendants(repo, revs, followfirst):
88 """Like revlog.descendants() but supports followfirst."""
89 if followfirst:
88 if followfirst:
90 cut = 1
89 cut = 1
91 else:
90 else:
92 cut = None
91 cut = None
93
92
94 def iterate():
95 cl = repo.changelog
93 cl = repo.changelog
96 # XXX this should be 'parentset.min()' assuming 'parentset' is a
94 # XXX this should be 'parentset.min()' assuming 'parentset' is a
97 # smartset (and if it is not, it should.)
95 # smartset (and if it is not, it should.)
@@ -111,7 +109,10 b' def revdescendants(repo, revs, followfir'
111 yield i
109 yield i
112 break
110 break
113
111
114 return generatorset(iterate(), iterasc=True)
112 def revdescendants(repo, revs, followfirst):
113 """Like revlog.descendants() but supports followfirst."""
114 gen = _genrevdescendants(repo, revs, followfirst)
115 return generatorset(gen, iterasc=True)
115
116
116 def _reachablerootspure(repo, minroot, roots, heads, includepath):
117 def _reachablerootspure(repo, minroot, roots, heads, includepath):
117 """return (heads(::<roots> and ::<heads>))
118 """return (heads(::<roots> and ::<heads>))
General Comments 0
You need to be logged in to leave comments. Login now