Mercurial > hg
diff tests/test-revset.t @ 45701:b90d7e7f39db
revset: fix sorting key of wdir revision
It would go wrong on Python 2, and would crash on Python 3.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Fri, 09 Oct 2020 19:19:10 +0900 |
parents | 17a12f53dd72 |
children | edfc5820aae7 |
line wrap: on
line diff
--- a/tests/test-revset.t Wed Sep 09 16:18:26 2020 +0900 +++ b/tests/test-revset.t Fri Oct 09 19:19:10 2020 +0900 @@ -2899,6 +2899,29 @@ 0 b12 m111 u112 111 10800 2 b111 m11 u12 111 3600 + sort including wdir (rev/-rev has fast path): + + $ hg log -r 'sort(. + wdir(), rev)' -T '{rev}\n' + 4 + 2147483647 + $ hg log -r 'sort(. + wdir(), -rev)' -T '{rev}\n' + 2147483647 + 4 + + $ hg log -r 'sort(. + wdir(), "branch rev")' -T '{rev}\n' + 4 + 2147483647 + $ hg log -r 'sort(. + wdir(), "branch -rev")' -T '{rev}\n' + 2147483647 + 4 + + $ hg log -r 'sort(. + wdir(), node)' -T '{node}\n' + ec7c1c90b589ade8603d5fb619dc6c25173a723f + ffffffffffffffffffffffffffffffffffffffff + $ hg log -r 'sort(. + wdir(), -node)' -T '{node}\n' + ffffffffffffffffffffffffffffffffffffffff + ec7c1c90b589ade8603d5fb619dc6c25173a723f + toposort prioritises graph branches $ hg up 2