comparison tests/test-command-template.out @ 9536:f04d17912441

cmdutil: templating keywords latesttag and latesttagdistance This can be used for referring to revisions in a reasonable meaningful, stable and monotonically increasing way, suitable for releases or builds directly from a repository. The latest tag is found by searching through untagged ancestors and finding the latest tagged ancestor based on tag date. The distance is found from the length of the longest path to the tagged revision. For example: hg log -l1 --template '{latesttag}+{latesttagdistance}\n' can return 1.3.1+197 This is mostly work by Gilles Moris <gilles.moris@free.fr>
author Mads Kiilerich <mads@kiilerich.com>
date Sat, 03 Oct 2009 18:31:20 +0200
parents b24290c72a1d
children 2c7ea49d2512 8ebb34b0f6f7
comparison
equal deleted inserted replaced
9535:75d290db2df6 9536:f04d17912441
670 1e4e1b8f71e0 670 1e4e1b8f71e0
671 # debug 671 # debug
672 1e4e1b8f71e05681d422154f5421e385fec3454f 672 1e4e1b8f71e05681d422154f5421e385fec3454f
673 # error on syntax 673 # error on syntax
674 abort: t:3: unmatched quotes 674 abort: t:3: unmatched quotes
675 # latesttag
676 adding file
677 adding head1
678 adding head2
679 created new head
680 # No tag set
681 5: null+5
682 4: null+4
683 3: null+3
684 2: null+3
685 1: null+2
686 0: null+1
687 # one common tag: longuest path wins
688 6: t1+4
689 5: t1+3
690 4: t1+2
691 3: t1+1
692 2: t1+1
693 1: t1+0
694 0: null+1
695 # one ancestor tag: more recent wins
696 7: t2+3
697 6: t2+2
698 5: t2+1
699 4: t1+2
700 3: t1+1
701 2: t2+0
702 1: t1+0
703 0: null+1
704 # two branch tags: more recent wins
705 8: t3+5
706 7: t3+4
707 6: t3+3
708 5: t3+2
709 4: t3+1
710 3: t3+0
711 2: t2+0
712 1: t1+0
713 0: null+1
714 # merged tag overrides
715 10: t5+5
716 9: t5+4
717 8: t5+3
718 7: t5+2
719 6: t5+1
720 5: t5+0
721 4: at3:t3+1
722 3: at3:t3+0
723 2: t2+0
724 1: t1+0
725 0: null+1
675 # done 726 # done