comparison tests/test-rebase-mq.t @ 23515:7856a87bbb02

tests: stabilise mq rebase tests Prepare for including hashes in output ... and less globbing make the tests easier to update.
author Mads Kiilerich <madski@unity3d.com>
date Tue, 09 Dec 2014 03:37:06 +0100
parents b081decd9062
children 4f18e80d9c30
comparison
equal deleted inserted replaced
23514:3575f42e1b7b 23515:7856a87bbb02
22 $ echo r1 > f 22 $ echo r1 > f
23 $ hg ci -m R1 23 $ hg ci -m R1
24 24
25 $ hg up -q 0 25 $ hg up -q 0
26 26
27 $ hg qnew f.patch 27 $ hg qnew f.patch -d '1 0'
28 $ echo mq1 > f 28 $ echo mq1 > f
29 $ hg qref -m P0 29 $ hg qref -m P0
30 30
31 $ hg qnew f2.patch 31 $ hg qnew f2.patch
32 $ echo mq2 > f 32 $ echo mq2 > f
33 $ hg qref -m P1 33 $ hg qref -m P1 -d '2 0'
34 34
35 $ hg tglog 35 $ hg tglog
36 @ 3: 'P1' tags: f2.patch qtip tip 36 @ 3: 'P1' tags: f2.patch qtip tip
37 | 37 |
38 o 2: 'P0' tags: f.patch qbase 38 o 2: 'P0' tags: f.patch qbase
81 81
82 $ echo mq1r1mq2 > f 82 $ echo mq1r1mq2 > f
83 $ hg resolve -m f 83 $ hg resolve -m f
84 (no more unresolved files) 84 (no more unresolved files)
85 $ hg rebase -c 85 $ hg rebase -c
86 saved backup bundle to $TESTTMP/a/.hg/strip-backup/*-backup.hg (glob) 86 saved backup bundle to $TESTTMP/a/.hg/strip-backup/3504f44bffc0-backup.hg (glob)
87 87
88 $ hg tglog 88 $ hg tglog
89 @ 3: 'P1' tags: f2.patch qtip tip 89 @ 3: 'P1' tags: f2.patch qtip tip
90 | 90 |
91 o 2: 'P0' tags: f.patch qbase 91 o 2: 'P0' tags: f.patch qbase
100 mq1r1 100 mq1r1
101 101
102 $ cat .hg/patches/f.patch 102 $ cat .hg/patches/f.patch
103 # HG changeset patch 103 # HG changeset patch
104 # User test 104 # User test
105 # Date ?????????? ? (glob) 105 # Date 1 0
106 # * (glob) 106 # Thu Jan 01 00:00:01 1970 +0000
107 # Node ID ???????????????????????????????????????? (glob) 107 # Node ID ebe9914c0d1c3f60096e952fa4dbb3d377dea3ab
108 # Parent bac9ed9960d8992bcad75864a879fa76cadaf1b0 108 # Parent bac9ed9960d8992bcad75864a879fa76cadaf1b0
109 P0 109 P0
110 110
111 diff -r bac9ed9960d8 -r ???????????? f (glob) 111 diff -r bac9ed9960d8 -r ebe9914c0d1c f
112 --- a/f Thu Jan 01 00:00:00 1970 +0000 112 --- a/f Thu Jan 01 00:00:00 1970 +0000
113 +++ b/f ??? ??? ?? ??:??:?? ???? ????? (glob) 113 +++ b/f Thu Jan 01 00:00:01 1970 +0000
114 @@ -1,1 +1,1 @@ 114 @@ -1,1 +1,1 @@
115 -r1 115 -r1
116 +mq1r1 116 +mq1r1
117 117
118 Update to qtip: 118 Update to qtip:
123 mq1r1mq2 123 mq1r1mq2
124 124
125 $ cat .hg/patches/f2.patch 125 $ cat .hg/patches/f2.patch
126 # HG changeset patch 126 # HG changeset patch
127 # User test 127 # User test
128 # Date ?????????? ? (glob) 128 # Date 2 0
129 # * (glob) 129 # Thu Jan 01 00:00:02 1970 +0000
130 # Node ID ???????????????????????????????????????? (glob) 130 # Node ID 462012cf340c97d44d62377c985a423f6bb82f07
131 # Parent ???????????????????????????????????????? (glob) 131 # Parent ebe9914c0d1c3f60096e952fa4dbb3d377dea3ab
132 P1 132 P1
133 133
134 diff -r ???????????? -r ???????????? f (glob) 134 diff -r ebe9914c0d1c -r 462012cf340c f
135 --- a/f ??? ??? ?? ??:??:?? ???? ????? (glob) 135 --- a/f Thu Jan 01 00:00:01 1970 +0000
136 +++ b/f ??? ??? ?? ??:??:?? ???? ????? (glob) 136 +++ b/f Thu Jan 01 00:00:02 1970 +0000
137 @@ -1,1 +1,1 @@ 137 @@ -1,1 +1,1 @@
138 -mq1r1 138 -mq1r1
139 +mq1r1mq2 139 +mq1r1mq2
140 140
141 Adding one git-style patch and one normal: 141 Adding one git-style patch and one normal:
148 $ rm -fr .hg/patches 148 $ rm -fr .hg/patches
149 $ hg qinit -c 149 $ hg qinit -c
150 150
151 $ hg up -q 0 151 $ hg up -q 0
152 152
153 $ hg qnew --git f_git.patch 153 $ hg qnew --git f_git.patch -d '3 0'
154 $ echo mq1 > p 154 $ echo mq1 > p
155 $ hg add p 155 $ hg add p
156 $ hg qref --git -m 'P0 (git)' 156 $ hg qref --git -m 'P0 (git)'
157 157
158 $ hg qnew f.patch 158 $ hg qnew f.patch -d '4 0'
159 $ echo mq2 > p 159 $ echo mq2 > p
160 $ hg qref -m P1 160 $ hg qref -m P1
161 $ hg qci -m 'save patch state' 161 $ hg qci -m 'save patch state'
162 162
163 $ hg qseries -s 163 $ hg qseries -s
169 f.patch 169 f.patch
170 f_git.patch 170 f_git.patch
171 series 171 series
172 172
173 $ cat .hg/patches/f_git.patch 173 $ cat .hg/patches/f_git.patch
174 Date: 3 0
175
174 P0 (git) 176 P0 (git)
175 177
176 diff --git a/p b/p 178 diff --git a/p b/p
177 new file mode 100644 179 new file mode 100644
178 --- /dev/null 180 --- /dev/null
179 +++ b/p 181 +++ b/p
180 @@ -0,0 +1,1 @@ 182 @@ -0,0 +1,1 @@
181 +mq1 183 +mq1
182 184
183 $ cat .hg/patches/f.patch 185 $ cat .hg/patches/f.patch
186 Date: 4 0
187
184 P1 188 P1
185 189
186 diff -r ???????????? p (glob) 190 diff -r ???????????? p (glob)
187 --- a/p ??? ??? ?? ??:??:?? ???? ????? (glob) 191 --- a/p ??? ??? ?? ??:??:?? ???? ????? (glob)
188 +++ b/p ??? ??? ?? ??:??:?? ???? ????? (glob) 192 +++ b/p ??? ??? ?? ??:??:?? ???? ????? (glob)
192 196
193 197
194 Rebase the applied mq patches: 198 Rebase the applied mq patches:
195 199
196 $ hg rebase -s 2 -d 1 200 $ hg rebase -s 2 -d 1
197 saved backup bundle to $TESTTMP/a/.hg/strip-backup/*-backup.hg (glob) 201 saved backup bundle to $TESTTMP/a/.hg/strip-backup/0c587ffcb480-backup.hg (glob)
198 202
199 $ hg qci -m 'save patch state' 203 $ hg qci -m 'save patch state'
200 204
201 $ hg qseries -s 205 $ hg qseries -s
202 f_git.patch: P0 (git) 206 f_git.patch: P0 (git)
209 series 213 series
210 214
211 $ cat .hg/patches/f_git.patch 215 $ cat .hg/patches/f_git.patch
212 # HG changeset patch 216 # HG changeset patch
213 # User test 217 # User test
214 # Date ?????????? ? (glob) 218 # Date 3 0
215 # * (glob) 219 # Thu Jan 01 00:00:03 1970 +0000
216 # Node ID ???????????????????????????????????????? (glob) 220 # Node ID 12d9f6a3bbe560dee50c7c454d434add7fb8e837
217 # Parent bac9ed9960d8992bcad75864a879fa76cadaf1b0 221 # Parent bac9ed9960d8992bcad75864a879fa76cadaf1b0
218 P0 (git) 222 P0 (git)
219 223
220 diff --git a/p b/p 224 diff --git a/p b/p
221 new file mode 100644 225 new file mode 100644
225 +mq1 229 +mq1
226 230
227 $ cat .hg/patches/f.patch 231 $ cat .hg/patches/f.patch
228 # HG changeset patch 232 # HG changeset patch
229 # User test 233 # User test
230 # Date ?????????? ? (glob) 234 # Date 4 0
231 # * (glob) 235 # Thu Jan 01 00:00:04 1970 +0000
232 # Node ID ???????????????????????????????????????? (glob) 236 # Node ID c77a2661c64c60d82f63c4f7aefd95b3a948a557
233 # Parent ???????????????????????????????????????? (glob) 237 # Parent 12d9f6a3bbe560dee50c7c454d434add7fb8e837
234 P1 238 P1
235 239
236 diff -r ???????????? -r ???????????? p (glob) 240 diff -r 12d9f6a3bbe5 -r c77a2661c64c p
237 --- a/p ??? ??? ?? ??:??:?? ???? ????? (glob) 241 --- a/p Thu Jan 01 00:00:03 1970 +0000
238 +++ b/p ??? ??? ?? ??:??:?? ???? ????? (glob) 242 +++ b/p Thu Jan 01 00:00:04 1970 +0000
239 @@ -1,1 +1,1 @@ 243 @@ -1,1 +1,1 @@
240 -mq1 244 -mq1
241 +mq2 245 +mq2
242 246
243 $ cd .. 247 $ cd ..
254 258
255 $ hg qinit 259 $ hg qinit
256 $ echo guarded > guarded 260 $ echo guarded > guarded
257 $ hg add guarded 261 $ hg add guarded
258 $ hg qnew guarded 262 $ hg qnew guarded
259 $ hg qnew empty-important -m 'important commit message' 263 $ hg qnew empty-important -m 'important commit message' -d '1 0'
260 $ echo bar > bar 264 $ echo bar > bar
261 $ hg add bar 265 $ hg add bar
262 $ hg qnew bar 266 $ hg qnew bar -d '2 0'
263 $ echo foo > foo 267 $ echo foo > foo
264 $ hg add foo 268 $ hg add foo
265 $ hg qnew foo 269 $ hg qnew foo
266 $ hg qpop -a 270 $ hg qpop -a
267 popping foo 271 popping foo
337 guarded: +guarded 341 guarded: +guarded
338 bar: +baz 342 bar: +baz
339 foo: +baz 343 foo: +baz
340 344
341 $ hg tglog 345 $ hg tglog
342 @ 2:* '[mq]: bar' tags: bar qbase qtip tip (glob) 346 @ 2: '[mq]: bar' tags: bar qbase qtip tip
343 | 347 |
344 o 1:* 'b' tags: qparent (glob) 348 o 1: 'b' tags: qparent
345 | 349 |
346 o 0:* 'a' tags: (glob) 350 o 0: 'a' tags:
347 351
348 $ cd .. 352 $ cd ..