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