Mercurial > evolve
comparison tests/test-topic-dest.t @ 1870:8dd5200b4086
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.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Wed, 21 Oct 2015 01:12:32 +0200 |
parents | |
children | 58ef5699fb35 |
comparison
equal
deleted
inserted
replaced
1869:995617c7f2fc | 1870:8dd5200b4086 |
---|---|
1 $ . "$TESTDIR/testlib" | |
2 | |
3 $ hg init jungle | |
4 $ cd jungle | |
5 $ cat <<EOF >> .hg/hgrc | |
6 > [extensions] | |
7 > rebase= | |
8 > [phases] | |
9 > publish=false | |
10 > [ui] | |
11 > logtemplate = '{rev} ({topics}) {desc}\n' | |
12 > EOF | |
13 | |
14 $ for x in alpha beta gamma delta ; do | |
15 > echo file $x >> $x | |
16 > hg add $x | |
17 > hg ci -m "c_$x" | |
18 > done | |
19 | |
20 Test NGTip feature | |
21 ================== | |
22 | |
23 Simple linear case | |
24 | |
25 $ echo babar >> jungle | |
26 $ hg add jungle | |
27 $ hg ci -t elephant -m babar | |
28 | |
29 $ hg log -G | |
30 @ 4 (elephant) babar | |
31 | | |
32 o 3 () c_delta | |
33 | | |
34 o 2 () c_gamma | |
35 | | |
36 o 1 () c_beta | |
37 | | |
38 o 0 () c_alpha | |
39 | |
40 $ hg log -r 'ngtip(.)' | |
41 3 () c_delta | |
42 | |
43 | |
44 multiple heads with topic | |
45 | |
46 $ hg up "desc('c_beta')" | |
47 0 files updated, 0 files merged, 3 files removed, 0 files unresolved | |
48 $ echo zephir >> jungle | |
49 $ hg add jungle | |
50 $ hg ci -t monkey -m zephir | |
51 created new head | |
52 $ hg log -G | |
53 @ 5 (monkey) zephir | |
54 | | |
55 | o 4 (elephant) babar | |
56 | | | |
57 | o 3 () c_delta | |
58 | | | |
59 | o 2 () c_gamma | |
60 |/ | |
61 o 1 () c_beta | |
62 | | |
63 o 0 () c_alpha | |
64 | |
65 $ hg log -r 'ngtip(.)' | |
66 3 () c_delta | |
67 | |
68 one of the head is a valid tip | |
69 | |
70 $ hg up "desc('c_delta')" | |
71 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
72 $ echo epsilon >> epsilon | |
73 $ hg add epsilon | |
74 $ hg ci -m "c_epsilon" | |
75 created new head | |
76 $ hg log -G | |
77 @ 6 () c_epsilon | |
78 | | |
79 | o 5 (monkey) zephir | |
80 | | | |
81 +---o 4 (elephant) babar | |
82 | | | |
83 o | 3 () c_delta | |
84 | | | |
85 o | 2 () c_gamma | |
86 |/ | |
87 o 1 () c_beta | |
88 | | |
89 o 0 () c_alpha | |
90 | |
91 $ hg log -r 'ngtip(.)' | |
92 6 () c_epsilon | |
93 |