##// END OF EJS Templates
revset: fix sorting key of wdir revision...
Yuya Nishihara -
r46293:b90d7e7f default
parent child Browse files
Show More
@@ -2287,13 +2287,13 b' def roots(repo, subset, x):'
2287 2287
2288 2288
2289 2289 _sortkeyfuncs = {
2290 b'rev': lambda c: c.rev(),
2290 b'rev': scmutil.intrev,
2291 2291 b'branch': lambda c: c.branch(),
2292 2292 b'desc': lambda c: c.description(),
2293 2293 b'user': lambda c: c.user(),
2294 2294 b'author': lambda c: c.user(),
2295 2295 b'date': lambda c: c.date()[0],
2296 b'node': lambda c: c.node(),
2296 b'node': scmutil.binnode,
2297 2297 }
2298 2298
2299 2299
@@ -2899,6 +2899,29 b' test sorting by multiple keys including '
2899 2899 0 b12 m111 u112 111 10800
2900 2900 2 b111 m11 u12 111 3600
2901 2901
2902 sort including wdir (rev/-rev has fast path):
2903
2904 $ hg log -r 'sort(. + wdir(), rev)' -T '{rev}\n'
2905 4
2906 2147483647
2907 $ hg log -r 'sort(. + wdir(), -rev)' -T '{rev}\n'
2908 2147483647
2909 4
2910
2911 $ hg log -r 'sort(. + wdir(), "branch rev")' -T '{rev}\n'
2912 4
2913 2147483647
2914 $ hg log -r 'sort(. + wdir(), "branch -rev")' -T '{rev}\n'
2915 2147483647
2916 4
2917
2918 $ hg log -r 'sort(. + wdir(), node)' -T '{node}\n'
2919 ec7c1c90b589ade8603d5fb619dc6c25173a723f
2920 ffffffffffffffffffffffffffffffffffffffff
2921 $ hg log -r 'sort(. + wdir(), -node)' -T '{node}\n'
2922 ffffffffffffffffffffffffffffffffffffffff
2923 ec7c1c90b589ade8603d5fb619dc6c25173a723f
2924
2902 2925 toposort prioritises graph branches
2903 2926
2904 2927 $ hg up 2
General Comments 0
You need to be logged in to leave comments. Login now