Show More
@@ -1169,17 +1169,18 b' def heads(repo, subset, x, order):' | |||
|
1169 | 1169 | if order == defineorder: |
|
1170 | 1170 | order = followorder |
|
1171 | 1171 | inputset = getset(repo, fullreposet(repo), x, order=order) |
|
1172 | ps = set() | |
|
1173 | cl = repo.changelog | |
|
1174 | up = ps.update | |
|
1175 | parentrevs = cl.parentrevs | |
|
1176 | for r in inputset: | |
|
1177 | try: | |
|
1178 | up(parentrevs(r)) | |
|
1179 | except error.WdirUnsupported: | |
|
1180 | up(p.rev() for p in repo[r].parents()) | |
|
1181 |
|
|
|
1182 | return subset & (inputset - ps) | |
|
1172 | wdirparents = None | |
|
1173 | if node.wdirrev in inputset: | |
|
1174 | # a bit slower, but not common so good enough for now | |
|
1175 | wdirparents = [p.rev() for p in repo[None].parents()] | |
|
1176 | inputset = set(inputset) | |
|
1177 | inputset.discard(node.wdirrev) | |
|
1178 | heads = repo.changelog.headrevs(inputset) | |
|
1179 | if wdirparents is not None: | |
|
1180 | heads.difference_update(wdirparents) | |
|
1181 | heads.add(node.wdirrev) | |
|
1182 | heads = baseset(heads) | |
|
1183 | return subset & heads | |
|
1183 | 1184 | |
|
1184 | 1185 | @predicate('hidden()', safe=True) |
|
1185 | 1186 | def hidden(repo, subset, x): |
General Comments 0
You need to be logged in to leave comments.
Login now