##// END OF EJS Templates
tests: defines aliases for `hg log` calls in test-copytrace-heuristics.t...
Martin von Zweigbergk -
r42358:1afd9d1e default
parent child Browse files
Show More
@@ -1,718 +1,721 b''
1 Test for the heuristic copytracing algorithm
1 Test for the heuristic copytracing algorithm
2 ============================================
2 ============================================
3
3
4 $ cat >> $TESTTMP/copytrace.sh << '__EOF__'
4 $ cat >> $TESTTMP/copytrace.sh << '__EOF__'
5 > initclient() {
5 > initclient() {
6 > cat >> $1/.hg/hgrc <<EOF
6 > cat >> $1/.hg/hgrc <<EOF
7 > [experimental]
7 > [experimental]
8 > copytrace = heuristics
8 > copytrace = heuristics
9 > copytrace.sourcecommitlimit = -1
9 > copytrace.sourcecommitlimit = -1
10 > EOF
10 > EOF
11 > }
11 > }
12 > __EOF__
12 > __EOF__
13 $ . "$TESTTMP/copytrace.sh"
13 $ . "$TESTTMP/copytrace.sh"
14
14
15 $ cat >> $HGRCPATH << EOF
15 $ cat >> $HGRCPATH << EOF
16 > [extensions]
16 > [extensions]
17 > rebase=
17 > rebase=
18 > shelve=
18 > shelve=
19 > [alias]
20 > l = log -G -T 'changeset: {node}\n desc: {desc}\n'
21 > pl = log -G -T 'changeset: {node}\n desc: {desc}, phase: {phase}\n'
19 > EOF
22 > EOF
20
23
21 NOTE: calling initclient() set copytrace.sourcecommitlimit=-1 as we want to
24 NOTE: calling initclient() set copytrace.sourcecommitlimit=-1 as we want to
22 prevent the full copytrace algorithm to run and test the heuristic algorithm
25 prevent the full copytrace algorithm to run and test the heuristic algorithm
23 without complexing the test cases with public and draft commits.
26 without complexing the test cases with public and draft commits.
24
27
25 Check filename heuristics (same dirname and same basename)
28 Check filename heuristics (same dirname and same basename)
26 ----------------------------------------------------------
29 ----------------------------------------------------------
27
30
28 $ hg init repo
31 $ hg init repo
29 $ initclient repo
32 $ initclient repo
30 $ cd repo
33 $ cd repo
31 $ echo a > a
34 $ echo a > a
32 $ mkdir dir
35 $ mkdir dir
33 $ echo a > dir/file.txt
36 $ echo a > dir/file.txt
34 $ hg addremove
37 $ hg addremove
35 adding a
38 adding a
36 adding dir/file.txt
39 adding dir/file.txt
37 $ hg ci -m initial
40 $ hg ci -m initial
38 $ hg mv a b
41 $ hg mv a b
39 $ hg mv -q dir dir2
42 $ hg mv -q dir dir2
40 $ hg ci -m 'mv a b, mv dir/ dir2/'
43 $ hg ci -m 'mv a b, mv dir/ dir2/'
41 $ hg up -q 0
44 $ hg up -q 0
42 $ echo b > a
45 $ echo b > a
43 $ echo b > dir/file.txt
46 $ echo b > dir/file.txt
44 $ hg ci -qm 'mod a, mod dir/file.txt'
47 $ hg ci -qm 'mod a, mod dir/file.txt'
45
48
46 $ hg log -G -T 'changeset: {node}\n desc: {desc}\n'
49 $ hg l
47 @ changeset: 557f403c0afd2a3cf15d7e2fb1f1001a8b85e081
50 @ changeset: 557f403c0afd2a3cf15d7e2fb1f1001a8b85e081
48 | desc: mod a, mod dir/file.txt
51 | desc: mod a, mod dir/file.txt
49 | o changeset: 928d74bc9110681920854d845c06959f6dfc9547
52 | o changeset: 928d74bc9110681920854d845c06959f6dfc9547
50 |/ desc: mv a b, mv dir/ dir2/
53 |/ desc: mv a b, mv dir/ dir2/
51 o changeset: 3c482b16e54596fed340d05ffaf155f156cda7ee
54 o changeset: 3c482b16e54596fed340d05ffaf155f156cda7ee
52 desc: initial
55 desc: initial
53
56
54 $ hg rebase -s . -d 1
57 $ hg rebase -s . -d 1
55 rebasing 2:557f403c0afd "mod a, mod dir/file.txt" (tip)
58 rebasing 2:557f403c0afd "mod a, mod dir/file.txt" (tip)
56 merging b and a to b
59 merging b and a to b
57 merging dir2/file.txt and dir/file.txt to dir2/file.txt
60 merging dir2/file.txt and dir/file.txt to dir2/file.txt
58 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/557f403c0afd-9926eeff-rebase.hg
61 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/557f403c0afd-9926eeff-rebase.hg
59 $ cd ..
62 $ cd ..
60 $ rm -rf repo
63 $ rm -rf repo
61
64
62 Make sure filename heuristics do not when they are not related
65 Make sure filename heuristics do not when they are not related
63 --------------------------------------------------------------
66 --------------------------------------------------------------
64
67
65 $ hg init repo
68 $ hg init repo
66 $ initclient repo
69 $ initclient repo
67 $ cd repo
70 $ cd repo
68 $ echo 'somecontent' > a
71 $ echo 'somecontent' > a
69 $ hg add a
72 $ hg add a
70 $ hg ci -m initial
73 $ hg ci -m initial
71 $ hg rm a
74 $ hg rm a
72 $ echo 'completelydifferentcontext' > b
75 $ echo 'completelydifferentcontext' > b
73 $ hg add b
76 $ hg add b
74 $ hg ci -m 'rm a, add b'
77 $ hg ci -m 'rm a, add b'
75 $ hg up -q 0
78 $ hg up -q 0
76 $ printf 'somecontent\nmoarcontent' > a
79 $ printf 'somecontent\nmoarcontent' > a
77 $ hg ci -qm 'mode a'
80 $ hg ci -qm 'mode a'
78
81
79 $ hg log -G -T 'changeset: {node}\n desc: {desc}\n'
82 $ hg l
80 @ changeset: d526312210b9e8f795d576a77dc643796384d86e
83 @ changeset: d526312210b9e8f795d576a77dc643796384d86e
81 | desc: mode a
84 | desc: mode a
82 | o changeset: 46985f76c7e5e5123433527f5c8526806145650b
85 | o changeset: 46985f76c7e5e5123433527f5c8526806145650b
83 |/ desc: rm a, add b
86 |/ desc: rm a, add b
84 o changeset: e5b71fb099c29d9172ef4a23485aaffd497e4cc0
87 o changeset: e5b71fb099c29d9172ef4a23485aaffd497e4cc0
85 desc: initial
88 desc: initial
86
89
87 $ hg rebase -s . -d 1
90 $ hg rebase -s . -d 1
88 rebasing 2:d526312210b9 "mode a" (tip)
91 rebasing 2:d526312210b9 "mode a" (tip)
89 file 'a' was deleted in local [dest] but was modified in other [source].
92 file 'a' was deleted in local [dest] but was modified in other [source].
90 What do you want to do?
93 What do you want to do?
91 use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u
94 use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u
92 unresolved conflicts (see hg resolve, then hg rebase --continue)
95 unresolved conflicts (see hg resolve, then hg rebase --continue)
93 [1]
96 [1]
94
97
95 $ cd ..
98 $ cd ..
96 $ rm -rf repo
99 $ rm -rf repo
97
100
98 Test when lca didn't modified the file that was moved
101 Test when lca didn't modified the file that was moved
99 -----------------------------------------------------
102 -----------------------------------------------------
100
103
101 $ hg init repo
104 $ hg init repo
102 $ initclient repo
105 $ initclient repo
103 $ cd repo
106 $ cd repo
104 $ echo 'somecontent' > a
107 $ echo 'somecontent' > a
105 $ hg add a
108 $ hg add a
106 $ hg ci -m initial
109 $ hg ci -m initial
107 $ echo c > c
110 $ echo c > c
108 $ hg add c
111 $ hg add c
109 $ hg ci -m randomcommit
112 $ hg ci -m randomcommit
110 $ hg mv a b
113 $ hg mv a b
111 $ hg ci -m 'mv a b'
114 $ hg ci -m 'mv a b'
112 $ hg up -q 1
115 $ hg up -q 1
113 $ echo b > a
116 $ echo b > a
114 $ hg ci -qm 'mod a'
117 $ hg ci -qm 'mod a'
115
118
116 $ hg log -G -T 'changeset: {node}\n desc: {desc}, phase: {phase}\n'
119 $ hg pl
117 @ changeset: 9d5cf99c3d9f8e8b05ba55421f7f56530cfcf3bc
120 @ changeset: 9d5cf99c3d9f8e8b05ba55421f7f56530cfcf3bc
118 | desc: mod a, phase: draft
121 | desc: mod a, phase: draft
119 | o changeset: d760186dd240fc47b91eb9f0b58b0002aaeef95d
122 | o changeset: d760186dd240fc47b91eb9f0b58b0002aaeef95d
120 |/ desc: mv a b, phase: draft
123 |/ desc: mv a b, phase: draft
121 o changeset: 48e1b6ba639d5d7fb313fa7989eebabf99c9eb83
124 o changeset: 48e1b6ba639d5d7fb313fa7989eebabf99c9eb83
122 | desc: randomcommit, phase: draft
125 | desc: randomcommit, phase: draft
123 o changeset: e5b71fb099c29d9172ef4a23485aaffd497e4cc0
126 o changeset: e5b71fb099c29d9172ef4a23485aaffd497e4cc0
124 desc: initial, phase: draft
127 desc: initial, phase: draft
125
128
126 $ hg rebase -s . -d 2
129 $ hg rebase -s . -d 2
127 rebasing 3:9d5cf99c3d9f "mod a" (tip)
130 rebasing 3:9d5cf99c3d9f "mod a" (tip)
128 merging b and a to b
131 merging b and a to b
129 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/9d5cf99c3d9f-f02358cc-rebase.hg
132 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/9d5cf99c3d9f-f02358cc-rebase.hg
130 $ cd ..
133 $ cd ..
131 $ rm -rf repo
134 $ rm -rf repo
132
135
133 Rebase "backwards"
136 Rebase "backwards"
134 ------------------
137 ------------------
135
138
136 $ hg init repo
139 $ hg init repo
137 $ initclient repo
140 $ initclient repo
138 $ cd repo
141 $ cd repo
139 $ echo 'somecontent' > a
142 $ echo 'somecontent' > a
140 $ hg add a
143 $ hg add a
141 $ hg ci -m initial
144 $ hg ci -m initial
142 $ echo c > c
145 $ echo c > c
143 $ hg add c
146 $ hg add c
144 $ hg ci -m randomcommit
147 $ hg ci -m randomcommit
145 $ hg mv a b
148 $ hg mv a b
146 $ hg ci -m 'mv a b'
149 $ hg ci -m 'mv a b'
147 $ hg up -q 2
150 $ hg up -q 2
148 $ echo b > b
151 $ echo b > b
149 $ hg ci -qm 'mod b'
152 $ hg ci -qm 'mod b'
150
153
151 $ hg log -G -T 'changeset: {node}\n desc: {desc}\n'
154 $ hg l
152 @ changeset: fbe97126b3969056795c462a67d93faf13e4d298
155 @ changeset: fbe97126b3969056795c462a67d93faf13e4d298
153 | desc: mod b
156 | desc: mod b
154 o changeset: d760186dd240fc47b91eb9f0b58b0002aaeef95d
157 o changeset: d760186dd240fc47b91eb9f0b58b0002aaeef95d
155 | desc: mv a b
158 | desc: mv a b
156 o changeset: 48e1b6ba639d5d7fb313fa7989eebabf99c9eb83
159 o changeset: 48e1b6ba639d5d7fb313fa7989eebabf99c9eb83
157 | desc: randomcommit
160 | desc: randomcommit
158 o changeset: e5b71fb099c29d9172ef4a23485aaffd497e4cc0
161 o changeset: e5b71fb099c29d9172ef4a23485aaffd497e4cc0
159 desc: initial
162 desc: initial
160
163
161 $ hg rebase -s . -d 0
164 $ hg rebase -s . -d 0
162 rebasing 3:fbe97126b396 "mod b" (tip)
165 rebasing 3:fbe97126b396 "mod b" (tip)
163 merging a and b to a
166 merging a and b to a
164 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/fbe97126b396-cf5452a1-rebase.hg
167 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/fbe97126b396-cf5452a1-rebase.hg
165 $ cd ..
168 $ cd ..
166 $ rm -rf repo
169 $ rm -rf repo
167
170
168 Check a few potential move candidates
171 Check a few potential move candidates
169 -------------------------------------
172 -------------------------------------
170
173
171 $ hg init repo
174 $ hg init repo
172 $ initclient repo
175 $ initclient repo
173 $ cd repo
176 $ cd repo
174 $ mkdir dir
177 $ mkdir dir
175 $ echo a > dir/a
178 $ echo a > dir/a
176 $ hg add dir/a
179 $ hg add dir/a
177 $ hg ci -qm initial
180 $ hg ci -qm initial
178 $ hg mv dir/a dir/b
181 $ hg mv dir/a dir/b
179 $ hg ci -qm 'mv dir/a dir/b'
182 $ hg ci -qm 'mv dir/a dir/b'
180 $ mkdir dir2
183 $ mkdir dir2
181 $ echo b > dir2/a
184 $ echo b > dir2/a
182 $ hg add dir2/a
185 $ hg add dir2/a
183 $ hg ci -qm 'create dir2/a'
186 $ hg ci -qm 'create dir2/a'
184 $ hg up -q 0
187 $ hg up -q 0
185 $ echo b > dir/a
188 $ echo b > dir/a
186 $ hg ci -qm 'mod dir/a'
189 $ hg ci -qm 'mod dir/a'
187
190
188 $ hg log -G -T 'changeset: {node}\n desc: {desc}\n'
191 $ hg l
189 @ changeset: 6b2f4cece40fd320f41229f23821256ffc08efea
192 @ changeset: 6b2f4cece40fd320f41229f23821256ffc08efea
190 | desc: mod dir/a
193 | desc: mod dir/a
191 | o changeset: 4494bf7efd2e0dfdd388e767fb913a8a3731e3fa
194 | o changeset: 4494bf7efd2e0dfdd388e767fb913a8a3731e3fa
192 | | desc: create dir2/a
195 | | desc: create dir2/a
193 | o changeset: b1784dfab6ea6bfafeb11c0ac50a2981b0fe6ade
196 | o changeset: b1784dfab6ea6bfafeb11c0ac50a2981b0fe6ade
194 |/ desc: mv dir/a dir/b
197 |/ desc: mv dir/a dir/b
195 o changeset: 36859b8907c513a3a87ae34ba5b1e7eea8c20944
198 o changeset: 36859b8907c513a3a87ae34ba5b1e7eea8c20944
196 desc: initial
199 desc: initial
197
200
198 $ hg rebase -s . -d 2
201 $ hg rebase -s . -d 2
199 rebasing 3:6b2f4cece40f "mod dir/a" (tip)
202 rebasing 3:6b2f4cece40f "mod dir/a" (tip)
200 merging dir/b and dir/a to dir/b
203 merging dir/b and dir/a to dir/b
201 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/6b2f4cece40f-503efe60-rebase.hg
204 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/6b2f4cece40f-503efe60-rebase.hg
202 $ cd ..
205 $ cd ..
203 $ rm -rf repo
206 $ rm -rf repo
204
207
205 Test the copytrace.movecandidateslimit with many move candidates
208 Test the copytrace.movecandidateslimit with many move candidates
206 ----------------------------------------------------------------
209 ----------------------------------------------------------------
207
210
208 $ hg init repo
211 $ hg init repo
209 $ initclient repo
212 $ initclient repo
210 $ cd repo
213 $ cd repo
211 $ echo a > a
214 $ echo a > a
212 $ hg add a
215 $ hg add a
213 $ hg ci -m initial
216 $ hg ci -m initial
214 $ hg mv a foo
217 $ hg mv a foo
215 $ echo a > b
218 $ echo a > b
216 $ echo a > c
219 $ echo a > c
217 $ echo a > d
220 $ echo a > d
218 $ echo a > e
221 $ echo a > e
219 $ echo a > f
222 $ echo a > f
220 $ echo a > g
223 $ echo a > g
221 $ hg add b
224 $ hg add b
222 $ hg add c
225 $ hg add c
223 $ hg add d
226 $ hg add d
224 $ hg add e
227 $ hg add e
225 $ hg add f
228 $ hg add f
226 $ hg add g
229 $ hg add g
227 $ hg ci -m 'mv a foo, add many files'
230 $ hg ci -m 'mv a foo, add many files'
228 $ hg up -q ".^"
231 $ hg up -q ".^"
229 $ echo b > a
232 $ echo b > a
230 $ hg ci -m 'mod a'
233 $ hg ci -m 'mod a'
231 created new head
234 created new head
232
235
233 $ hg log -G -T 'changeset: {node}\n desc: {desc}\n'
236 $ hg l
234 @ changeset: ef716627c70bf4ca0bdb623cfb0d6fe5b9acc51e
237 @ changeset: ef716627c70bf4ca0bdb623cfb0d6fe5b9acc51e
235 | desc: mod a
238 | desc: mod a
236 | o changeset: 8329d5c6bf479ec5ca59b9864f3f45d07213f5a4
239 | o changeset: 8329d5c6bf479ec5ca59b9864f3f45d07213f5a4
237 |/ desc: mv a foo, add many files
240 |/ desc: mv a foo, add many files
238 o changeset: 1451231c87572a7d3f92fc210b4b35711c949a98
241 o changeset: 1451231c87572a7d3f92fc210b4b35711c949a98
239 desc: initial
242 desc: initial
240
243
241 With small limit
244 With small limit
242
245
243 $ hg rebase -s 2 -d 1 --config experimental.copytrace.movecandidateslimit=0
246 $ hg rebase -s 2 -d 1 --config experimental.copytrace.movecandidateslimit=0
244 rebasing 2:ef716627c70b "mod a" (tip)
247 rebasing 2:ef716627c70b "mod a" (tip)
245 skipping copytracing for 'a', more candidates than the limit: 7
248 skipping copytracing for 'a', more candidates than the limit: 7
246 file 'a' was deleted in local [dest] but was modified in other [source].
249 file 'a' was deleted in local [dest] but was modified in other [source].
247 What do you want to do?
250 What do you want to do?
248 use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u
251 use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u
249 unresolved conflicts (see hg resolve, then hg rebase --continue)
252 unresolved conflicts (see hg resolve, then hg rebase --continue)
250 [1]
253 [1]
251
254
252 $ hg rebase --abort
255 $ hg rebase --abort
253 rebase aborted
256 rebase aborted
254
257
255 With default limit which is 100
258 With default limit which is 100
256
259
257 $ hg rebase -s 2 -d 1
260 $ hg rebase -s 2 -d 1
258 rebasing 2:ef716627c70b "mod a" (tip)
261 rebasing 2:ef716627c70b "mod a" (tip)
259 merging foo and a to foo
262 merging foo and a to foo
260 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/ef716627c70b-24681561-rebase.hg
263 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/ef716627c70b-24681561-rebase.hg
261
264
262 $ cd ..
265 $ cd ..
263 $ rm -rf repo
266 $ rm -rf repo
264
267
265 Move file in one branch and delete it in another
268 Move file in one branch and delete it in another
266 -----------------------------------------------
269 -----------------------------------------------
267
270
268 $ hg init repo
271 $ hg init repo
269 $ initclient repo
272 $ initclient repo
270 $ cd repo
273 $ cd repo
271 $ echo a > a
274 $ echo a > a
272 $ hg add a
275 $ hg add a
273 $ hg ci -m initial
276 $ hg ci -m initial
274 $ hg mv a b
277 $ hg mv a b
275 $ hg ci -m 'mv a b'
278 $ hg ci -m 'mv a b'
276 $ hg up -q ".^"
279 $ hg up -q ".^"
277 $ hg rm a
280 $ hg rm a
278 $ hg ci -m 'del a'
281 $ hg ci -m 'del a'
279 created new head
282 created new head
280
283
281 $ hg log -G -T 'changeset: {node}\n desc: {desc}, phase: {phase}\n'
284 $ hg pl
282 @ changeset: 7d61ee3b1e48577891a072024968428ba465c47b
285 @ changeset: 7d61ee3b1e48577891a072024968428ba465c47b
283 | desc: del a, phase: draft
286 | desc: del a, phase: draft
284 | o changeset: 472e38d57782172f6c6abed82a94ca0d998c3a22
287 | o changeset: 472e38d57782172f6c6abed82a94ca0d998c3a22
285 |/ desc: mv a b, phase: draft
288 |/ desc: mv a b, phase: draft
286 o changeset: 1451231c87572a7d3f92fc210b4b35711c949a98
289 o changeset: 1451231c87572a7d3f92fc210b4b35711c949a98
287 desc: initial, phase: draft
290 desc: initial, phase: draft
288
291
289 $ hg rebase -s 1 -d 2
292 $ hg rebase -s 1 -d 2
290 rebasing 1:472e38d57782 "mv a b"
293 rebasing 1:472e38d57782 "mv a b"
291 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/472e38d57782-17d50e29-rebase.hg
294 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/472e38d57782-17d50e29-rebase.hg
292 $ hg up -q c492ed3c7e35dcd1dc938053b8adf56e2cfbd062
295 $ hg up -q c492ed3c7e35dcd1dc938053b8adf56e2cfbd062
293 $ ls
296 $ ls
294 b
297 b
295 $ cd ..
298 $ cd ..
296 $ rm -rf repo
299 $ rm -rf repo
297
300
298 Move a directory in draft branch
301 Move a directory in draft branch
299 --------------------------------
302 --------------------------------
300
303
301 $ hg init repo
304 $ hg init repo
302 $ initclient repo
305 $ initclient repo
303 $ cd repo
306 $ cd repo
304 $ mkdir dir
307 $ mkdir dir
305 $ echo a > dir/a
308 $ echo a > dir/a
306 $ hg add dir/a
309 $ hg add dir/a
307 $ hg ci -qm initial
310 $ hg ci -qm initial
308 $ echo b > dir/a
311 $ echo b > dir/a
309 $ hg ci -qm 'mod dir/a'
312 $ hg ci -qm 'mod dir/a'
310 $ hg up -q ".^"
313 $ hg up -q ".^"
311 $ hg mv -q dir/ dir2
314 $ hg mv -q dir/ dir2
312 $ hg ci -qm 'mv dir/ dir2/'
315 $ hg ci -qm 'mv dir/ dir2/'
313
316
314 $ hg log -G -T 'changeset: {node}\n desc: {desc}\n'
317 $ hg l
315 @ changeset: a33d80b6e352591dfd82784e1ad6cdd86b25a239
318 @ changeset: a33d80b6e352591dfd82784e1ad6cdd86b25a239
316 | desc: mv dir/ dir2/
319 | desc: mv dir/ dir2/
317 | o changeset: 6b2f4cece40fd320f41229f23821256ffc08efea
320 | o changeset: 6b2f4cece40fd320f41229f23821256ffc08efea
318 |/ desc: mod dir/a
321 |/ desc: mod dir/a
319 o changeset: 36859b8907c513a3a87ae34ba5b1e7eea8c20944
322 o changeset: 36859b8907c513a3a87ae34ba5b1e7eea8c20944
320 desc: initial
323 desc: initial
321
324
322 $ hg rebase -s . -d 1
325 $ hg rebase -s . -d 1
323 rebasing 2:a33d80b6e352 "mv dir/ dir2/" (tip)
326 rebasing 2:a33d80b6e352 "mv dir/ dir2/" (tip)
324 merging dir/a and dir2/a to dir2/a
327 merging dir/a and dir2/a to dir2/a
325 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/a33d80b6e352-fecb9ada-rebase.hg
328 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/a33d80b6e352-fecb9ada-rebase.hg
326 $ cd ..
329 $ cd ..
327 $ rm -rf server
330 $ rm -rf server
328 $ rm -rf repo
331 $ rm -rf repo
329
332
330 Move file twice and rebase mod on top of moves
333 Move file twice and rebase mod on top of moves
331 ----------------------------------------------
334 ----------------------------------------------
332
335
333 $ hg init repo
336 $ hg init repo
334 $ initclient repo
337 $ initclient repo
335 $ cd repo
338 $ cd repo
336 $ echo a > a
339 $ echo a > a
337 $ hg add a
340 $ hg add a
338 $ hg ci -m initial
341 $ hg ci -m initial
339 $ hg mv a b
342 $ hg mv a b
340 $ hg ci -m 'mv a b'
343 $ hg ci -m 'mv a b'
341 $ hg mv b c
344 $ hg mv b c
342 $ hg ci -m 'mv b c'
345 $ hg ci -m 'mv b c'
343 $ hg up -q 0
346 $ hg up -q 0
344 $ echo c > a
347 $ echo c > a
345 $ hg ci -m 'mod a'
348 $ hg ci -m 'mod a'
346 created new head
349 created new head
347
350
348 $ hg log -G -T 'changeset: {node}\n desc: {desc}\n'
351 $ hg l
349 @ changeset: d413169422167a3fa5275fc5d71f7dea9f5775f3
352 @ changeset: d413169422167a3fa5275fc5d71f7dea9f5775f3
350 | desc: mod a
353 | desc: mod a
351 | o changeset: d3efd280421d24f9f229997c19e654761c942a71
354 | o changeset: d3efd280421d24f9f229997c19e654761c942a71
352 | | desc: mv b c
355 | | desc: mv b c
353 | o changeset: 472e38d57782172f6c6abed82a94ca0d998c3a22
356 | o changeset: 472e38d57782172f6c6abed82a94ca0d998c3a22
354 |/ desc: mv a b
357 |/ desc: mv a b
355 o changeset: 1451231c87572a7d3f92fc210b4b35711c949a98
358 o changeset: 1451231c87572a7d3f92fc210b4b35711c949a98
356 desc: initial
359 desc: initial
357 $ hg rebase -s . -d 2
360 $ hg rebase -s . -d 2
358 rebasing 3:d41316942216 "mod a" (tip)
361 rebasing 3:d41316942216 "mod a" (tip)
359 merging c and a to c
362 merging c and a to c
360 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/d41316942216-2b5949bc-rebase.hg
363 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/d41316942216-2b5949bc-rebase.hg
361
364
362 $ cd ..
365 $ cd ..
363 $ rm -rf repo
366 $ rm -rf repo
364
367
365 Move file twice and rebase moves on top of mods
368 Move file twice and rebase moves on top of mods
366 -----------------------------------------------
369 -----------------------------------------------
367
370
368 $ hg init repo
371 $ hg init repo
369 $ initclient repo
372 $ initclient repo
370 $ cd repo
373 $ cd repo
371 $ echo a > a
374 $ echo a > a
372 $ hg add a
375 $ hg add a
373 $ hg ci -m initial
376 $ hg ci -m initial
374 $ hg mv a b
377 $ hg mv a b
375 $ hg ci -m 'mv a b'
378 $ hg ci -m 'mv a b'
376 $ hg mv b c
379 $ hg mv b c
377 $ hg ci -m 'mv b c'
380 $ hg ci -m 'mv b c'
378 $ hg up -q 0
381 $ hg up -q 0
379 $ echo c > a
382 $ echo c > a
380 $ hg ci -m 'mod a'
383 $ hg ci -m 'mod a'
381 created new head
384 created new head
382 $ hg log -G -T 'changeset: {node}\n desc: {desc}\n'
385 $ hg l
383 @ changeset: d413169422167a3fa5275fc5d71f7dea9f5775f3
386 @ changeset: d413169422167a3fa5275fc5d71f7dea9f5775f3
384 | desc: mod a
387 | desc: mod a
385 | o changeset: d3efd280421d24f9f229997c19e654761c942a71
388 | o changeset: d3efd280421d24f9f229997c19e654761c942a71
386 | | desc: mv b c
389 | | desc: mv b c
387 | o changeset: 472e38d57782172f6c6abed82a94ca0d998c3a22
390 | o changeset: 472e38d57782172f6c6abed82a94ca0d998c3a22
388 |/ desc: mv a b
391 |/ desc: mv a b
389 o changeset: 1451231c87572a7d3f92fc210b4b35711c949a98
392 o changeset: 1451231c87572a7d3f92fc210b4b35711c949a98
390 desc: initial
393 desc: initial
391 $ hg rebase -s 1 -d .
394 $ hg rebase -s 1 -d .
392 rebasing 1:472e38d57782 "mv a b"
395 rebasing 1:472e38d57782 "mv a b"
393 merging a and b to b
396 merging a and b to b
394 rebasing 2:d3efd280421d "mv b c"
397 rebasing 2:d3efd280421d "mv b c"
395 merging b and c to c
398 merging b and c to c
396 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/472e38d57782-ab8d3c58-rebase.hg
399 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/472e38d57782-ab8d3c58-rebase.hg
397
400
398 $ cd ..
401 $ cd ..
399 $ rm -rf repo
402 $ rm -rf repo
400
403
401 Move one file and add another file in the same folder in one branch, modify file in another branch
404 Move one file and add another file in the same folder in one branch, modify file in another branch
402 --------------------------------------------------------------------------------------------------
405 --------------------------------------------------------------------------------------------------
403
406
404 $ hg init repo
407 $ hg init repo
405 $ initclient repo
408 $ initclient repo
406 $ cd repo
409 $ cd repo
407 $ echo a > a
410 $ echo a > a
408 $ hg add a
411 $ hg add a
409 $ hg ci -m initial
412 $ hg ci -m initial
410 $ hg mv a b
413 $ hg mv a b
411 $ hg ci -m 'mv a b'
414 $ hg ci -m 'mv a b'
412 $ echo c > c
415 $ echo c > c
413 $ hg add c
416 $ hg add c
414 $ hg ci -m 'add c'
417 $ hg ci -m 'add c'
415 $ hg up -q 0
418 $ hg up -q 0
416 $ echo b > a
419 $ echo b > a
417 $ hg ci -m 'mod a'
420 $ hg ci -m 'mod a'
418 created new head
421 created new head
419
422
420 $ hg log -G -T 'changeset: {node}\n desc: {desc}\n'
423 $ hg l
421 @ changeset: ef716627c70bf4ca0bdb623cfb0d6fe5b9acc51e
424 @ changeset: ef716627c70bf4ca0bdb623cfb0d6fe5b9acc51e
422 | desc: mod a
425 | desc: mod a
423 | o changeset: b1a6187e79fbce851bb584eadcb0cc4a80290fd9
426 | o changeset: b1a6187e79fbce851bb584eadcb0cc4a80290fd9
424 | | desc: add c
427 | | desc: add c
425 | o changeset: 472e38d57782172f6c6abed82a94ca0d998c3a22
428 | o changeset: 472e38d57782172f6c6abed82a94ca0d998c3a22
426 |/ desc: mv a b
429 |/ desc: mv a b
427 o changeset: 1451231c87572a7d3f92fc210b4b35711c949a98
430 o changeset: 1451231c87572a7d3f92fc210b4b35711c949a98
428 desc: initial
431 desc: initial
429
432
430 $ hg rebase -s . -d 2
433 $ hg rebase -s . -d 2
431 rebasing 3:ef716627c70b "mod a" (tip)
434 rebasing 3:ef716627c70b "mod a" (tip)
432 merging b and a to b
435 merging b and a to b
433 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/ef716627c70b-24681561-rebase.hg
436 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/ef716627c70b-24681561-rebase.hg
434 $ ls
437 $ ls
435 b
438 b
436 c
439 c
437 $ cat b
440 $ cat b
438 b
441 b
439 $ rm -rf repo
442 $ rm -rf repo
440
443
441 Merge test
444 Merge test
442 ----------
445 ----------
443
446
444 $ hg init repo
447 $ hg init repo
445 $ initclient repo
448 $ initclient repo
446 $ cd repo
449 $ cd repo
447 $ echo a > a
450 $ echo a > a
448 $ hg add a
451 $ hg add a
449 $ hg ci -m initial
452 $ hg ci -m initial
450 $ echo b > a
453 $ echo b > a
451 $ hg ci -m 'modify a'
454 $ hg ci -m 'modify a'
452 $ hg up -q 0
455 $ hg up -q 0
453 $ hg mv a b
456 $ hg mv a b
454 $ hg ci -m 'mv a b'
457 $ hg ci -m 'mv a b'
455 created new head
458 created new head
456 $ hg up -q 2
459 $ hg up -q 2
457
460
458 $ hg log -G -T 'changeset: {node}\n desc: {desc}\n'
461 $ hg l
459 @ changeset: 472e38d57782172f6c6abed82a94ca0d998c3a22
462 @ changeset: 472e38d57782172f6c6abed82a94ca0d998c3a22
460 | desc: mv a b
463 | desc: mv a b
461 | o changeset: b0357b07f79129a3d08a68621271ca1352ae8a09
464 | o changeset: b0357b07f79129a3d08a68621271ca1352ae8a09
462 |/ desc: modify a
465 |/ desc: modify a
463 o changeset: 1451231c87572a7d3f92fc210b4b35711c949a98
466 o changeset: 1451231c87572a7d3f92fc210b4b35711c949a98
464 desc: initial
467 desc: initial
465
468
466 $ hg merge 1
469 $ hg merge 1
467 merging b and a to b
470 merging b and a to b
468 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
471 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
469 (branch merge, don't forget to commit)
472 (branch merge, don't forget to commit)
470 $ hg ci -m merge
473 $ hg ci -m merge
471 $ ls
474 $ ls
472 b
475 b
473 $ cd ..
476 $ cd ..
474 $ rm -rf repo
477 $ rm -rf repo
475
478
476 Copy and move file
479 Copy and move file
477 ------------------
480 ------------------
478
481
479 $ hg init repo
482 $ hg init repo
480 $ initclient repo
483 $ initclient repo
481 $ cd repo
484 $ cd repo
482 $ echo a > a
485 $ echo a > a
483 $ hg add a
486 $ hg add a
484 $ hg ci -m initial
487 $ hg ci -m initial
485 $ hg cp a c
488 $ hg cp a c
486 $ hg mv a b
489 $ hg mv a b
487 $ hg ci -m 'cp a c, mv a b'
490 $ hg ci -m 'cp a c, mv a b'
488 $ hg up -q 0
491 $ hg up -q 0
489 $ echo b > a
492 $ echo b > a
490 $ hg ci -m 'mod a'
493 $ hg ci -m 'mod a'
491 created new head
494 created new head
492
495
493 $ hg log -G -T 'changeset: {node}\n desc: {desc}\n'
496 $ hg l
494 @ changeset: ef716627c70bf4ca0bdb623cfb0d6fe5b9acc51e
497 @ changeset: ef716627c70bf4ca0bdb623cfb0d6fe5b9acc51e
495 | desc: mod a
498 | desc: mod a
496 | o changeset: 4fc3fd13fbdb89ada6b75bfcef3911a689a0dde8
499 | o changeset: 4fc3fd13fbdb89ada6b75bfcef3911a689a0dde8
497 |/ desc: cp a c, mv a b
500 |/ desc: cp a c, mv a b
498 o changeset: 1451231c87572a7d3f92fc210b4b35711c949a98
501 o changeset: 1451231c87572a7d3f92fc210b4b35711c949a98
499 desc: initial
502 desc: initial
500
503
501 $ hg rebase -s . -d 1
504 $ hg rebase -s . -d 1
502 rebasing 2:ef716627c70b "mod a" (tip)
505 rebasing 2:ef716627c70b "mod a" (tip)
503 merging b and a to b
506 merging b and a to b
504 merging c and a to c
507 merging c and a to c
505 saved backup bundle to $TESTTMP/repo/repo/.hg/strip-backup/ef716627c70b-24681561-rebase.hg
508 saved backup bundle to $TESTTMP/repo/repo/.hg/strip-backup/ef716627c70b-24681561-rebase.hg
506 $ ls
509 $ ls
507 b
510 b
508 c
511 c
509 $ cat b
512 $ cat b
510 b
513 b
511 $ cat c
514 $ cat c
512 b
515 b
513 $ cd ..
516 $ cd ..
514 $ rm -rf repo
517 $ rm -rf repo
515
518
516 Do a merge commit with many consequent moves in one branch
519 Do a merge commit with many consequent moves in one branch
517 ----------------------------------------------------------
520 ----------------------------------------------------------
518
521
519 $ hg init repo
522 $ hg init repo
520 $ initclient repo
523 $ initclient repo
521 $ cd repo
524 $ cd repo
522 $ echo a > a
525 $ echo a > a
523 $ hg add a
526 $ hg add a
524 $ hg ci -m initial
527 $ hg ci -m initial
525 $ echo b > a
528 $ echo b > a
526 $ hg ci -qm 'mod a'
529 $ hg ci -qm 'mod a'
527 $ hg up -q ".^"
530 $ hg up -q ".^"
528 $ hg mv a b
531 $ hg mv a b
529 $ hg ci -qm 'mv a b'
532 $ hg ci -qm 'mv a b'
530 $ hg mv b c
533 $ hg mv b c
531 $ hg ci -qm 'mv b c'
534 $ hg ci -qm 'mv b c'
532 $ hg up -q 1
535 $ hg up -q 1
533 $ hg log -G -T 'changeset: {node}\n desc: {desc}\n'
536 $ hg l
534 o changeset: d3efd280421d24f9f229997c19e654761c942a71
537 o changeset: d3efd280421d24f9f229997c19e654761c942a71
535 | desc: mv b c
538 | desc: mv b c
536 o changeset: 472e38d57782172f6c6abed82a94ca0d998c3a22
539 o changeset: 472e38d57782172f6c6abed82a94ca0d998c3a22
537 | desc: mv a b
540 | desc: mv a b
538 | @ changeset: ef716627c70bf4ca0bdb623cfb0d6fe5b9acc51e
541 | @ changeset: ef716627c70bf4ca0bdb623cfb0d6fe5b9acc51e
539 |/ desc: mod a
542 |/ desc: mod a
540 o changeset: 1451231c87572a7d3f92fc210b4b35711c949a98
543 o changeset: 1451231c87572a7d3f92fc210b4b35711c949a98
541 desc: initial
544 desc: initial
542
545
543 $ hg merge 3
546 $ hg merge 3
544 merging a and c to c
547 merging a and c to c
545 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
548 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
546 (branch merge, don't forget to commit)
549 (branch merge, don't forget to commit)
547 $ hg ci -qm 'merge'
550 $ hg ci -qm 'merge'
548 $ hg log -G -T 'changeset: {node}\n desc: {desc}, phase: {phase}\n'
551 $ hg pl
549 @ changeset: cd29b0d08c0f39bfed4cde1b40e30f419db0c825
552 @ changeset: cd29b0d08c0f39bfed4cde1b40e30f419db0c825
550 |\ desc: merge, phase: draft
553 |\ desc: merge, phase: draft
551 | o changeset: d3efd280421d24f9f229997c19e654761c942a71
554 | o changeset: d3efd280421d24f9f229997c19e654761c942a71
552 | | desc: mv b c, phase: draft
555 | | desc: mv b c, phase: draft
553 | o changeset: 472e38d57782172f6c6abed82a94ca0d998c3a22
556 | o changeset: 472e38d57782172f6c6abed82a94ca0d998c3a22
554 | | desc: mv a b, phase: draft
557 | | desc: mv a b, phase: draft
555 o | changeset: ef716627c70bf4ca0bdb623cfb0d6fe5b9acc51e
558 o | changeset: ef716627c70bf4ca0bdb623cfb0d6fe5b9acc51e
556 |/ desc: mod a, phase: draft
559 |/ desc: mod a, phase: draft
557 o changeset: 1451231c87572a7d3f92fc210b4b35711c949a98
560 o changeset: 1451231c87572a7d3f92fc210b4b35711c949a98
558 desc: initial, phase: draft
561 desc: initial, phase: draft
559 $ ls
562 $ ls
560 c
563 c
561 $ cd ..
564 $ cd ..
562 $ rm -rf repo
565 $ rm -rf repo
563
566
564 Test shelve/unshelve
567 Test shelve/unshelve
565 -------------------
568 -------------------
566
569
567 $ hg init repo
570 $ hg init repo
568 $ initclient repo
571 $ initclient repo
569 $ cd repo
572 $ cd repo
570 $ echo a > a
573 $ echo a > a
571 $ hg add a
574 $ hg add a
572 $ hg ci -m initial
575 $ hg ci -m initial
573 $ echo b > a
576 $ echo b > a
574 $ hg shelve
577 $ hg shelve
575 shelved as default
578 shelved as default
576 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
579 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
577 $ hg mv a b
580 $ hg mv a b
578 $ hg ci -m 'mv a b'
581 $ hg ci -m 'mv a b'
579
582
580 $ hg log -G -T 'changeset: {node}\n desc: {desc}\n'
583 $ hg l
581 @ changeset: 472e38d57782172f6c6abed82a94ca0d998c3a22
584 @ changeset: 472e38d57782172f6c6abed82a94ca0d998c3a22
582 | desc: mv a b
585 | desc: mv a b
583 o changeset: 1451231c87572a7d3f92fc210b4b35711c949a98
586 o changeset: 1451231c87572a7d3f92fc210b4b35711c949a98
584 desc: initial
587 desc: initial
585 $ hg unshelve
588 $ hg unshelve
586 unshelving change 'default'
589 unshelving change 'default'
587 rebasing shelved changes
590 rebasing shelved changes
588 merging b and a to b
591 merging b and a to b
589 $ ls
592 $ ls
590 b
593 b
591 $ cat b
594 $ cat b
592 b
595 b
593 $ cd ..
596 $ cd ..
594 $ rm -rf repo
597 $ rm -rf repo
595
598
596 Test full copytrace ability on draft branch
599 Test full copytrace ability on draft branch
597 -------------------------------------------
600 -------------------------------------------
598
601
599 File directory and base name changed in same move
602 File directory and base name changed in same move
600 $ hg init repo
603 $ hg init repo
601 $ initclient repo
604 $ initclient repo
602 $ mkdir repo/dir1
605 $ mkdir repo/dir1
603 $ cd repo/dir1
606 $ cd repo/dir1
604 $ echo a > a
607 $ echo a > a
605 $ hg add a
608 $ hg add a
606 $ hg ci -qm initial
609 $ hg ci -qm initial
607 $ cd ..
610 $ cd ..
608 $ hg mv -q dir1 dir2
611 $ hg mv -q dir1 dir2
609 $ hg mv dir2/a dir2/b
612 $ hg mv dir2/a dir2/b
610 $ hg ci -qm 'mv a b; mv dir1 dir2'
613 $ hg ci -qm 'mv a b; mv dir1 dir2'
611 $ hg up -q '.^'
614 $ hg up -q '.^'
612 $ cd dir1
615 $ cd dir1
613 $ echo b >> a
616 $ echo b >> a
614 $ cd ..
617 $ cd ..
615 $ hg ci -qm 'mod a'
618 $ hg ci -qm 'mod a'
616
619
617 $ hg log -G -T 'changeset {node}\n desc {desc}, phase: {phase}\n'
620 $ hg pl
618 @ changeset 6207d2d318e710b882e3d5ada2a89770efc42c96
621 @ changeset: 6207d2d318e710b882e3d5ada2a89770efc42c96
619 | desc mod a, phase: draft
622 | desc: mod a, phase: draft
620 | o changeset abffdd4e3dfc04bc375034b970299b2a309a1cce
623 | o changeset: abffdd4e3dfc04bc375034b970299b2a309a1cce
621 |/ desc mv a b; mv dir1 dir2, phase: draft
624 |/ desc: mv a b; mv dir1 dir2, phase: draft
622 o changeset 81973cd24b58db2fdf18ce3d64fb2cc3284e9ab3
625 o changeset: 81973cd24b58db2fdf18ce3d64fb2cc3284e9ab3
623 desc initial, phase: draft
626 desc: initial, phase: draft
624
627
625 $ hg rebase -s . -d 1 --config experimental.copytrace.sourcecommitlimit=100
628 $ hg rebase -s . -d 1 --config experimental.copytrace.sourcecommitlimit=100
626 rebasing 2:6207d2d318e7 "mod a" (tip)
629 rebasing 2:6207d2d318e7 "mod a" (tip)
627 merging dir2/b and dir1/a to dir2/b
630 merging dir2/b and dir1/a to dir2/b
628 saved backup bundle to $TESTTMP/repo/repo/.hg/strip-backup/6207d2d318e7-1c9779ad-rebase.hg
631 saved backup bundle to $TESTTMP/repo/repo/.hg/strip-backup/6207d2d318e7-1c9779ad-rebase.hg
629 $ cat dir2/b
632 $ cat dir2/b
630 a
633 a
631 b
634 b
632 $ cd ..
635 $ cd ..
633 $ rm -rf repo
636 $ rm -rf repo
634
637
635 Move directory in one merge parent, while adding file to original directory
638 Move directory in one merge parent, while adding file to original directory
636 in other merge parent. File moved on rebase.
639 in other merge parent. File moved on rebase.
637
640
638 $ hg init repo
641 $ hg init repo
639 $ initclient repo
642 $ initclient repo
640 $ mkdir repo/dir1
643 $ mkdir repo/dir1
641 $ cd repo/dir1
644 $ cd repo/dir1
642 $ echo dummy > dummy
645 $ echo dummy > dummy
643 $ hg add dummy
646 $ hg add dummy
644 $ cd ..
647 $ cd ..
645 $ hg ci -qm initial
648 $ hg ci -qm initial
646 $ cd dir1
649 $ cd dir1
647 $ echo a > a
650 $ echo a > a
648 $ hg add a
651 $ hg add a
649 $ cd ..
652 $ cd ..
650 $ hg ci -qm 'hg add dir1/a'
653 $ hg ci -qm 'hg add dir1/a'
651 $ hg up -q '.^'
654 $ hg up -q '.^'
652 $ hg mv -q dir1 dir2
655 $ hg mv -q dir1 dir2
653 $ hg ci -qm 'mv dir1 dir2'
656 $ hg ci -qm 'mv dir1 dir2'
654
657
655 $ hg log -G -T 'changeset {node}\n desc {desc}, phase: {phase}\n'
658 $ hg pl
656 @ changeset e8919e7df8d036e07b906045eddcd4a42ff1915f
659 @ changeset: e8919e7df8d036e07b906045eddcd4a42ff1915f
657 | desc mv dir1 dir2, phase: draft
660 | desc: mv dir1 dir2, phase: draft
658 | o changeset 7c7c6f339be00f849c3cb2df738ca91db78b32c8
661 | o changeset: 7c7c6f339be00f849c3cb2df738ca91db78b32c8
659 |/ desc hg add dir1/a, phase: draft
662 |/ desc: hg add dir1/a, phase: draft
660 o changeset a235dcce55dcf42034c4e374cb200662d0bb4a13
663 o changeset: a235dcce55dcf42034c4e374cb200662d0bb4a13
661 desc initial, phase: draft
664 desc: initial, phase: draft
662
665
663 $ hg rebase -s . -d 1 --config experimental.copytrace.sourcecommitlimit=100
666 $ hg rebase -s . -d 1 --config experimental.copytrace.sourcecommitlimit=100
664 rebasing 2:e8919e7df8d0 "mv dir1 dir2" (tip)
667 rebasing 2:e8919e7df8d0 "mv dir1 dir2" (tip)
665 saved backup bundle to $TESTTMP/repo/repo/.hg/strip-backup/e8919e7df8d0-f62fab62-rebase.hg
668 saved backup bundle to $TESTTMP/repo/repo/.hg/strip-backup/e8919e7df8d0-f62fab62-rebase.hg
666 $ ls dir2
669 $ ls dir2
667 a
670 a
668 dummy
671 dummy
669 $ rm -rf repo
672 $ rm -rf repo
670
673
671 Testing the sourcecommitlimit config
674 Testing the sourcecommitlimit config
672 -----------------------------------
675 -----------------------------------
673
676
674 $ hg init repo
677 $ hg init repo
675 $ initclient repo
678 $ initclient repo
676 $ cd repo
679 $ cd repo
677 $ echo a > a
680 $ echo a > a
678 $ hg ci -Aqm "added a"
681 $ hg ci -Aqm "added a"
679 $ echo "more things" >> a
682 $ echo "more things" >> a
680 $ hg ci -qm "added more things to a"
683 $ hg ci -qm "added more things to a"
681 $ hg up 0
684 $ hg up 0
682 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
685 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
683 $ echo b > b
686 $ echo b > b
684 $ hg ci -Aqm "added b"
687 $ hg ci -Aqm "added b"
685 $ mkdir foo
688 $ mkdir foo
686 $ hg mv a foo/bar
689 $ hg mv a foo/bar
687 $ hg ci -m "Moved a to foo/bar"
690 $ hg ci -m "Moved a to foo/bar"
688 $ hg log -G -T 'changeset {node}\n desc {desc}, phase: {phase}\n'
691 $ hg pl
689 @ changeset b4b0f7880e500b5c364a5f07b4a2b167de7a6fb0
692 @ changeset: b4b0f7880e500b5c364a5f07b4a2b167de7a6fb0
690 | desc Moved a to foo/bar, phase: draft
693 | desc: Moved a to foo/bar, phase: draft
691 o changeset 5f6d8a4bf34ab274ccc9f631c2536964b8a3666d
694 o changeset: 5f6d8a4bf34ab274ccc9f631c2536964b8a3666d
692 | desc added b, phase: draft
695 | desc: added b, phase: draft
693 | o changeset 8b6e13696c38e8445a759516474640c2f8dddef6
696 | o changeset: 8b6e13696c38e8445a759516474640c2f8dddef6
694 |/ desc added more things to a, phase: draft
697 |/ desc: added more things to a, phase: draft
695 o changeset 9092f1db7931481f93b37d5c9fbcfc341bcd7318
698 o changeset: 9092f1db7931481f93b37d5c9fbcfc341bcd7318
696 desc added a, phase: draft
699 desc: added a, phase: draft
697
700
698 When the sourcecommitlimit is small and we have more drafts, we use heuristics only
701 When the sourcecommitlimit is small and we have more drafts, we use heuristics only
699
702
700 $ hg rebase -s 8b6e13696 -d .
703 $ hg rebase -s 8b6e13696 -d .
701 rebasing 1:8b6e13696c38 "added more things to a"
704 rebasing 1:8b6e13696c38 "added more things to a"
702 file 'a' was deleted in local [dest] but was modified in other [source].
705 file 'a' was deleted in local [dest] but was modified in other [source].
703 What do you want to do?
706 What do you want to do?
704 use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u
707 use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u
705 unresolved conflicts (see hg resolve, then hg rebase --continue)
708 unresolved conflicts (see hg resolve, then hg rebase --continue)
706 [1]
709 [1]
707
710
708 But when we have "sourcecommitlimit > (no. of drafts from base to c1)", we do
711 But when we have "sourcecommitlimit > (no. of drafts from base to c1)", we do
709 fullcopytracing
712 fullcopytracing
710
713
711 $ hg rebase --abort
714 $ hg rebase --abort
712 rebase aborted
715 rebase aborted
713 $ hg rebase -s 8b6e13696 -d . --config experimental.copytrace.sourcecommitlimit=100
716 $ hg rebase -s 8b6e13696 -d . --config experimental.copytrace.sourcecommitlimit=100
714 rebasing 1:8b6e13696c38 "added more things to a"
717 rebasing 1:8b6e13696c38 "added more things to a"
715 merging foo/bar and a to foo/bar
718 merging foo/bar and a to foo/bar
716 saved backup bundle to $TESTTMP/repo/repo/repo/.hg/strip-backup/8b6e13696c38-fc14ac83-rebase.hg
719 saved backup bundle to $TESTTMP/repo/repo/repo/.hg/strip-backup/8b6e13696c38-fc14ac83-rebase.hg
717 $ cd ..
720 $ cd ..
718 $ rm -rf repo
721 $ rm -rf repo
General Comments 0
You need to be logged in to leave comments. Login now