##// END OF EJS Templates
revlog: use context ancestor instead of changelog ancestor...
Mads Kiilerich -
r20991:a05d6945 default
parent child Browse files
Show More
@@ -320,7 +320,7 b' def adds(repo, subset, x):'
320 320
321 321 def ancestor(repo, subset, x):
322 322 """``ancestor(*changeset)``
323 Greatest common ancestor of the changesets.
323 A greatest common ancestor of the changesets.
324 324
325 325 Accepts 0 or more changesets.
326 326 Will return empty list when passed no args.
@@ -332,18 +332,15 b' def ancestor(repo, subset, x):'
332 332 anc = None
333 333
334 334 # (getset(repo, rl, i) for i in l) generates a list of lists
335 rev = repo.changelog.rev
336 ancestor = repo.changelog.ancestor
337 node = repo.changelog.node
338 335 for revs in (getset(repo, rl, i) for i in l):
339 336 for r in revs:
340 337 if anc is None:
341 anc = r
338 anc = repo[r]
342 339 else:
343 anc = rev(ancestor(node(anc), node(r)))
344
345 if anc is not None and anc in subset:
346 return baseset([anc])
340 anc = anc.ancestor(repo[r])
341
342 if anc is not None and anc.rev() in subset:
343 return baseset([anc.rev()])
347 344 return baseset([])
348 345
349 346 def _ancestors(repo, subset, x, followfirst=False):
General Comments 0
You need to be logged in to leave comments. Login now