comparison tests/test-touch.t @ 3818:f8677cb11dcb mercurial-4.3

test-compat: merge mercurial-4.4 into mercurial-4.3
author Pulkit Goyal <7895pulkit@gmail.com>
date Fri, 08 Jun 2018 22:52:53 +0530
parents 98941c28f3e2
children 7a5c3175015e 537fd9a86c06
comparison
equal deleted inserted replaced
3817:5ca297e78f2c 3818:f8677cb11dcb
16 $ hg commit -m a 16 $ hg commit -m a
17 17
18 Basic usage 18 Basic usage
19 19
20 $ hg log -G 20 $ hg log -G
21 @ 0:[0-9a-f]{12} a (re) 21 @ 0:e93df3427f45 a
22 22
23 $ hg touch . 23 $ hg touch .
24 $ hg log -G 24 $ hg log -G
25 @ 1:[0-9a-f]{12} a (re) 25 @ 1:[0-9a-f]{12} a (re)
26 26
34 $ hg up --hidden 1 34 $ hg up --hidden 1
35 0 files updated, 0 files merged, 1 files removed, 0 files unresolved 35 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
36 working directory parent is obsolete! (*) (glob) 36 working directory parent is obsolete! (*) (glob)
37 (use 'hg evolve' to update to its successor: *) (glob) 37 (use 'hg evolve' to update to its successor: *) (glob)
38 $ hg log -G 38 $ hg log -G
39 o 2:[0-9a-f]{12} ab (re) 39 o 3:[0-9a-f]{12} ab (re)
40 40
41 @ 1:[0-9a-f]{12} a (re) 41 @ 1:[0-9a-f]{12} a (re)
42 42
43 $ hg touch . 43 $ hg touch .
44 [1] a 44 [1] a
45 reviving this changeset will create divergence unless you make a duplicate. 45 reviving this changeset will create divergence unless you make a duplicate.
46 (a)llow divergence or (d)uplicate the changeset? a 46 (a)llow divergence or (d)uplicate the changeset? a
47 2 new content-divergent changesets 47 2 new divergent changesets
48 $ hg log -G 48 $ hg log -G
49 @ 3:[0-9a-f]{12} a (re) 49 @ 4:[0-9a-f]{12} a (re)
50 50
51 o 2:[0-9a-f]{12} ab (re) 51 o 3:[0-9a-f]{12} ab (re)
52 52
53 $ hg prune 3 53 $ hg prune 3
54 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
55 working directory now at 000000000000
56 1 changesets pruned 54 1 changesets pruned
57 55
58 Duplicate 56 Duplicate
59 57
60 $ hg touch --duplicate . 58 $ hg touch --duplicate .
61 $ hg log -G 59 $ hg log -G
62 @ 4:[0-9a-f]{12} (re) 60 @ 5:[0-9a-f]{12} a (re)
63 61
64 o 2:[0-9a-f]{12} ab (re) 62 o 4:[0-9a-f]{12} a (re)
65 63
66 64
67 Multiple touch 65 Multiple touch
68 66
69 $ echo C > c 67 $ echo C > c
71 $ hg commit -m c 69 $ hg commit -m c
72 $ echo D > d 70 $ echo D > d
73 $ hg add d 71 $ hg add d
74 $ hg commit -m d 72 $ hg commit -m d
75 $ hg log -G 73 $ hg log -G
76 @ 6:[0-9a-f]{12} d (re) 74 @ 7:[0-9a-f]{12} d (re)
77 | 75 |
78 o 5:[0-9a-f]{12} c (re) 76 o 6:[0-9a-f]{12} c (re)
79 | 77 |
80 o 4:[0-9a-f]{12} (re) 78 o 5:[0-9a-f]{12} a (re)
81 79
82 o 2:[0-9a-f]{12} ab (re) 80 o 4:[0-9a-f]{12} a (re)
83 81
84 $ hg touch .^:. 82 $ hg touch 6:7
85 $ hg log -G 83 $ hg log -G
86 @ 8:[0-9a-f]{12} d (re) 84 @ 9:[0-9a-f]{12} d (re)
87 | 85 |
88 o 7:[0-9a-f]{12} c (re) 86 o 8:[0-9a-f]{12} c (re)
89 | 87 |
90 o 4:[0-9a-f]{12} (re) 88 o 5:[0-9a-f]{12} a (re)
91 89
92 o 2:[0-9a-f]{12} ab (re) 90 o 4:[0-9a-f]{12} a (re)
93 91
94 92
95 check move data kept after rebase on touch: 93 check move data kept after rebase on touch:
96 94
97 $ touch gna1 95 $ touch gna1
105 R gna1 103 R gna1
106 $ hg up .^ 104 $ hg up .^
107 1 files updated, 0 files merged, 1 files removed, 0 files unresolved 105 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
108 106
109 $ hg touch 107 $ hg touch
110 1 new orphan changesets 108 1 new unstable changesets
111 109
112 $ hg log -G --hidden 110 $ hg rebase -s 11 -d 12
113 @ 11:[0-9a-f]{12} gna1 (re) 111 rebasing 11:* "move" (glob)
114 |
115 . o 10:[0-9a-f]{12} move (re)
116 | |
117 . x 9:[0-9a-f]{12} gna1 (re)
118 |/
119 o 8:[0-9a-f]{12} d (re)
120 |
121 o 7:[0-9a-f]{12} c (re)
122 |
123 . x 6:[0-9a-f]{12} d (re)
124 | |
125 . x 5:[0-9a-f]{12} c (re)
126 |/
127 o 4:[0-9a-f]{12} (re)
128
129 x 3:[0-9a-f]{12} a (re)
130
131 o 2:[0-9a-f]{12} ab (re)
132
133 x 1:[0-9a-f]{12} a (re)
134
135 x 0:[0-9a-f]{12} a (re)
136
137
138 $ hg rebase -s 10 -d 11
139 rebasing 10:[0-9a-f]{12} "move" (re)
140 $ hg st -C --change=tip 112 $ hg st -C --change=tip
141 A gna2 113 A gna2
142 gna1 114 gna1
143 R gna1 115 R gna1
144 116
145 check that the --duplicate option does not create divergence 117 check that the --duplicate option does not create divergence
146 118
147 $ hg touch --duplicate 10 --hidden 119 $ hg touch --duplicate 11 --hidden
148 1 new orphan changesets 120 1 new unstable changesets
149 121
150 check that reviving a changeset with no successor does not show the prompt 122 check that reviving a changeset with no successor does not show the prompt
151 123
152 $ hg prune 13 124 $ hg prune 14
153 1 changesets pruned 125 1 changesets pruned
154 $ hg touch 13 --hidden --note "testing with no successor" 126 $ hg touch 14 --hidden
155 1 new orphan changesets 127 1 new unstable changesets
156 $ hg obslog -r 13 --hidden 128 $ hg obslog -r 14 --hidden
157 x [0-9a-f]{12} (.*) move (re) 129 x [0-9a-f]{12} (.*) move (re)
158 pruned using prune by test (Thu Jan 01 00:00:00 1970 +0000) 130 pruned by test (Thu Jan 01 00:00:00 1970 +0000)
159 rewritten(.*) as [0-9a-f]{12} using touch by test (.*) (re) 131 rewritten(.*) as [0-9a-f]{12} by test (.*) (re)
160 note: testing with no successor
161 132