topic: introduce a 'ngtip' concept
The concept is to be massively used in naming and default destination logic.
The name is horrible so that people find a better one.
$ . "$TESTDIR/testlib"
$ hg init jungle
$ cd jungle
$ cat <<EOF >> .hg/hgrc
> [extensions]
> rebase=
> [phases]
> publish=false
> [ui]
> logtemplate = '{rev} ({topics}) {desc}\n'
> EOF
$ for x in alpha beta gamma delta ; do
> echo file $x >> $x
> hg add $x
> hg ci -m "c_$x"
> done
Test NGTip feature
==================
Simple linear case
$ echo babar >> jungle
$ hg add jungle
$ hg ci -t elephant -m babar
$ hg log -G
@ 4 (elephant) babar
|
o 3 () c_delta
|
o 2 () c_gamma
|
o 1 () c_beta
|
o 0 () c_alpha
$ hg log -r 'ngtip(.)'
3 () c_delta
multiple heads with topic
$ hg up "desc('c_beta')"
0 files updated, 0 files merged, 3 files removed, 0 files unresolved
$ echo zephir >> jungle
$ hg add jungle
$ hg ci -t monkey -m zephir
created new head
$ hg log -G
@ 5 (monkey) zephir
|
| o 4 (elephant) babar
| |
| o 3 () c_delta
| |
| o 2 () c_gamma
|/
o 1 () c_beta
|
o 0 () c_alpha
$ hg log -r 'ngtip(.)'
3 () c_delta
one of the head is a valid tip
$ hg up "desc('c_delta')"
2 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ echo epsilon >> epsilon
$ hg add epsilon
$ hg ci -m "c_epsilon"
created new head
$ hg log -G
@ 6 () c_epsilon
|
| o 5 (monkey) zephir
| |
+---o 4 (elephant) babar
| |
o | 3 () c_delta
| |
o | 2 () c_gamma
|/
o 1 () c_beta
|
o 0 () c_alpha
$ hg log -r 'ngtip(.)'
6 () c_epsilon