comparison tests/test-rebase-bookmarks.t @ 35385:469b06b4c3ca

tests: add commit hashes to log commands in rebase tests Commit hashes are a useful way to ensure the content of commits made in the tests are not changing, even if we don't query every aspect of every commit. (And some properties, like extras, are rarely printed at all.) Many of the rebase log -G calls didn't show hashes; by adding hashes to places that weren't showing them we can help protect those tests from unwanted changes. Differential Revision: https://phab.mercurial-scm.org/D1650
author Phil Cohen <phillco@fb.com>
date Sun, 10 Dec 2017 21:57:37 -0800
parents f61f5af5ed31
children 4441705b7111
comparison
equal deleted inserted replaced
35384:b9bdee046cc2 35385:469b06b4c3ca
5 > 5 >
6 > [phases] 6 > [phases]
7 > publish=False 7 > publish=False
8 > 8 >
9 > [alias] 9 > [alias]
10 > tglog = log -G --template "{rev}: '{desc}' bookmarks: {bookmarks}\n" 10 > tglog = log -G --template "{rev}: {node|short} '{desc}' bookmarks: {bookmarks}\n"
11 > EOF 11 > EOF
12 12
13 Create a repo with several bookmarks 13 Create a repo with several bookmarks
14 $ hg init a 14 $ hg init a
15 $ cd a 15 $ cd a
37 created new head 37 created new head
38 38
39 $ hg book W 39 $ hg book W
40 40
41 $ hg tglog 41 $ hg tglog
42 @ 3: 'D' bookmarks: W 42 @ 3: 41acb9dca9eb 'D' bookmarks: W
43 | 43 |
44 | o 2: 'C' bookmarks: Y Z 44 | o 2: 49cb3485fa0c 'C' bookmarks: Y Z
45 | | 45 | |
46 | o 1: 'B' bookmarks: X 46 | o 1: 6c81ed0049f8 'B' bookmarks: X
47 |/ 47 |/
48 o 0: 'A' bookmarks: 48 o 0: 1994f17a630e 'A' bookmarks:
49 49
50 50
51 Move only rebased bookmarks 51 Move only rebased bookmarks
52 52
53 $ cd .. 53 $ cd ..
64 64
65 $ hg book -r 3 X@diverge 65 $ hg book -r 3 X@diverge
66 $ hg book -r 0 Y@diverge 66 $ hg book -r 0 Y@diverge
67 67
68 $ hg tglog 68 $ hg tglog
69 o 3: 'D' bookmarks: W X@diverge Z@diverge 69 o 3: 41acb9dca9eb 'D' bookmarks: W X@diverge Z@diverge
70 | 70 |
71 | @ 2: 'C' bookmarks: Y Z 71 | @ 2: 49cb3485fa0c 'C' bookmarks: Y Z
72 | | 72 | |
73 | o 1: 'B' bookmarks: X 73 | o 1: 6c81ed0049f8 'B' bookmarks: X
74 |/ 74 |/
75 o 0: 'A' bookmarks: Y@diverge 75 o 0: 1994f17a630e 'A' bookmarks: Y@diverge
76 76
77 $ hg rebase -s Y -d 3 77 $ hg rebase -s Y -d 3
78 rebasing 2:49cb3485fa0c "C" (Y Z) 78 rebasing 2:49cb3485fa0c "C" (Y Z)
79 saved backup bundle to $TESTTMP/a1/.hg/strip-backup/49cb3485fa0c-126f3e97-rebase.hg (glob) 79 saved backup bundle to $TESTTMP/a1/.hg/strip-backup/49cb3485fa0c-126f3e97-rebase.hg (glob)
80 80
81 $ hg tglog 81 $ hg tglog
82 @ 3: 'C' bookmarks: Y Z 82 @ 3: 17fb3faba63c 'C' bookmarks: Y Z
83 | 83 |
84 o 2: 'D' bookmarks: W X@diverge 84 o 2: 41acb9dca9eb 'D' bookmarks: W X@diverge
85 | 85 |
86 | o 1: 'B' bookmarks: X 86 | o 1: 6c81ed0049f8 'B' bookmarks: X
87 |/ 87 |/
88 o 0: 'A' bookmarks: Y@diverge 88 o 0: 1994f17a630e 'A' bookmarks: Y@diverge
89 89
90 Do not try to keep active but deleted divergent bookmark 90 Do not try to keep active but deleted divergent bookmark
91 91
92 $ cd .. 92 $ cd ..
93 $ hg clone -q a a4 93 $ hg clone -q a a4
118 rebasing 1:6c81ed0049f8 "B" (X) 118 rebasing 1:6c81ed0049f8 "B" (X)
119 rebasing 2:49cb3485fa0c "C" (Y Z) 119 rebasing 2:49cb3485fa0c "C" (Y Z)
120 saved backup bundle to $TESTTMP/a2/.hg/strip-backup/6c81ed0049f8-a687065f-rebase.hg (glob) 120 saved backup bundle to $TESTTMP/a2/.hg/strip-backup/6c81ed0049f8-a687065f-rebase.hg (glob)
121 121
122 $ hg tglog 122 $ hg tglog
123 @ 3: 'C' bookmarks: Y Z 123 @ 3: 3d5fa227f4b5 'C' bookmarks: Y Z
124 | 124 |
125 o 2: 'B' bookmarks: X 125 o 2: e926fccfa8ec 'B' bookmarks: X
126 | 126 |
127 o 1: 'D' bookmarks: W 127 o 1: 41acb9dca9eb 'D' bookmarks: W
128 | 128 |
129 o 0: 'A' bookmarks: 129 o 0: 1994f17a630e 'A' bookmarks:
130 130
131 131
132 Keep active bookmark on the correct changeset 132 Keep active bookmark on the correct changeset
133 133
134 $ cd .. 134 $ cd ..
141 rebasing 1:6c81ed0049f8 "B" (X) 141 rebasing 1:6c81ed0049f8 "B" (X)
142 rebasing 2:49cb3485fa0c "C" (Y Z) 142 rebasing 2:49cb3485fa0c "C" (Y Z)
143 saved backup bundle to $TESTTMP/a3/.hg/strip-backup/6c81ed0049f8-a687065f-rebase.hg (glob) 143 saved backup bundle to $TESTTMP/a3/.hg/strip-backup/6c81ed0049f8-a687065f-rebase.hg (glob)
144 144
145 $ hg tglog 145 $ hg tglog
146 o 3: 'C' bookmarks: Y Z 146 o 3: 3d5fa227f4b5 'C' bookmarks: Y Z
147 | 147 |
148 @ 2: 'B' bookmarks: X 148 @ 2: e926fccfa8ec 'B' bookmarks: X
149 | 149 |
150 o 1: 'D' bookmarks: W 150 o 1: 41acb9dca9eb 'D' bookmarks: W
151 | 151 |
152 o 0: 'A' bookmarks: 152 o 0: 1994f17a630e 'A' bookmarks:
153 153
154 $ hg bookmarks 154 $ hg bookmarks
155 W 1:41acb9dca9eb 155 W 1:41acb9dca9eb
156 * X 2:e926fccfa8ec 156 * X 2:e926fccfa8ec
157 Y 3:3d5fa227f4b5 157 Y 3:3d5fa227f4b5
180 continue: hg rebase --continue 180 continue: hg rebase --continue
181 $ hg rebase --continue 181 $ hg rebase --continue
182 rebasing 3:3d5fa227f4b5 "C" (Y Z) 182 rebasing 3:3d5fa227f4b5 "C" (Y Z)
183 saved backup bundle to $TESTTMP/a3/.hg/strip-backup/3d5fa227f4b5-c6ea2371-rebase.hg (glob) 183 saved backup bundle to $TESTTMP/a3/.hg/strip-backup/3d5fa227f4b5-c6ea2371-rebase.hg (glob)
184 $ hg tglog 184 $ hg tglog
185 @ 4: 'C' bookmarks: Y Z 185 @ 4: 45c0f0ec1203 'C' bookmarks: Y Z
186 | 186 |
187 o 3: 'other C' bookmarks: 187 o 3: b0e10b7175fd 'other C' bookmarks:
188 | 188 |
189 o 2: 'B' bookmarks: X 189 o 2: e926fccfa8ec 'B' bookmarks: X
190 | 190 |
191 o 1: 'D' bookmarks: W 191 o 1: 41acb9dca9eb 'D' bookmarks: W
192 | 192 |
193 o 0: 'A' bookmarks: 193 o 0: 1994f17a630e 'A' bookmarks:
194 194
195 195
196 ensure that bookmarks given the names of revset functions can be used 196 ensure that bookmarks given the names of revset functions can be used
197 as --rev arguments (issue3950) 197 as --rev arguments (issue3950)
198 198
223 > EOS 223 > EOS
224 $ eval `hg tags -T 'hg bookmark -ir {node} {tag};\n' | grep -v tip` 224 $ eval `hg tags -T 'hg bookmark -ir {node} {tag};\n' | grep -v tip`
225 $ rm .hg/localtags 225 $ rm .hg/localtags
226 $ hg up -q B 226 $ hg up -q B
227 $ hg tglog 227 $ hg tglog
228 o 2: 'C' bookmarks: C 228 o 2: dc0947a82db8 'C' bookmarks: C
229 | 229 |
230 | @ 1: 'B' bookmarks: B 230 | @ 1: 112478962961 'B' bookmarks: B
231 |/ 231 |/
232 o 0: 'A' bookmarks: A 232 o 0: 426bada5c675 'A' bookmarks: A
233 233
234 $ hg rebase -r B -d C --keep 234 $ hg rebase -r B -d C --keep
235 rebasing 1:112478962961 "B" (B) 235 rebasing 1:112478962961 "B" (B)
236 $ hg tglog 236 $ hg tglog
237 @ 3: 'B' bookmarks: B 237 @ 3: 9769fc65c4c5 'B' bookmarks: B
238 | 238 |
239 o 2: 'C' bookmarks: C 239 o 2: dc0947a82db8 'C' bookmarks: C
240 | 240 |
241 | o 1: 'B' bookmarks: 241 | o 1: 112478962961 'B' bookmarks:
242 |/ 242 |/
243 o 0: 'A' bookmarks: A 243 o 0: 426bada5c675 'A' bookmarks: A
244 244
245 245