519 |
519 |
520 overlapping set |
520 overlapping set |
521 |
521 |
522 $ fileset "revs('1+2', modified())" |
522 $ fileset "revs('1+2', modified())" |
523 b2 |
523 b2 |
|
524 |
|
525 test 'status(...)' |
|
526 ================= |
|
527 |
|
528 Simple case |
|
529 ----------- |
|
530 |
|
531 $ fileset "status(3, 4, added())" |
|
532 .hgsub |
|
533 .hgsubstate |
|
534 |
|
535 use rev to restrict matched file |
|
536 ----------------------------------------- |
|
537 |
|
538 $ hg status --removed --rev 0 --rev 1 |
|
539 R a2 |
|
540 $ fileset "status(0, 1, removed())" |
|
541 a2 |
|
542 $ fileset "* and status(0, 1, removed())" |
|
543 $ fileset -r 4 "status(0, 1, removed())" |
|
544 a2 |
|
545 $ fileset -r 4 "* and status(0, 1, removed())" |
|
546 $ fileset "revs('4', * and status(0, 1, removed()))" |
|
547 $ fileset "revs('0', * and status(0, 1, removed()))" |
|
548 a2 |
|
549 |
|
550 check wdir() |
|
551 ------------ |
|
552 |
|
553 $ hg status --removed --rev 4 |
|
554 R con.xml |
|
555 $ fileset "status(4, 'wdir()', removed())" |
|
556 con.xml |
|
557 |
|
558 $ hg status --removed --rev 2 |
|
559 R a2 |
|
560 $ fileset "status('2', 'wdir()', removed())" |
|
561 a2 |
|
562 |
|
563 test backward status |
|
564 -------------------- |
|
565 |
|
566 $ hg status --removed --rev 0 --rev 4 |
|
567 R a2 |
|
568 $ hg status --added --rev 4 --rev 0 |
|
569 A a2 |
|
570 $ fileset "status(4, 0, added())" |
|
571 a2 |
|
572 |
|
573 test cross branch status |
|
574 ------------------------ |
|
575 |
|
576 $ hg status --added --rev 1 --rev 2 |
|
577 A a2 |
|
578 $ fileset "status(1, 2, added())" |
|
579 a2 |
|
580 |
|
581 test with multi revs revset |
|
582 --------------------------- |
|
583 $ hg status --added --rev 0:1 --rev 3:4 |
|
584 A .hgsub |
|
585 A .hgsubstate |
|
586 A 1k |
|
587 A 2k |
|
588 A b2link |
|
589 A bin |
|
590 A c1 |
|
591 A con.xml |
|
592 $ fileset "status('0:1', '3:4', added())" |
|
593 .hgsub |
|
594 .hgsubstate |
|
595 1k |
|
596 2k |
|
597 b2link |
|
598 bin |
|
599 c1 |
|
600 con.xml |
|
601 |
|
602 tests with empty value |
|
603 ---------------------- |
|
604 |
|
605 Fully empty revset |
|
606 |
|
607 $ fileset "status('', '4', added())" |
|
608 hg: parse error: first argument to status must be a revision |
|
609 [255] |
|
610 $ fileset "status('2', '', added())" |
|
611 hg: parse error: second argument to status must be a revision |
|
612 [255] |
|
613 |
|
614 Empty revset will error at the revset layer |
|
615 |
|
616 $ fileset "status(' ', '4', added())" |
|
617 hg: parse error at 1: not a prefix: end |
|
618 [255] |
|
619 $ fileset "status('2', ' ', added())" |
|
620 hg: parse error at 1: not a prefix: end |
|
621 [255] |