Show More
@@ -1169,17 +1169,18 b' def heads(repo, subset, x, order):' | |||||
1169 | if order == defineorder: |
|
1169 | if order == defineorder: | |
1170 | order = followorder |
|
1170 | order = followorder | |
1171 | inputset = getset(repo, fullreposet(repo), x, order=order) |
|
1171 | inputset = getset(repo, fullreposet(repo), x, order=order) | |
1172 | ps = set() |
|
1172 | wdirparents = None | |
1173 | cl = repo.changelog |
|
1173 | if node.wdirrev in inputset: | |
1174 | up = ps.update |
|
1174 | # a bit slower, but not common so good enough for now | |
1175 | parentrevs = cl.parentrevs |
|
1175 | wdirparents = [p.rev() for p in repo[None].parents()] | |
1176 | for r in inputset: |
|
1176 | inputset = set(inputset) | |
1177 | try: |
|
1177 | inputset.discard(node.wdirrev) | |
1178 | up(parentrevs(r)) |
|
1178 | heads = repo.changelog.headrevs(inputset) | |
1179 | except error.WdirUnsupported: |
|
1179 | if wdirparents is not None: | |
1180 | up(p.rev() for p in repo[r].parents()) |
|
1180 | heads.difference_update(wdirparents) | |
1181 |
|
|
1181 | heads.add(node.wdirrev) | |
1182 | return subset & (inputset - ps) |
|
1182 | heads = baseset(heads) | |
|
1183 | return subset & heads | |||
1183 |
|
1184 | |||
1184 | @predicate('hidden()', safe=True) |
|
1185 | @predicate('hidden()', safe=True) | |
1185 | def hidden(repo, subset, x): |
|
1186 | def hidden(repo, subset, x): |
@@ -1428,9 +1428,7 b' Test heads' | |||||
1428 | * set: |
|
1428 | * set: | |
1429 | <filteredset |
|
1429 | <filteredset | |
1430 | <baseset [9]>, |
|
1430 | <baseset [9]>, | |
1431 | <filteredset |
|
1431 | <baseset+ [7, 9]>> | |
1432 | <spanset+ 0:10>, |
|
|||
1433 | <not set([0, 1, 2, 3, 4, 5, 6, 8])>>> |
|
|||
1434 | 9 |
|
1432 | 9 | |
1435 |
|
1433 | |||
1436 | but should follow the order of the subset |
|
1434 | but should follow the order of the subset |
General Comments 0
You need to be logged in to leave comments.
Login now