Mercurial > hg-stable
comparison tests/test-revset.t @ 24204:d2de20e1451f
revset: extend fullreposet to make "null" revision magically appears in set
As per fullreposet.__and__, it can omit the range check of rev. Therefore,
"null" revision is accepted automagically.
It seems this can fix many query results involving null symbol. Originally,
the simplest "(null)" query did fail if there were hidden revisions. Tests
are randomly chosen.
fullreposet mimics the behavior of localrepo, where "null" revision is not
listed but contained.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Thu, 08 Jan 2015 23:05:45 +0900 |
parents | 2de9ee016425 |
children | fe195d41f7d2 |
comparison
equal
deleted
inserted
replaced
24203:33c7a94d4dd0 | 24204:d2de20e1451f |
---|---|
476 $ log 'rev(tip)' | 476 $ log 'rev(tip)' |
477 hg: parse error: rev expects a number | 477 hg: parse error: rev expects a number |
478 [255] | 478 [255] |
479 | 479 |
480 Test null revision | 480 Test null revision |
481 $ log '(null)' | |
482 -1 | |
483 $ log '(null:0)' | |
484 -1 | |
485 0 | |
486 $ log '(0:null)' | |
487 0 | |
488 -1 | |
489 $ log 'null::0' | |
490 -1 | |
491 0 | |
492 $ log 'null:tip - 0:' | |
493 -1 | |
494 $ log 'null: and null::' | head -1 | |
495 -1 | |
496 $ log 'null: or 0:' | head -2 | |
497 -1 | |
498 0 | |
481 $ log 'ancestors(null)' | 499 $ log 'ancestors(null)' |
500 -1 | |
501 $ log 'reverse(null:)' | tail -2 | |
502 0 | |
503 -1 | |
504 $ log 'first(null:)' | |
505 -1 | |
506 $ log 'min(null:)' | |
482 -1 | 507 -1 |
483 $ log 'tip:null and all()' | tail -2 | 508 $ log 'tip:null and all()' | tail -2 |
484 1 | 509 1 |
485 0 | 510 0 |
486 | 511 |