##// END OF EJS Templates
revset: fix crash on empty sort key...
Yuya Nishihara -
r29362:ec75d77d default
parent child Browse files
Show More
@@ -1890,6 +1890,8 b' def sort(repo, subset, x):'
1890 'topo.firstbranch can only be used when using the topo sort '
1890 'topo.firstbranch can only be used when using the topo sort '
1891 'key'))
1891 'key'))
1892
1892
1893 if not keys:
1894 return revs
1893 if keys == ["rev"]:
1895 if keys == ["rev"]:
1894 revs.sort()
1896 revs.sort()
1895 return revs
1897 return revs
@@ -962,6 +962,13 b' test sorting two sorted collections in d'
962 6
962 6
963 2
963 2
964
964
965 test empty sort key which is noop
966
967 $ log 'sort(0 + 2 + 1, "")'
968 0
969 2
970 1
971
965 test invalid sort keys
972 test invalid sort keys
966
973
967 $ log 'sort(all(), -invalid)'
974 $ log 'sort(all(), -invalid)'
General Comments 0
You need to be logged in to leave comments. Login now