##// END OF EJS Templates
revset: leverage orset() to flatten ancestor() arguments...
Yuya Nishihara -
r38508:626d29c6 default
parent child Browse files
Show More
@@ -203,6 +203,8 b' def _orsetlist(repo, subset, xs, order):'
203 203
204 204 def orset(repo, subset, x, order):
205 205 xs = getlist(x)
206 if not xs:
207 return baseset()
206 208 if order == followorder:
207 209 # slow path to take the subset order
208 210 return subset & _orsetlist(repo, fullreposet(repo), xs, anyorder)
@@ -309,13 +311,8 b' def ancestor(repo, subset, x):'
309 311 Will return empty list when passed no args.
310 312 Greatest common ancestor of a single changeset is that changeset.
311 313 """
312 l = getlist(x)
313 rl = fullreposet(repo)
314 314 anc = None
315
316 # (getset(repo, rl, i) for i in l) generates a list of lists
317 for revs in (getset(repo, rl, i) for i in l):
318 for r in revs:
315 for r in orset(repo, fullreposet(repo), x, order=anyorder):
319 316 if anc is None:
320 317 anc = repo[r]
321 318 else:
General Comments 0
You need to be logged in to leave comments. Login now