##// END OF EJS Templates
revset: make head() honor order of subset...
Martin von Zweigbergk -
r29408:785cadec default
parent child Browse files
Show More
@@ -1147,9 +1147,7 b' def head(repo, subset, x):'
1147 cl = repo.changelog
1147 cl = repo.changelog
1148 for ls in repo.branchmap().itervalues():
1148 for ls in repo.branchmap().itervalues():
1149 hs.update(cl.rev(h) for h in ls)
1149 hs.update(cl.rev(h) for h in ls)
1150 # XXX We should combine with subset first: 'subset & baseset(...)'. This is
1150 return subset & baseset(hs)
1151 # necessary to ensure we preserve the order in subset.
1152 return baseset(hs) & subset
1153
1151
1154 @predicate('heads(set)', safe=True)
1152 @predicate('heads(set)', safe=True)
1155 def heads(repo, subset, x):
1153 def heads(repo, subset, x):
@@ -952,13 +952,12 b' ordering defined by it.'
952 1
952 1
953 0
953 0
954
954
955 'head()' combines sets in wrong order:
955 'head()' combines sets in right order:
956
956
957 $ log '2:0 & head()'
957 $ log '2:0 & head()'
958 0
958 2
959 1
959 1
960 2
960 0
961 BROKEN: should be '2 1 0'
962
961
963 'a + b', which is optimized to '_list(a b)', should take the ordering of
962 'a + b', which is optimized to '_list(a b)', should take the ordering of
964 the left expression:
963 the left expression:
General Comments 0
You need to be logged in to leave comments. Login now