Show More
@@ -311,14 +311,15 b' def ancestor(repo, subset, x):' | |||||
311 | Will return empty list when passed no args. |
|
311 | Will return empty list when passed no args. | |
312 | Greatest common ancestor of a single changeset is that changeset. |
|
312 | Greatest common ancestor of a single changeset is that changeset. | |
313 | """ |
|
313 | """ | |
314 | anc = None |
|
314 | reviter = iter(orset(repo, fullreposet(repo), x, order=anyorder)) | |
315 | for r in orset(repo, fullreposet(repo), x, order=anyorder): |
|
315 | try: | |
316 | if anc is None: |
|
316 | anc = repo[next(reviter)] | |
317 | anc = repo[r] |
|
317 | except StopIteration: | |
318 | else: |
|
318 | return baseset() | |
319 | anc = anc.ancestor(repo[r]) |
|
319 | for r in reviter: | |
|
320 | anc = anc.ancestor(repo[r]) | |||
320 |
|
321 | |||
321 |
if |
|
322 | if anc.rev() in subset: | |
322 | return baseset([anc.rev()]) |
|
323 | return baseset([anc.rev()]) | |
323 | return baseset() |
|
324 | return baseset() | |
324 |
|
325 |
General Comments 0
You need to be logged in to leave comments.
Login now