annotate tests/test-touch.t @ 1162:5c07f464981e stable

help: fix typo in help for 'obsolete' option added to import command
author Mike Edgar <adgar@google.com>
date Tue, 18 Nov 2014 20:27:53 -0500
parents 802a87359017
children 0c879e986ce4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
700
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
1
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
2 $ cat >> $HGRCPATH <<EOF
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
3 > [ui]
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
4 > logtemplate={rev}:{node|short} {desc}\n
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
5 > [defaults]
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
6 > amend=-d "0 0"
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
7 > [extensions]
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
8 > hgext.rebase=
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
9 > EOF
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
10 $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext/evolve.py" >> $HGRCPATH
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
11
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
12 $ hg init repo
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
13 $ cd repo
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
14 $ echo A > a
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
15 $ hg add a
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
16 $ hg commit -m a
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
17
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
18 Basic usage
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
19
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
20 $ hg log -G
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
21 @ 0:e93df3427f45 a
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
22
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
23 $ hg touch .
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
24 $ hg log -G
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
25 @ 1:[0-9a-f]{12} a (re)
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
26
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
27
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
28
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
29 Revive usage
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
30
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
31 $ echo A > b
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
32 $ hg add b
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
33 $ hg commit -m ab --amend
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
34 $ hg up --hidden 1
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
35 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
743
af74a5cdf96b conform to the Mercurial custom of lowercase messages
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 702
diff changeset
36 working directory parent is obsolete!
700
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
37 $ hg log -G
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
38 o 3:[0-9a-f]{12} ab (re)
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
39
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
40 @ 1:[0-9a-f]{12} a (re)
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
41
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
42 $ hg touch .
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
43 2 new divergent changesets
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
44 $ hg log -G
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
45 @ 4:[0-9a-f]{12} a (re)
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
46
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
47 o 3:[0-9a-f]{12} ab (re)
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
48
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
49 $ hg prune 3
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
50 1 changesets pruned
701
f752089479ce add a duplicate option in touch
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 700
diff changeset
51
f752089479ce add a duplicate option in touch
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 700
diff changeset
52 Duplicate
f752089479ce add a duplicate option in touch
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 700
diff changeset
53
f752089479ce add a duplicate option in touch
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 700
diff changeset
54 $ hg touch --duplicate .
f752089479ce add a duplicate option in touch
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 700
diff changeset
55 $ hg log -G
f752089479ce add a duplicate option in touch
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 700
diff changeset
56 @ 5:[0-9a-f]{12} a (re)
f752089479ce add a duplicate option in touch
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 700
diff changeset
57
f752089479ce add a duplicate option in touch
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 700
diff changeset
58 o 4:[0-9a-f]{12} a (re)
f752089479ce add a duplicate option in touch
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 700
diff changeset
59
702
b5a85a8909d3 touch: properly handle touching multiple changeset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 701
diff changeset
60
b5a85a8909d3 touch: properly handle touching multiple changeset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 701
diff changeset
61 Multiple touch
b5a85a8909d3 touch: properly handle touching multiple changeset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 701
diff changeset
62
b5a85a8909d3 touch: properly handle touching multiple changeset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 701
diff changeset
63 $ echo C > c
b5a85a8909d3 touch: properly handle touching multiple changeset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 701
diff changeset
64 $ hg add c
b5a85a8909d3 touch: properly handle touching multiple changeset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 701
diff changeset
65 $ hg commit -m c
b5a85a8909d3 touch: properly handle touching multiple changeset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 701
diff changeset
66 $ echo D > d
b5a85a8909d3 touch: properly handle touching multiple changeset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 701
diff changeset
67 $ hg add d
b5a85a8909d3 touch: properly handle touching multiple changeset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 701
diff changeset
68 $ hg commit -m d
b5a85a8909d3 touch: properly handle touching multiple changeset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 701
diff changeset
69 $ hg log -G
b5a85a8909d3 touch: properly handle touching multiple changeset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 701
diff changeset
70 @ 7:[0-9a-f]{12} d (re)
b5a85a8909d3 touch: properly handle touching multiple changeset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 701
diff changeset
71 |
b5a85a8909d3 touch: properly handle touching multiple changeset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 701
diff changeset
72 o 6:[0-9a-f]{12} c (re)
b5a85a8909d3 touch: properly handle touching multiple changeset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 701
diff changeset
73 |
b5a85a8909d3 touch: properly handle touching multiple changeset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 701
diff changeset
74 o 5:[0-9a-f]{12} a (re)
b5a85a8909d3 touch: properly handle touching multiple changeset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 701
diff changeset
75
b5a85a8909d3 touch: properly handle touching multiple changeset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 701
diff changeset
76 o 4:[0-9a-f]{12} a (re)
b5a85a8909d3 touch: properly handle touching multiple changeset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 701
diff changeset
77
b5a85a8909d3 touch: properly handle touching multiple changeset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 701
diff changeset
78 $ hg touch 6:7
b5a85a8909d3 touch: properly handle touching multiple changeset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 701
diff changeset
79 $ hg log -G
b5a85a8909d3 touch: properly handle touching multiple changeset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 701
diff changeset
80 @ 9:[0-9a-f]{12} d (re)
b5a85a8909d3 touch: properly handle touching multiple changeset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 701
diff changeset
81 |
b5a85a8909d3 touch: properly handle touching multiple changeset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 701
diff changeset
82 o 8:[0-9a-f]{12} c (re)
b5a85a8909d3 touch: properly handle touching multiple changeset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 701
diff changeset
83 |
b5a85a8909d3 touch: properly handle touching multiple changeset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 701
diff changeset
84 o 5:[0-9a-f]{12} a (re)
b5a85a8909d3 touch: properly handle touching multiple changeset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 701
diff changeset
85
b5a85a8909d3 touch: properly handle touching multiple changeset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 701
diff changeset
86 o 4:[0-9a-f]{12} a (re)
b5a85a8909d3 touch: properly handle touching multiple changeset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 701
diff changeset
87
b5a85a8909d3 touch: properly handle touching multiple changeset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 701
diff changeset
88
1151
802a87359017 test-touch: add a test for rename preservation after touch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 743
diff changeset
89 check move data kept after rebase on touch:
802a87359017 test-touch: add a test for rename preservation after touch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 743
diff changeset
90
802a87359017 test-touch: add a test for rename preservation after touch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 743
diff changeset
91 $ touch gna1
802a87359017 test-touch: add a test for rename preservation after touch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 743
diff changeset
92 $ hg commit -Am gna1
802a87359017 test-touch: add a test for rename preservation after touch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 743
diff changeset
93 adding gna1
802a87359017 test-touch: add a test for rename preservation after touch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 743
diff changeset
94 $ hg mv gna1 gna2
802a87359017 test-touch: add a test for rename preservation after touch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 743
diff changeset
95 $ hg commit -m move
802a87359017 test-touch: add a test for rename preservation after touch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 743
diff changeset
96 $ hg st -C --change=tip
802a87359017 test-touch: add a test for rename preservation after touch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 743
diff changeset
97 A gna2
802a87359017 test-touch: add a test for rename preservation after touch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 743
diff changeset
98 gna1
802a87359017 test-touch: add a test for rename preservation after touch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 743
diff changeset
99 R gna1
802a87359017 test-touch: add a test for rename preservation after touch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 743
diff changeset
100 $ hg up .^
802a87359017 test-touch: add a test for rename preservation after touch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 743
diff changeset
101 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
802a87359017 test-touch: add a test for rename preservation after touch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 743
diff changeset
102
802a87359017 test-touch: add a test for rename preservation after touch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 743
diff changeset
103 $ hg touch
802a87359017 test-touch: add a test for rename preservation after touch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 743
diff changeset
104 1 new unstable changesets
802a87359017 test-touch: add a test for rename preservation after touch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 743
diff changeset
105
802a87359017 test-touch: add a test for rename preservation after touch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 743
diff changeset
106 $ hg rebase -s 11 -d 12
802a87359017 test-touch: add a test for rename preservation after touch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 743
diff changeset
107 $ hg st -C --change=tip
802a87359017 test-touch: add a test for rename preservation after touch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 743
diff changeset
108 A gna2
802a87359017 test-touch: add a test for rename preservation after touch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 743
diff changeset
109 gna1
802a87359017 test-touch: add a test for rename preservation after touch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 743
diff changeset
110 R gna1