1127 cl = repo.changelog |
1127 cl = repo.changelog |
1128 for ls in repo.branchmap().itervalues(): |
1128 for ls in repo.branchmap().itervalues(): |
1129 hs.update(cl.rev(h) for h in ls) |
1129 hs.update(cl.rev(h) for h in ls) |
1130 return subset & baseset(hs) |
1130 return subset & baseset(hs) |
1131 |
1131 |
1132 @predicate('heads(set)', safe=True) |
1132 @predicate('heads(set)', safe=True, takeorder=True) |
1133 def heads(repo, subset, x): |
1133 def heads(repo, subset, x, order): |
1134 """Members of set with no children in set. |
1134 """Members of set with no children in set. |
1135 """ |
1135 """ |
1136 s = getset(repo, subset, x) |
1136 # argument set should never define order |
|
1137 if order == defineorder: |
|
1138 order = followorder |
|
1139 s = getset(repo, subset, x, order=order) |
1137 ps = parents(repo, subset, x) |
1140 ps = parents(repo, subset, x) |
1138 return s - ps |
1141 return s - ps |
1139 |
1142 |
1140 @predicate('hidden()', safe=True) |
1143 @predicate('hidden()', safe=True) |
1141 def hidden(repo, subset, x): |
1144 def hidden(repo, subset, x): |