Show More
@@ -1,272 +1,272 b'' | |||||
1 | $ cat >> $HGRCPATH<<EOF |
|
1 | $ cat >> $HGRCPATH<<EOF | |
2 | > [extensions] |
|
2 | > [extensions] | |
3 | > drawdag=$TESTDIR/drawdag.py |
|
3 | > drawdag=$TESTDIR/drawdag.py | |
4 | > [experimental] |
|
4 | > [experimental] | |
5 | > stabilization=all |
|
5 | > stabilization=all | |
6 | > EOF |
|
6 | > EOF | |
7 |
|
7 | |||
8 | $ reinit () { |
|
8 | $ reinit () { | |
9 | > rm -rf .hg && hg init |
|
9 | > rm -rf .hg && hg init | |
10 | > } |
|
10 | > } | |
11 |
|
11 | |||
12 | $ hg init |
|
12 | $ hg init | |
13 |
|
13 | |||
14 | Test what said in drawdag.py docstring |
|
14 | Test what said in drawdag.py docstring | |
15 |
|
15 | |||
16 | $ hg debugdrawdag <<'EOS' |
|
16 | $ hg debugdrawdag <<'EOS' | |
17 | > c d |
|
17 | > c d | |
18 | > |/ |
|
18 | > |/ | |
19 | > b |
|
19 | > b | |
20 | > | |
|
20 | > | | |
21 | > a |
|
21 | > a | |
22 | > EOS |
|
22 | > EOS | |
23 |
|
23 | |||
24 | $ hg log -G -T '{rev} {desc} ({tags})' |
|
24 | $ hg log -G -T '{rev} {desc} ({tags})' | |
25 | o 3 d (d tip) |
|
25 | o 3 d (d tip) | |
26 | | |
|
26 | | | |
27 | | o 2 c (c) |
|
27 | | o 2 c (c) | |
28 | |/ |
|
28 | |/ | |
29 | o 1 b (b) |
|
29 | o 1 b (b) | |
30 | | |
|
30 | | | |
31 | o 0 a (a) |
|
31 | o 0 a (a) | |
32 |
|
32 | |||
33 | $ hg debugdrawdag <<'EOS' |
|
33 | $ hg debugdrawdag <<'EOS' | |
34 | > foo bar bar foo |
|
34 | > foo bar bar foo | |
35 | > | / | | |
|
35 | > | / | | | |
36 | > ancestor(c,d) a baz |
|
36 | > ancestor(c,d) a baz | |
37 | > EOS |
|
37 | > EOS | |
38 |
|
38 | |||
39 | $ hg log -G -T '{desc}' |
|
39 | $ hg log -G -T '{desc}' | |
40 | o foo |
|
40 | o foo | |
41 | |\ |
|
41 | |\ | |
42 | +---o bar |
|
42 | +---o bar | |
43 | | | | |
|
43 | | | | | |
44 | | o | baz |
|
44 | | o | baz | |
45 | | / |
|
45 | | / | |
46 | +---o d |
|
46 | +---o d | |
47 | | | |
|
47 | | | | |
48 | +---o c |
|
48 | +---o c | |
49 | | | |
|
49 | | | | |
50 | o | b |
|
50 | o | b | |
51 | |/ |
|
51 | |/ | |
52 | o a |
|
52 | o a | |
53 |
|
53 | |||
54 | $ reinit |
|
54 | $ reinit | |
55 |
|
55 | |||
56 | $ hg debugdrawdag <<'EOS' |
|
56 | $ hg debugdrawdag <<'EOS' | |
57 | > o foo |
|
57 | > o foo | |
58 | > |\ |
|
58 | > |\ | |
59 | > +---o bar |
|
59 | > +---o bar | |
60 | > | | | |
|
60 | > | | | | |
61 | > | o | baz |
|
61 | > | o | baz | |
62 | > | / |
|
62 | > | / | |
63 | > +---o d |
|
63 | > +---o d | |
64 | > | | |
|
64 | > | | | |
65 | > +---o c |
|
65 | > +---o c | |
66 | > | | |
|
66 | > | | | |
67 | > o | b |
|
67 | > o | b | |
68 | > |/ |
|
68 | > |/ | |
69 | > o a |
|
69 | > o a | |
70 | > EOS |
|
70 | > EOS | |
71 |
|
71 | |||
72 | $ hg log -G -T '{desc}' |
|
72 | $ hg log -G -T '{desc}' | |
73 | o foo |
|
73 | o foo | |
74 | |\ |
|
74 | |\ | |
75 | | | o d |
|
75 | | | o d | |
76 | | |/ |
|
76 | | |/ | |
77 | | | o c |
|
77 | | | o c | |
78 | | |/ |
|
78 | | |/ | |
79 | | | o bar |
|
79 | | | o bar | |
80 | | |/| |
|
80 | | |/| | |
81 | | o | b |
|
81 | | o | b | |
82 | | |/ |
|
82 | | |/ | |
83 | o / baz |
|
83 | o / baz | |
84 | / |
|
84 | / | |
85 | o a |
|
85 | o a | |
86 |
|
86 | |||
87 | $ reinit |
|
87 | $ reinit | |
88 |
|
88 | |||
89 | $ hg debugdrawdag <<'EOS' |
|
89 | $ hg debugdrawdag <<'EOS' | |
90 | > o foo |
|
90 | > o foo | |
91 | > |\ |
|
91 | > |\ | |
92 | > | | o d |
|
92 | > | | o d | |
93 | > | |/ |
|
93 | > | |/ | |
94 | > | | o c |
|
94 | > | | o c | |
95 | > | |/ |
|
95 | > | |/ | |
96 | > | | o bar |
|
96 | > | | o bar | |
97 | > | |/| |
|
97 | > | |/| | |
98 | > | o | b |
|
98 | > | o | b | |
99 | > | |/ |
|
99 | > | |/ | |
100 | > o / baz |
|
100 | > o / baz | |
101 | > / |
|
101 | > / | |
102 | > o a |
|
102 | > o a | |
103 | > EOS |
|
103 | > EOS | |
104 |
|
104 | |||
105 | $ hg log -G -T '{desc}' |
|
105 | $ hg log -G -T '{desc}' | |
106 | o foo |
|
106 | o foo | |
107 | |\ |
|
107 | |\ | |
108 | | | o d |
|
108 | | | o d | |
109 | | |/ |
|
109 | | |/ | |
110 | | | o c |
|
110 | | | o c | |
111 | | |/ |
|
111 | | |/ | |
112 | | | o bar |
|
112 | | | o bar | |
113 | | |/| |
|
113 | | |/| | |
114 | | o | b |
|
114 | | o | b | |
115 | | |/ |
|
115 | | |/ | |
116 | o / baz |
|
116 | o / baz | |
117 | / |
|
117 | / | |
118 | o a |
|
118 | o a | |
119 |
|
119 | |||
120 | $ hg manifest -r a |
|
120 | $ hg manifest -r a | |
121 | a |
|
121 | a | |
122 | $ hg manifest -r b |
|
122 | $ hg manifest -r b | |
123 | a |
|
123 | a | |
124 | b |
|
124 | b | |
125 | $ hg manifest -r bar |
|
125 | $ hg manifest -r bar | |
126 | a |
|
126 | a | |
127 | b |
|
127 | b | |
128 | $ hg manifest -r foo |
|
128 | $ hg manifest -r foo | |
129 | a |
|
129 | a | |
130 | b |
|
130 | b | |
131 | baz |
|
131 | baz | |
132 |
|
132 | |||
133 | Edges existed in repo are no-ops |
|
133 | Edges existed in repo are no-ops | |
134 |
|
134 | |||
135 | $ reinit |
|
135 | $ reinit | |
136 | $ hg debugdrawdag <<'EOS' |
|
136 | $ hg debugdrawdag <<'EOS' | |
137 | > B C C |
|
137 | > B C C | |
138 | > | | | |
|
138 | > | | | | |
139 | > A A B |
|
139 | > A A B | |
140 | > EOS |
|
140 | > EOS | |
141 |
|
141 | |||
142 | $ hg log -G -T '{desc}' |
|
142 | $ hg log -G -T '{desc}' | |
143 | o C |
|
143 | o C | |
144 | |\ |
|
144 | |\ | |
145 | | o B |
|
145 | | o B | |
146 | |/ |
|
146 | |/ | |
147 | o A |
|
147 | o A | |
148 |
|
148 | |||
149 |
|
149 | |||
150 | $ hg debugdrawdag <<'EOS' |
|
150 | $ hg debugdrawdag <<'EOS' | |
151 | > C D C |
|
151 | > C D C | |
152 | > | | | |
|
152 | > | | | | |
153 | > B B A |
|
153 | > B B A | |
154 | > EOS |
|
154 | > EOS | |
155 |
|
155 | |||
156 | $ hg log -G -T '{desc}' |
|
156 | $ hg log -G -T '{desc}' | |
157 | o D |
|
157 | o D | |
158 | | |
|
158 | | | |
159 | | o C |
|
159 | | o C | |
160 | |/| |
|
160 | |/| | |
161 | o | B |
|
161 | o | B | |
162 | |/ |
|
162 | |/ | |
163 | o A |
|
163 | o A | |
164 |
|
164 | |||
165 |
|
165 | |||
166 | Node with more than 2 parents are disallowed |
|
166 | Node with more than 2 parents are disallowed | |
167 |
|
167 | |||
168 | $ hg debugdrawdag <<'EOS' |
|
168 | $ hg debugdrawdag <<'EOS' | |
169 | > A |
|
169 | > A | |
170 | > /|\ |
|
170 | > /|\ | |
171 | > D B C |
|
171 | > D B C | |
172 | > EOS |
|
172 | > EOS | |
173 | abort: A: too many parents: C D B |
|
173 | abort: A: too many parents: C D B | |
174 | [255] |
|
174 | [255] | |
175 |
|
175 | |||
176 | Cycles are disallowed |
|
176 | Cycles are disallowed | |
177 |
|
177 | |||
178 | $ hg debugdrawdag <<'EOS' |
|
178 | $ hg debugdrawdag <<'EOS' | |
179 | > A |
|
179 | > A | |
180 | > | |
|
180 | > | | |
181 | > A |
|
181 | > A | |
182 | > EOS |
|
182 | > EOS | |
183 | abort: the graph has cycles |
|
183 | abort: the graph has cycles | |
184 | [255] |
|
184 | [255] | |
185 |
|
185 | |||
186 | $ hg debugdrawdag <<'EOS' |
|
186 | $ hg debugdrawdag <<'EOS' | |
187 | > A |
|
187 | > A | |
188 | > | |
|
188 | > | | |
189 | > B |
|
189 | > B | |
190 | > | |
|
190 | > | | |
191 | > A |
|
191 | > A | |
192 | > EOS |
|
192 | > EOS | |
193 | abort: the graph has cycles |
|
193 | abort: the graph has cycles | |
194 | [255] |
|
194 | [255] | |
195 |
|
195 | |||
196 | Create obsmarkers via comments |
|
196 | Create obsmarkers via comments | |
197 |
|
197 | |||
198 | $ reinit |
|
198 | $ reinit | |
199 |
|
199 | |||
200 | $ hg debugdrawdag <<'EOS' |
|
200 | $ hg debugdrawdag <<'EOS' | |
201 | > G |
|
201 | > G | |
202 | > | |
|
202 | > | | |
203 | > I D C F # split: B -> E, F, G |
|
203 | > I D C F # split: B -> E, F, G | |
204 | > \ \| | # replace: C -> D -> H |
|
204 | > \ \| | # replace: C -> D -> H | |
205 | > H B E # prune: F, I |
|
205 | > H B E # prune: F, I | |
206 | > \|/ |
|
206 | > \|/ | |
207 | > A |
|
207 | > A | |
208 | > EOS |
|
208 | > EOS | |
209 |
|
209 | |||
210 | $ hg log -r 'sort(all(), topo)' -G --hidden -T '{desc} {node}' |
|
210 | $ hg log -r 'sort(all(), topo)' -G --hidden -T '{desc} {node}' | |
211 | o G 711f53bbef0bebd12eb6f0511d5e2e998b984846 |
|
211 | o G 711f53bbef0bebd12eb6f0511d5e2e998b984846 | |
212 | | |
|
212 | | | |
213 | x F 64a8289d249234b9886244d379f15e6b650b28e3 |
|
213 | x F 64a8289d249234b9886244d379f15e6b650b28e3 | |
214 | | |
|
214 | | | |
215 | o E 7fb047a69f220c21711122dfd94305a9efb60cba |
|
215 | o E 7fb047a69f220c21711122dfd94305a9efb60cba | |
216 | | |
|
216 | | | |
217 | | x D be0ef73c17ade3fc89dc41701eb9fc3a91b58282 |
|
217 | | x D be0ef73c17ade3fc89dc41701eb9fc3a91b58282 | |
218 | | | |
|
218 | | | | |
219 | | | x C 26805aba1e600a82e93661149f2313866a221a7b |
|
219 | | | x C 26805aba1e600a82e93661149f2313866a221a7b | |
220 | | |/ |
|
220 | | |/ | |
221 | | x B 112478962961147124edd43549aedd1a335e44bf |
|
221 | | x B 112478962961147124edd43549aedd1a335e44bf | |
222 | |/ |
|
222 | |/ | |
223 | | x I 58e6b987bf7045fcd9c54f496396ca1d1fc81047 |
|
223 | | x I 58e6b987bf7045fcd9c54f496396ca1d1fc81047 | |
224 | | | |
|
224 | | | | |
225 | | o H 575c4b5ec114d64b681d33f8792853568bfb2b2c |
|
225 | | o H 575c4b5ec114d64b681d33f8792853568bfb2b2c | |
226 | |/ |
|
226 | |/ | |
227 | o A 426bada5c67598ca65036d57d9e4b64b0c1ce7a0 |
|
227 | o A 426bada5c67598ca65036d57d9e4b64b0c1ce7a0 | |
228 |
|
228 | |||
229 | $ hg debugobsolete |
|
229 | $ hg debugobsolete | |
230 | 112478962961147124edd43549aedd1a335e44bf 7fb047a69f220c21711122dfd94305a9efb60cba 64a8289d249234b9886244d379f15e6b650b28e3 711f53bbef0bebd12eb6f0511d5e2e998b984846 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
230 | 112478962961147124edd43549aedd1a335e44bf 7fb047a69f220c21711122dfd94305a9efb60cba 64a8289d249234b9886244d379f15e6b650b28e3 711f53bbef0bebd12eb6f0511d5e2e998b984846 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
231 | 26805aba1e600a82e93661149f2313866a221a7b be0ef73c17ade3fc89dc41701eb9fc3a91b58282 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
231 | 26805aba1e600a82e93661149f2313866a221a7b be0ef73c17ade3fc89dc41701eb9fc3a91b58282 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
232 | be0ef73c17ade3fc89dc41701eb9fc3a91b58282 575c4b5ec114d64b681d33f8792853568bfb2b2c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
232 | be0ef73c17ade3fc89dc41701eb9fc3a91b58282 575c4b5ec114d64b681d33f8792853568bfb2b2c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
233 | 64a8289d249234b9886244d379f15e6b650b28e3 0 {7fb047a69f220c21711122dfd94305a9efb60cba} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
233 | 64a8289d249234b9886244d379f15e6b650b28e3 0 {7fb047a69f220c21711122dfd94305a9efb60cba} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
234 | 58e6b987bf7045fcd9c54f496396ca1d1fc81047 0 {575c4b5ec114d64b681d33f8792853568bfb2b2c} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
234 | 58e6b987bf7045fcd9c54f496396ca1d1fc81047 0 {575c4b5ec114d64b681d33f8792853568bfb2b2c} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
235 |
|
235 | |||
236 | Change file contents via comments |
|
236 | Change file contents via comments | |
237 |
|
237 | |||
238 | $ reinit |
|
238 | $ reinit | |
239 | $ hg debugdrawdag <<'EOS' |
|
239 | $ hg debugdrawdag <<'EOS' | |
240 | > C # A/dir1/a = 1\n2 |
|
240 | > C # A/dir1/a = 1\n2 | |
241 | > |\ # B/dir2/b = 34 |
|
241 | > |\ # B/dir2/b = 34 | |
242 | > A B # C/dir1/c = 5 |
|
242 | > A B # C/dir1/c = 5 | |
243 | > # C/dir2/c = 6 |
|
243 | > # C/dir2/c = 6 | |
244 | > # C/A = a |
|
244 | > # C/A = a | |
245 | > # C/B = b |
|
245 | > # C/B = b | |
246 | > EOS |
|
246 | > EOS | |
247 |
|
247 | |||
248 | $ hg log -G -T '{desc} {files}' |
|
248 | $ hg log -G -T '{desc} {files}' | |
249 | o C A B dir1/c dir2/c |
|
249 | o C A B dir1/c dir2/c | |
250 | |\ |
|
250 | |\ | |
251 | | o B B dir2/b |
|
251 | | o B B dir2/b | |
252 | | |
|
252 | | | |
253 | o A A dir1/a |
|
253 | o A A dir1/a | |
254 |
|
254 | |||
255 | $ for f in `hg files -r C`; do |
|
255 | $ for f in `hg files -r C`; do | |
256 | > echo FILE "$f" |
|
256 | > echo FILE "$f" | |
257 | > hg cat -r C "$f" |
|
257 | > hg cat -r C "$f" | |
258 | > echo |
|
258 | > echo | |
259 | > done |
|
259 | > done | |
260 | FILE A |
|
260 | FILE A | |
261 | a |
|
261 | a | |
262 | FILE B |
|
262 | FILE B | |
263 | b |
|
263 | b | |
264 | FILE dir1/a |
|
264 | FILE dir1/a (glob) | |
265 | 1 |
|
265 | 1 | |
266 | 2 |
|
266 | 2 | |
267 | FILE dir1/c |
|
267 | FILE dir1/c (glob) | |
268 | 5 |
|
268 | 5 | |
269 | FILE dir2/b |
|
269 | FILE dir2/b (glob) | |
270 | 34 |
|
270 | 34 | |
271 | FILE dir2/c |
|
271 | FILE dir2/c (glob) | |
272 | 6 |
|
272 | 6 |
@@ -1,397 +1,397 b'' | |||||
1 | $ USERCACHE="$TESTTMP/cache"; export USERCACHE |
|
1 | $ USERCACHE="$TESTTMP/cache"; export USERCACHE | |
2 | $ mkdir "${USERCACHE}" |
|
2 | $ mkdir "${USERCACHE}" | |
3 | $ cat >> $HGRCPATH <<EOF |
|
3 | $ cat >> $HGRCPATH <<EOF | |
4 | > [format] |
|
4 | > [format] | |
5 | > usegeneraldelta=yes |
|
5 | > usegeneraldelta=yes | |
6 | > [extensions] |
|
6 | > [extensions] | |
7 | > largefiles = |
|
7 | > largefiles = | |
8 | > share = |
|
8 | > share = | |
9 | > strip = |
|
9 | > strip = | |
10 | > convert = |
|
10 | > convert = | |
11 | > [largefiles] |
|
11 | > [largefiles] | |
12 | > minsize = 0.5 |
|
12 | > minsize = 0.5 | |
13 | > patterns = **.other |
|
13 | > patterns = **.other | |
14 | > **.dat |
|
14 | > **.dat | |
15 | > usercache=${USERCACHE} |
|
15 | > usercache=${USERCACHE} | |
16 | > EOF |
|
16 | > EOF | |
17 |
|
17 | |||
18 | "lfconvert" works |
|
18 | "lfconvert" works | |
19 | $ hg init bigfile-repo |
|
19 | $ hg init bigfile-repo | |
20 | $ cd bigfile-repo |
|
20 | $ cd bigfile-repo | |
21 | $ cat >> .hg/hgrc <<EOF |
|
21 | $ cat >> .hg/hgrc <<EOF | |
22 | > [extensions] |
|
22 | > [extensions] | |
23 | > largefiles = ! |
|
23 | > largefiles = ! | |
24 | > EOF |
|
24 | > EOF | |
25 | $ mkdir sub |
|
25 | $ mkdir sub | |
26 | $ dd if=/dev/zero bs=1k count=256 > large 2> /dev/null |
|
26 | $ dd if=/dev/zero bs=1k count=256 > large 2> /dev/null | |
27 | $ dd if=/dev/zero bs=1k count=256 > large2 2> /dev/null |
|
27 | $ dd if=/dev/zero bs=1k count=256 > large2 2> /dev/null | |
28 | $ echo normal > normal1 |
|
28 | $ echo normal > normal1 | |
29 | $ echo alsonormal > sub/normal2 |
|
29 | $ echo alsonormal > sub/normal2 | |
30 | $ dd if=/dev/zero bs=1k count=10 > sub/maybelarge.dat 2> /dev/null |
|
30 | $ dd if=/dev/zero bs=1k count=10 > sub/maybelarge.dat 2> /dev/null | |
31 | $ hg addremove |
|
31 | $ hg addremove | |
32 | adding large |
|
32 | adding large | |
33 | adding large2 |
|
33 | adding large2 | |
34 | adding normal1 |
|
34 | adding normal1 | |
35 | adding sub/maybelarge.dat |
|
35 | adding sub/maybelarge.dat | |
36 | adding sub/normal2 |
|
36 | adding sub/normal2 | |
37 | $ hg commit -m"add large, normal1" large normal1 |
|
37 | $ hg commit -m"add large, normal1" large normal1 | |
38 | $ hg commit -m"add sub/*" sub |
|
38 | $ hg commit -m"add sub/*" sub | |
39 |
|
39 | |||
40 | Test tag parsing |
|
40 | Test tag parsing | |
41 | $ cat >> .hgtags <<EOF |
|
41 | $ cat >> .hgtags <<EOF | |
42 | > IncorrectlyFormattedTag! |
|
42 | > IncorrectlyFormattedTag! | |
43 | > invalidhash sometag |
|
43 | > invalidhash sometag | |
44 | > 0123456789abcdef anothertag |
|
44 | > 0123456789abcdef anothertag | |
45 | > EOF |
|
45 | > EOF | |
46 | $ hg add .hgtags |
|
46 | $ hg add .hgtags | |
47 | $ hg commit -m"add large2" large2 .hgtags |
|
47 | $ hg commit -m"add large2" large2 .hgtags | |
48 |
|
48 | |||
49 | Test link+rename largefile codepath |
|
49 | Test link+rename largefile codepath | |
50 | $ [ -d .hg/largefiles ] && echo fail || echo pass |
|
50 | $ [ -d .hg/largefiles ] && echo fail || echo pass | |
51 | pass |
|
51 | pass | |
52 | $ cd .. |
|
52 | $ cd .. | |
53 | $ hg lfconvert --size 0.2 bigfile-repo largefiles-repo |
|
53 | $ hg lfconvert --size 0.2 bigfile-repo largefiles-repo | |
54 | initializing destination largefiles-repo |
|
54 | initializing destination largefiles-repo | |
55 | skipping incorrectly formatted tag IncorrectlyFormattedTag! |
|
55 | skipping incorrectly formatted tag IncorrectlyFormattedTag! | |
56 | skipping incorrectly formatted id invalidhash |
|
56 | skipping incorrectly formatted id invalidhash | |
57 | no mapping for id 0123456789abcdef |
|
57 | no mapping for id 0123456789abcdef | |
58 | #if symlink |
|
58 | #if symlink | |
59 | $ hg --cwd bigfile-repo rename large2 large3 |
|
59 | $ hg --cwd bigfile-repo rename large2 large3 | |
60 | $ ln -sf large bigfile-repo/large3 |
|
60 | $ ln -sf large bigfile-repo/large3 | |
61 | $ hg --cwd bigfile-repo commit -m"make large2 a symlink" large2 large3 |
|
61 | $ hg --cwd bigfile-repo commit -m"make large2 a symlink" large2 large3 | |
62 | $ hg lfconvert --size 0.2 bigfile-repo largefiles-repo-symlink |
|
62 | $ hg lfconvert --size 0.2 bigfile-repo largefiles-repo-symlink | |
63 | initializing destination largefiles-repo-symlink |
|
63 | initializing destination largefiles-repo-symlink | |
64 | skipping incorrectly formatted tag IncorrectlyFormattedTag! |
|
64 | skipping incorrectly formatted tag IncorrectlyFormattedTag! | |
65 | skipping incorrectly formatted id invalidhash |
|
65 | skipping incorrectly formatted id invalidhash | |
66 | no mapping for id 0123456789abcdef |
|
66 | no mapping for id 0123456789abcdef | |
67 | abort: renamed/copied largefile large3 becomes symlink |
|
67 | abort: renamed/copied largefile large3 becomes symlink | |
68 | [255] |
|
68 | [255] | |
69 | #endif |
|
69 | #endif | |
70 | $ cd bigfile-repo |
|
70 | $ cd bigfile-repo | |
71 | $ hg strip --no-backup 2 |
|
71 | $ hg strip --no-backup 2 | |
72 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
72 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
73 | $ cd .. |
|
73 | $ cd .. | |
74 | $ rm -rf largefiles-repo largefiles-repo-symlink |
|
74 | $ rm -rf largefiles-repo largefiles-repo-symlink | |
75 |
|
75 | |||
76 | $ hg lfconvert --size 0.2 bigfile-repo largefiles-repo |
|
76 | $ hg lfconvert --size 0.2 bigfile-repo largefiles-repo | |
77 | initializing destination largefiles-repo |
|
77 | initializing destination largefiles-repo | |
78 |
|
78 | |||
79 | "lfconvert" converts content correctly |
|
79 | "lfconvert" converts content correctly | |
80 | $ cd largefiles-repo |
|
80 | $ cd largefiles-repo | |
81 | $ hg up |
|
81 | $ hg up | |
82 | getting changed largefiles |
|
82 | getting changed largefiles | |
83 | 2 largefiles updated, 0 removed |
|
83 | 2 largefiles updated, 0 removed | |
84 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
84 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
85 | $ hg locate |
|
85 | $ hg locate | |
86 | .hglf/large |
|
86 | .hglf/large | |
87 | .hglf/sub/maybelarge.dat |
|
87 | .hglf/sub/maybelarge.dat | |
88 | normal1 |
|
88 | normal1 | |
89 | sub/normal2 |
|
89 | sub/normal2 | |
90 | $ cat normal1 |
|
90 | $ cat normal1 | |
91 | normal |
|
91 | normal | |
92 | $ cat sub/normal2 |
|
92 | $ cat sub/normal2 | |
93 | alsonormal |
|
93 | alsonormal | |
94 | $ md5sum.py large sub/maybelarge.dat |
|
94 | $ md5sum.py large sub/maybelarge.dat | |
95 | ec87a838931d4d5d2e94a04644788a55 large |
|
95 | ec87a838931d4d5d2e94a04644788a55 large | |
96 | 1276481102f218c981e0324180bafd9f sub/maybelarge.dat |
|
96 | 1276481102f218c981e0324180bafd9f sub/maybelarge.dat | |
97 |
|
97 | |||
98 | "lfconvert" adds 'largefiles' to .hg/requires. |
|
98 | "lfconvert" adds 'largefiles' to .hg/requires. | |
99 | $ cat .hg/requires |
|
99 | $ cat .hg/requires | |
100 | dotencode |
|
100 | dotencode | |
101 | fncache |
|
101 | fncache | |
102 | generaldelta |
|
102 | generaldelta | |
103 | largefiles |
|
103 | largefiles | |
104 | revlogv1 |
|
104 | revlogv1 | |
105 | store |
|
105 | store | |
106 |
|
106 | |||
107 | "lfconvert" includes a newline at the end of the standin files. |
|
107 | "lfconvert" includes a newline at the end of the standin files. | |
108 | $ cat .hglf/large .hglf/sub/maybelarge.dat |
|
108 | $ cat .hglf/large .hglf/sub/maybelarge.dat | |
109 | 2e000fa7e85759c7f4c254d4d9c33ef481e459a7 |
|
109 | 2e000fa7e85759c7f4c254d4d9c33ef481e459a7 | |
110 | 34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c |
|
110 | 34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c | |
111 | $ cd .. |
|
111 | $ cd .. | |
112 |
|
112 | |||
113 | add some changesets to rename/remove/merge |
|
113 | add some changesets to rename/remove/merge | |
114 | $ cd bigfile-repo |
|
114 | $ cd bigfile-repo | |
115 | $ hg mv -q sub stuff |
|
115 | $ hg mv -q sub stuff | |
116 | $ hg commit -m"rename sub/ to stuff/" |
|
116 | $ hg commit -m"rename sub/ to stuff/" | |
117 | $ hg update -q 1 |
|
117 | $ hg update -q 1 | |
118 | $ echo blah >> normal3 |
|
118 | $ echo blah >> normal3 | |
119 | $ echo blah >> sub/normal2 |
|
119 | $ echo blah >> sub/normal2 | |
120 | $ echo blah >> sub/maybelarge.dat |
|
120 | $ echo blah >> sub/maybelarge.dat | |
121 | $ md5sum.py sub/maybelarge.dat |
|
121 | $ md5sum.py sub/maybelarge.dat | |
122 | 1dd0b99ff80e19cff409702a1d3f5e15 sub/maybelarge.dat |
|
122 | 1dd0b99ff80e19cff409702a1d3f5e15 sub/maybelarge.dat | |
123 | $ hg commit -A -m"add normal3, modify sub/*" |
|
123 | $ hg commit -A -m"add normal3, modify sub/*" | |
124 | adding normal3 |
|
124 | adding normal3 | |
125 | created new head |
|
125 | created new head | |
126 | $ hg rm large normal3 |
|
126 | $ hg rm large normal3 | |
127 | $ hg commit -q -m"remove large, normal3" |
|
127 | $ hg commit -q -m"remove large, normal3" | |
128 | $ hg merge |
|
128 | $ hg merge | |
129 | merging sub/maybelarge.dat and stuff/maybelarge.dat to stuff/maybelarge.dat |
|
129 | merging sub/maybelarge.dat and stuff/maybelarge.dat to stuff/maybelarge.dat | |
130 | merging sub/normal2 and stuff/normal2 to stuff/normal2 |
|
130 | merging sub/normal2 and stuff/normal2 to stuff/normal2 | |
131 |
warning: stuff/maybelarge.dat looks like a binary file. |
|
131 | warning: stuff/maybelarge.dat looks like a binary file. | |
132 | warning: conflicts while merging stuff/maybelarge.dat! (edit, then use 'hg resolve --mark') |
|
132 | warning: conflicts while merging stuff/maybelarge.dat! (edit, then use 'hg resolve --mark') | |
133 | 0 files updated, 1 files merged, 0 files removed, 1 files unresolved |
|
133 | 0 files updated, 1 files merged, 0 files removed, 1 files unresolved | |
134 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
134 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
135 | [1] |
|
135 | [1] | |
136 | $ hg cat -r . sub/maybelarge.dat > stuff/maybelarge.dat |
|
136 | $ hg cat -r . sub/maybelarge.dat > stuff/maybelarge.dat | |
137 | $ hg resolve -m stuff/maybelarge.dat |
|
137 | $ hg resolve -m stuff/maybelarge.dat | |
138 | (no more unresolved files) |
|
138 | (no more unresolved files) | |
139 | $ hg commit -m"merge" |
|
139 | $ hg commit -m"merge" | |
140 | $ hg log -G --template "{rev}:{node|short} {desc|firstline}\n" |
|
140 | $ hg log -G --template "{rev}:{node|short} {desc|firstline}\n" | |
141 | @ 5:4884f215abda merge |
|
141 | @ 5:4884f215abda merge | |
142 | |\ |
|
142 | |\ | |
143 | | o 4:7285f817b77e remove large, normal3 |
|
143 | | o 4:7285f817b77e remove large, normal3 | |
144 | | | |
|
144 | | | | |
145 | | o 3:67e3892e3534 add normal3, modify sub/* |
|
145 | | o 3:67e3892e3534 add normal3, modify sub/* | |
146 | | | |
|
146 | | | | |
147 | o | 2:c96c8beb5d56 rename sub/ to stuff/ |
|
147 | o | 2:c96c8beb5d56 rename sub/ to stuff/ | |
148 | |/ |
|
148 | |/ | |
149 | o 1:020c65d24e11 add sub/* |
|
149 | o 1:020c65d24e11 add sub/* | |
150 | | |
|
150 | | | |
151 | o 0:117b8328f97a add large, normal1 |
|
151 | o 0:117b8328f97a add large, normal1 | |
152 |
|
152 | |||
153 | $ cd .. |
|
153 | $ cd .. | |
154 |
|
154 | |||
155 | lfconvert with rename, merge, and remove |
|
155 | lfconvert with rename, merge, and remove | |
156 | $ rm -rf largefiles-repo |
|
156 | $ rm -rf largefiles-repo | |
157 | $ hg lfconvert --size 0.2 bigfile-repo largefiles-repo |
|
157 | $ hg lfconvert --size 0.2 bigfile-repo largefiles-repo | |
158 | initializing destination largefiles-repo |
|
158 | initializing destination largefiles-repo | |
159 | $ cd largefiles-repo |
|
159 | $ cd largefiles-repo | |
160 | $ hg log -G --template "{rev}:{node|short} {desc|firstline}\n" |
|
160 | $ hg log -G --template "{rev}:{node|short} {desc|firstline}\n" | |
161 | o 5:8e05f5f2b77e merge |
|
161 | o 5:8e05f5f2b77e merge | |
162 | |\ |
|
162 | |\ | |
163 | | o 4:a5a02de7a8e4 remove large, normal3 |
|
163 | | o 4:a5a02de7a8e4 remove large, normal3 | |
164 | | | |
|
164 | | | | |
165 | | o 3:55759520c76f add normal3, modify sub/* |
|
165 | | o 3:55759520c76f add normal3, modify sub/* | |
166 | | | |
|
166 | | | | |
167 | o | 2:261ad3f3f037 rename sub/ to stuff/ |
|
167 | o | 2:261ad3f3f037 rename sub/ to stuff/ | |
168 | |/ |
|
168 | |/ | |
169 | o 1:334e5237836d add sub/* |
|
169 | o 1:334e5237836d add sub/* | |
170 | | |
|
170 | | | |
171 | o 0:d4892ec57ce2 add large, normal1 |
|
171 | o 0:d4892ec57ce2 add large, normal1 | |
172 |
|
172 | |||
173 | $ hg locate -r 2 |
|
173 | $ hg locate -r 2 | |
174 | .hglf/large |
|
174 | .hglf/large | |
175 | .hglf/stuff/maybelarge.dat |
|
175 | .hglf/stuff/maybelarge.dat | |
176 | normal1 |
|
176 | normal1 | |
177 | stuff/normal2 |
|
177 | stuff/normal2 | |
178 | $ hg locate -r 3 |
|
178 | $ hg locate -r 3 | |
179 | .hglf/large |
|
179 | .hglf/large | |
180 | .hglf/sub/maybelarge.dat |
|
180 | .hglf/sub/maybelarge.dat | |
181 | normal1 |
|
181 | normal1 | |
182 | normal3 |
|
182 | normal3 | |
183 | sub/normal2 |
|
183 | sub/normal2 | |
184 | $ hg locate -r 4 |
|
184 | $ hg locate -r 4 | |
185 | .hglf/sub/maybelarge.dat |
|
185 | .hglf/sub/maybelarge.dat | |
186 | normal1 |
|
186 | normal1 | |
187 | sub/normal2 |
|
187 | sub/normal2 | |
188 | $ hg locate -r 5 |
|
188 | $ hg locate -r 5 | |
189 | .hglf/stuff/maybelarge.dat |
|
189 | .hglf/stuff/maybelarge.dat | |
190 | normal1 |
|
190 | normal1 | |
191 | stuff/normal2 |
|
191 | stuff/normal2 | |
192 | $ hg update |
|
192 | $ hg update | |
193 | getting changed largefiles |
|
193 | getting changed largefiles | |
194 | 1 largefiles updated, 0 removed |
|
194 | 1 largefiles updated, 0 removed | |
195 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
195 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
196 | $ cat stuff/normal2 |
|
196 | $ cat stuff/normal2 | |
197 | alsonormal |
|
197 | alsonormal | |
198 | blah |
|
198 | blah | |
199 | $ md5sum.py stuff/maybelarge.dat |
|
199 | $ md5sum.py stuff/maybelarge.dat | |
200 | 1dd0b99ff80e19cff409702a1d3f5e15 stuff/maybelarge.dat |
|
200 | 1dd0b99ff80e19cff409702a1d3f5e15 stuff/maybelarge.dat | |
201 | $ cat .hglf/stuff/maybelarge.dat |
|
201 | $ cat .hglf/stuff/maybelarge.dat | |
202 | 76236b6a2c6102826c61af4297dd738fb3b1de38 |
|
202 | 76236b6a2c6102826c61af4297dd738fb3b1de38 | |
203 | $ cd .. |
|
203 | $ cd .. | |
204 |
|
204 | |||
205 | "lfconvert" error cases |
|
205 | "lfconvert" error cases | |
206 | $ hg lfconvert http://localhost/foo foo |
|
206 | $ hg lfconvert http://localhost/foo foo | |
207 | abort: http://localhost/foo is not a local Mercurial repo |
|
207 | abort: http://localhost/foo is not a local Mercurial repo | |
208 | [255] |
|
208 | [255] | |
209 | $ hg lfconvert foo ssh://localhost/foo |
|
209 | $ hg lfconvert foo ssh://localhost/foo | |
210 | abort: ssh://localhost/foo is not a local Mercurial repo |
|
210 | abort: ssh://localhost/foo is not a local Mercurial repo | |
211 | [255] |
|
211 | [255] | |
212 | $ hg lfconvert nosuchrepo foo |
|
212 | $ hg lfconvert nosuchrepo foo | |
213 | abort: repository nosuchrepo not found! |
|
213 | abort: repository nosuchrepo not found! | |
214 | [255] |
|
214 | [255] | |
215 | $ hg share -q -U bigfile-repo shared |
|
215 | $ hg share -q -U bigfile-repo shared | |
216 | $ printf 'bogus' > shared/.hg/sharedpath |
|
216 | $ printf 'bogus' > shared/.hg/sharedpath | |
217 | $ hg lfconvert shared foo |
|
217 | $ hg lfconvert shared foo | |
218 | abort: .hg/sharedpath points to nonexistent directory $TESTTMP/bogus! (glob) |
|
218 | abort: .hg/sharedpath points to nonexistent directory $TESTTMP/bogus! (glob) | |
219 | [255] |
|
219 | [255] | |
220 | $ hg lfconvert bigfile-repo largefiles-repo |
|
220 | $ hg lfconvert bigfile-repo largefiles-repo | |
221 | initializing destination largefiles-repo |
|
221 | initializing destination largefiles-repo | |
222 | abort: repository largefiles-repo already exists! |
|
222 | abort: repository largefiles-repo already exists! | |
223 | [255] |
|
223 | [255] | |
224 |
|
224 | |||
225 | add another largefile to the new largefiles repo |
|
225 | add another largefile to the new largefiles repo | |
226 | $ cd largefiles-repo |
|
226 | $ cd largefiles-repo | |
227 | $ dd if=/dev/zero bs=1k count=1k > anotherlarge 2> /dev/null |
|
227 | $ dd if=/dev/zero bs=1k count=1k > anotherlarge 2> /dev/null | |
228 | $ hg add --lfsize=1 anotherlarge |
|
228 | $ hg add --lfsize=1 anotherlarge | |
229 | $ hg commit -m "add anotherlarge (should be a largefile)" |
|
229 | $ hg commit -m "add anotherlarge (should be a largefile)" | |
230 | $ cat .hglf/anotherlarge |
|
230 | $ cat .hglf/anotherlarge | |
231 | 3b71f43ff30f4b15b5cd85dd9e95ebc7e84eb5a3 |
|
231 | 3b71f43ff30f4b15b5cd85dd9e95ebc7e84eb5a3 | |
232 | $ hg tag mytag |
|
232 | $ hg tag mytag | |
233 | $ cd .. |
|
233 | $ cd .. | |
234 |
|
234 | |||
235 | round-trip: converting back to a normal (non-largefiles) repo with |
|
235 | round-trip: converting back to a normal (non-largefiles) repo with | |
236 | "lfconvert --to-normal" should give the same as ../bigfile-repo |
|
236 | "lfconvert --to-normal" should give the same as ../bigfile-repo | |
237 | $ cd largefiles-repo |
|
237 | $ cd largefiles-repo | |
238 | $ hg lfconvert --to-normal . ../normal-repo |
|
238 | $ hg lfconvert --to-normal . ../normal-repo | |
239 | initializing destination ../normal-repo |
|
239 | initializing destination ../normal-repo | |
240 | 0 additional largefiles cached |
|
240 | 0 additional largefiles cached | |
241 | scanning source... |
|
241 | scanning source... | |
242 | sorting... |
|
242 | sorting... | |
243 | converting... |
|
243 | converting... | |
244 | 7 add large, normal1 |
|
244 | 7 add large, normal1 | |
245 | 6 add sub/* |
|
245 | 6 add sub/* | |
246 | 5 rename sub/ to stuff/ |
|
246 | 5 rename sub/ to stuff/ | |
247 | 4 add normal3, modify sub/* |
|
247 | 4 add normal3, modify sub/* | |
248 | 3 remove large, normal3 |
|
248 | 3 remove large, normal3 | |
249 | 2 merge |
|
249 | 2 merge | |
250 | 1 add anotherlarge (should be a largefile) |
|
250 | 1 add anotherlarge (should be a largefile) | |
251 | 0 Added tag mytag for changeset abacddda7028 |
|
251 | 0 Added tag mytag for changeset abacddda7028 | |
252 | $ cd ../normal-repo |
|
252 | $ cd ../normal-repo | |
253 | $ cat >> .hg/hgrc <<EOF |
|
253 | $ cat >> .hg/hgrc <<EOF | |
254 | > [extensions] |
|
254 | > [extensions] | |
255 | > largefiles = ! |
|
255 | > largefiles = ! | |
256 | > EOF |
|
256 | > EOF | |
257 |
|
257 | |||
258 | $ hg log -G --template "{rev}:{node|short} {desc|firstline}\n" |
|
258 | $ hg log -G --template "{rev}:{node|short} {desc|firstline}\n" | |
259 | o 7:b5fedc110b9d Added tag mytag for changeset 867ab992ecf4 |
|
259 | o 7:b5fedc110b9d Added tag mytag for changeset 867ab992ecf4 | |
260 | | |
|
260 | | | |
261 | o 6:867ab992ecf4 add anotherlarge (should be a largefile) |
|
261 | o 6:867ab992ecf4 add anotherlarge (should be a largefile) | |
262 | | |
|
262 | | | |
263 | o 5:4884f215abda merge |
|
263 | o 5:4884f215abda merge | |
264 | |\ |
|
264 | |\ | |
265 | | o 4:7285f817b77e remove large, normal3 |
|
265 | | o 4:7285f817b77e remove large, normal3 | |
266 | | | |
|
266 | | | | |
267 | | o 3:67e3892e3534 add normal3, modify sub/* |
|
267 | | o 3:67e3892e3534 add normal3, modify sub/* | |
268 | | | |
|
268 | | | | |
269 | o | 2:c96c8beb5d56 rename sub/ to stuff/ |
|
269 | o | 2:c96c8beb5d56 rename sub/ to stuff/ | |
270 | |/ |
|
270 | |/ | |
271 | o 1:020c65d24e11 add sub/* |
|
271 | o 1:020c65d24e11 add sub/* | |
272 | | |
|
272 | | | |
273 | o 0:117b8328f97a add large, normal1 |
|
273 | o 0:117b8328f97a add large, normal1 | |
274 |
|
274 | |||
275 | $ hg update |
|
275 | $ hg update | |
276 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
276 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
277 | $ hg locate |
|
277 | $ hg locate | |
278 | .hgtags |
|
278 | .hgtags | |
279 | anotherlarge |
|
279 | anotherlarge | |
280 | normal1 |
|
280 | normal1 | |
281 | stuff/maybelarge.dat |
|
281 | stuff/maybelarge.dat | |
282 | stuff/normal2 |
|
282 | stuff/normal2 | |
283 | $ [ -d .hg/largefiles ] && echo fail || echo pass |
|
283 | $ [ -d .hg/largefiles ] && echo fail || echo pass | |
284 | pass |
|
284 | pass | |
285 |
|
285 | |||
286 | $ cd .. |
|
286 | $ cd .. | |
287 |
|
287 | |||
288 | Clearing the usercache ensures that commitctx doesn't try to cache largefiles |
|
288 | Clearing the usercache ensures that commitctx doesn't try to cache largefiles | |
289 | from the working dir on a convert. |
|
289 | from the working dir on a convert. | |
290 | $ rm "${USERCACHE}"/* |
|
290 | $ rm "${USERCACHE}"/* | |
291 | $ hg convert largefiles-repo |
|
291 | $ hg convert largefiles-repo | |
292 | assuming destination largefiles-repo-hg |
|
292 | assuming destination largefiles-repo-hg | |
293 | initializing destination largefiles-repo-hg repository |
|
293 | initializing destination largefiles-repo-hg repository | |
294 | scanning source... |
|
294 | scanning source... | |
295 | sorting... |
|
295 | sorting... | |
296 | converting... |
|
296 | converting... | |
297 | 7 add large, normal1 |
|
297 | 7 add large, normal1 | |
298 | 6 add sub/* |
|
298 | 6 add sub/* | |
299 | 5 rename sub/ to stuff/ |
|
299 | 5 rename sub/ to stuff/ | |
300 | 4 add normal3, modify sub/* |
|
300 | 4 add normal3, modify sub/* | |
301 | 3 remove large, normal3 |
|
301 | 3 remove large, normal3 | |
302 | 2 merge |
|
302 | 2 merge | |
303 | 1 add anotherlarge (should be a largefile) |
|
303 | 1 add anotherlarge (should be a largefile) | |
304 | 0 Added tag mytag for changeset abacddda7028 |
|
304 | 0 Added tag mytag for changeset abacddda7028 | |
305 |
|
305 | |||
306 | $ hg -R largefiles-repo-hg log -G --template "{rev}:{node|short} {desc|firstline}\n" |
|
306 | $ hg -R largefiles-repo-hg log -G --template "{rev}:{node|short} {desc|firstline}\n" | |
307 | o 7:2f08f66459b7 Added tag mytag for changeset 17126745edfd |
|
307 | o 7:2f08f66459b7 Added tag mytag for changeset 17126745edfd | |
308 | | |
|
308 | | | |
309 | o 6:17126745edfd add anotherlarge (should be a largefile) |
|
309 | o 6:17126745edfd add anotherlarge (should be a largefile) | |
310 | | |
|
310 | | | |
311 | o 5:9cc5aa7204f0 merge |
|
311 | o 5:9cc5aa7204f0 merge | |
312 | |\ |
|
312 | |\ | |
313 | | o 4:a5a02de7a8e4 remove large, normal3 |
|
313 | | o 4:a5a02de7a8e4 remove large, normal3 | |
314 | | | |
|
314 | | | | |
315 | | o 3:55759520c76f add normal3, modify sub/* |
|
315 | | o 3:55759520c76f add normal3, modify sub/* | |
316 | | | |
|
316 | | | | |
317 | o | 2:261ad3f3f037 rename sub/ to stuff/ |
|
317 | o | 2:261ad3f3f037 rename sub/ to stuff/ | |
318 | |/ |
|
318 | |/ | |
319 | o 1:334e5237836d add sub/* |
|
319 | o 1:334e5237836d add sub/* | |
320 | | |
|
320 | | | |
321 | o 0:d4892ec57ce2 add large, normal1 |
|
321 | o 0:d4892ec57ce2 add large, normal1 | |
322 |
|
322 | |||
323 | Verify will fail (for now) if the usercache is purged before converting, since |
|
323 | Verify will fail (for now) if the usercache is purged before converting, since | |
324 | largefiles are not cached in the converted repo's local store by the conversion |
|
324 | largefiles are not cached in the converted repo's local store by the conversion | |
325 | process. |
|
325 | process. | |
326 | $ cd largefiles-repo-hg |
|
326 | $ cd largefiles-repo-hg | |
327 | $ cat >> .hg/hgrc <<EOF |
|
327 | $ cat >> .hg/hgrc <<EOF | |
328 | > [experimental] |
|
328 | > [experimental] | |
329 | > stabilization=createmarkers |
|
329 | > stabilization=createmarkers | |
330 | > EOF |
|
330 | > EOF | |
331 | $ hg debugobsolete `hg log -r tip -T "{node}"` |
|
331 | $ hg debugobsolete `hg log -r tip -T "{node}"` | |
332 | obsoleted 1 changesets |
|
332 | obsoleted 1 changesets | |
333 | $ cd .. |
|
333 | $ cd .. | |
334 |
|
334 | |||
335 | $ hg -R largefiles-repo-hg verify --large --lfa |
|
335 | $ hg -R largefiles-repo-hg verify --large --lfa | |
336 | checking changesets |
|
336 | checking changesets | |
337 | checking manifests |
|
337 | checking manifests | |
338 | crosschecking files in changesets and manifests |
|
338 | crosschecking files in changesets and manifests | |
339 | checking files |
|
339 | checking files | |
340 | 9 files, 8 changesets, 13 total revisions |
|
340 | 9 files, 8 changesets, 13 total revisions | |
341 | searching 7 changesets for largefiles |
|
341 | searching 7 changesets for largefiles | |
342 | changeset 0:d4892ec57ce2: large references missing $TESTTMP/largefiles-repo-hg/.hg/largefiles/2e000fa7e85759c7f4c254d4d9c33ef481e459a7 (glob) |
|
342 | changeset 0:d4892ec57ce2: large references missing $TESTTMP/largefiles-repo-hg/.hg/largefiles/2e000fa7e85759c7f4c254d4d9c33ef481e459a7 (glob) | |
343 | changeset 1:334e5237836d: sub/maybelarge.dat references missing $TESTTMP/largefiles-repo-hg/.hg/largefiles/34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c (glob) |
|
343 | changeset 1:334e5237836d: sub/maybelarge.dat references missing $TESTTMP/largefiles-repo-hg/.hg/largefiles/34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c (glob) | |
344 | changeset 2:261ad3f3f037: stuff/maybelarge.dat references missing $TESTTMP/largefiles-repo-hg/.hg/largefiles/34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c (glob) |
|
344 | changeset 2:261ad3f3f037: stuff/maybelarge.dat references missing $TESTTMP/largefiles-repo-hg/.hg/largefiles/34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c (glob) | |
345 | changeset 3:55759520c76f: sub/maybelarge.dat references missing $TESTTMP/largefiles-repo-hg/.hg/largefiles/76236b6a2c6102826c61af4297dd738fb3b1de38 (glob) |
|
345 | changeset 3:55759520c76f: sub/maybelarge.dat references missing $TESTTMP/largefiles-repo-hg/.hg/largefiles/76236b6a2c6102826c61af4297dd738fb3b1de38 (glob) | |
346 | changeset 5:9cc5aa7204f0: stuff/maybelarge.dat references missing $TESTTMP/largefiles-repo-hg/.hg/largefiles/76236b6a2c6102826c61af4297dd738fb3b1de38 (glob) |
|
346 | changeset 5:9cc5aa7204f0: stuff/maybelarge.dat references missing $TESTTMP/largefiles-repo-hg/.hg/largefiles/76236b6a2c6102826c61af4297dd738fb3b1de38 (glob) | |
347 | changeset 6:17126745edfd: anotherlarge references missing $TESTTMP/largefiles-repo-hg/.hg/largefiles/3b71f43ff30f4b15b5cd85dd9e95ebc7e84eb5a3 (glob) |
|
347 | changeset 6:17126745edfd: anotherlarge references missing $TESTTMP/largefiles-repo-hg/.hg/largefiles/3b71f43ff30f4b15b5cd85dd9e95ebc7e84eb5a3 (glob) | |
348 | verified existence of 6 revisions of 4 largefiles |
|
348 | verified existence of 6 revisions of 4 largefiles | |
349 | [1] |
|
349 | [1] | |
350 | $ hg -R largefiles-repo-hg showconfig paths |
|
350 | $ hg -R largefiles-repo-hg showconfig paths | |
351 | [1] |
|
351 | [1] | |
352 |
|
352 | |||
353 |
|
353 | |||
354 | Avoid a traceback if a largefile isn't available (issue3519) |
|
354 | Avoid a traceback if a largefile isn't available (issue3519) | |
355 |
|
355 | |||
356 | Ensure the largefile can be cached in the source if necessary |
|
356 | Ensure the largefile can be cached in the source if necessary | |
357 | $ hg clone -U largefiles-repo issue3519 |
|
357 | $ hg clone -U largefiles-repo issue3519 | |
358 | $ rm -f "${USERCACHE}"/* |
|
358 | $ rm -f "${USERCACHE}"/* | |
359 | $ hg lfconvert --to-normal issue3519 normalized3519 |
|
359 | $ hg lfconvert --to-normal issue3519 normalized3519 | |
360 | initializing destination normalized3519 |
|
360 | initializing destination normalized3519 | |
361 | 4 additional largefiles cached |
|
361 | 4 additional largefiles cached | |
362 | scanning source... |
|
362 | scanning source... | |
363 | sorting... |
|
363 | sorting... | |
364 | converting... |
|
364 | converting... | |
365 | 7 add large, normal1 |
|
365 | 7 add large, normal1 | |
366 | 6 add sub/* |
|
366 | 6 add sub/* | |
367 | 5 rename sub/ to stuff/ |
|
367 | 5 rename sub/ to stuff/ | |
368 | 4 add normal3, modify sub/* |
|
368 | 4 add normal3, modify sub/* | |
369 | 3 remove large, normal3 |
|
369 | 3 remove large, normal3 | |
370 | 2 merge |
|
370 | 2 merge | |
371 | 1 add anotherlarge (should be a largefile) |
|
371 | 1 add anotherlarge (should be a largefile) | |
372 | 0 Added tag mytag for changeset abacddda7028 |
|
372 | 0 Added tag mytag for changeset abacddda7028 | |
373 |
|
373 | |||
374 | Ensure the abort message is useful if a largefile is entirely unavailable |
|
374 | Ensure the abort message is useful if a largefile is entirely unavailable | |
375 | $ rm -rf normalized3519 |
|
375 | $ rm -rf normalized3519 | |
376 | $ rm "${USERCACHE}"/* |
|
376 | $ rm "${USERCACHE}"/* | |
377 | $ rm issue3519/.hg/largefiles/* |
|
377 | $ rm issue3519/.hg/largefiles/* | |
378 | $ rm largefiles-repo/.hg/largefiles/* |
|
378 | $ rm largefiles-repo/.hg/largefiles/* | |
379 | $ hg lfconvert --to-normal issue3519 normalized3519 |
|
379 | $ hg lfconvert --to-normal issue3519 normalized3519 | |
380 | initializing destination normalized3519 |
|
380 | initializing destination normalized3519 | |
381 | anotherlarge: largefile 3b71f43ff30f4b15b5cd85dd9e95ebc7e84eb5a3 not available from file:/*/$TESTTMP/largefiles-repo (glob) |
|
381 | anotherlarge: largefile 3b71f43ff30f4b15b5cd85dd9e95ebc7e84eb5a3 not available from file:/*/$TESTTMP/largefiles-repo (glob) | |
382 | stuff/maybelarge.dat: largefile 76236b6a2c6102826c61af4297dd738fb3b1de38 not available from file:/*/$TESTTMP/largefiles-repo (glob) |
|
382 | stuff/maybelarge.dat: largefile 76236b6a2c6102826c61af4297dd738fb3b1de38 not available from file:/*/$TESTTMP/largefiles-repo (glob) | |
383 | stuff/maybelarge.dat: largefile 76236b6a2c6102826c61af4297dd738fb3b1de38 not available from file:/*/$TESTTMP/largefiles-repo (glob) |
|
383 | stuff/maybelarge.dat: largefile 76236b6a2c6102826c61af4297dd738fb3b1de38 not available from file:/*/$TESTTMP/largefiles-repo (glob) | |
384 | sub/maybelarge.dat: largefile 76236b6a2c6102826c61af4297dd738fb3b1de38 not available from file:/*/$TESTTMP/largefiles-repo (glob) |
|
384 | sub/maybelarge.dat: largefile 76236b6a2c6102826c61af4297dd738fb3b1de38 not available from file:/*/$TESTTMP/largefiles-repo (glob) | |
385 | large: largefile 2e000fa7e85759c7f4c254d4d9c33ef481e459a7 not available from file:/*/$TESTTMP/largefiles-repo (glob) |
|
385 | large: largefile 2e000fa7e85759c7f4c254d4d9c33ef481e459a7 not available from file:/*/$TESTTMP/largefiles-repo (glob) | |
386 | sub/maybelarge.dat: largefile 76236b6a2c6102826c61af4297dd738fb3b1de38 not available from file:/*/$TESTTMP/largefiles-repo (glob) |
|
386 | sub/maybelarge.dat: largefile 76236b6a2c6102826c61af4297dd738fb3b1de38 not available from file:/*/$TESTTMP/largefiles-repo (glob) | |
387 | large: largefile 2e000fa7e85759c7f4c254d4d9c33ef481e459a7 not available from file:/*/$TESTTMP/largefiles-repo (glob) |
|
387 | large: largefile 2e000fa7e85759c7f4c254d4d9c33ef481e459a7 not available from file:/*/$TESTTMP/largefiles-repo (glob) | |
388 | stuff/maybelarge.dat: largefile 34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c not available from file:/*/$TESTTMP/largefiles-repo (glob) |
|
388 | stuff/maybelarge.dat: largefile 34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c not available from file:/*/$TESTTMP/largefiles-repo (glob) | |
389 | large: largefile 2e000fa7e85759c7f4c254d4d9c33ef481e459a7 not available from file:/*/$TESTTMP/largefiles-repo (glob) |
|
389 | large: largefile 2e000fa7e85759c7f4c254d4d9c33ef481e459a7 not available from file:/*/$TESTTMP/largefiles-repo (glob) | |
390 | sub/maybelarge.dat: largefile 34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c not available from file:/*/$TESTTMP/largefiles-repo (glob) |
|
390 | sub/maybelarge.dat: largefile 34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c not available from file:/*/$TESTTMP/largefiles-repo (glob) | |
391 | large: largefile 2e000fa7e85759c7f4c254d4d9c33ef481e459a7 not available from file:/*/$TESTTMP/largefiles-repo (glob) |
|
391 | large: largefile 2e000fa7e85759c7f4c254d4d9c33ef481e459a7 not available from file:/*/$TESTTMP/largefiles-repo (glob) | |
392 | 0 additional largefiles cached |
|
392 | 0 additional largefiles cached | |
393 | 11 largefiles failed to download |
|
393 | 11 largefiles failed to download | |
394 | abort: all largefiles must be present locally |
|
394 | abort: all largefiles must be present locally | |
395 | [255] |
|
395 | [255] | |
396 |
|
396 | |||
397 |
|
397 |
@@ -1,1801 +1,1801 b'' | |||||
1 | $ cat <<EOF >> $HGRCPATH |
|
1 | $ cat <<EOF >> $HGRCPATH | |
2 | > [extensions] |
|
2 | > [extensions] | |
3 | > mq = |
|
3 | > mq = | |
4 | > shelve = |
|
4 | > shelve = | |
5 | > [defaults] |
|
5 | > [defaults] | |
6 | > diff = --nodates --git |
|
6 | > diff = --nodates --git | |
7 | > qnew = --date '0 0' |
|
7 | > qnew = --date '0 0' | |
8 | > [shelve] |
|
8 | > [shelve] | |
9 | > maxbackups = 2 |
|
9 | > maxbackups = 2 | |
10 | > EOF |
|
10 | > EOF | |
11 |
|
11 | |||
12 | $ hg init repo |
|
12 | $ hg init repo | |
13 | $ cd repo |
|
13 | $ cd repo | |
14 | $ mkdir a b |
|
14 | $ mkdir a b | |
15 | $ echo a > a/a |
|
15 | $ echo a > a/a | |
16 | $ echo b > b/b |
|
16 | $ echo b > b/b | |
17 | $ echo c > c |
|
17 | $ echo c > c | |
18 | $ echo d > d |
|
18 | $ echo d > d | |
19 | $ echo x > x |
|
19 | $ echo x > x | |
20 | $ hg addremove -q |
|
20 | $ hg addremove -q | |
21 |
|
21 | |||
22 | shelve has a help message |
|
22 | shelve has a help message | |
23 | $ hg shelve -h |
|
23 | $ hg shelve -h | |
24 | hg shelve [OPTION]... [FILE]... |
|
24 | hg shelve [OPTION]... [FILE]... | |
25 |
|
25 | |||
26 | save and set aside changes from the working directory |
|
26 | save and set aside changes from the working directory | |
27 |
|
27 | |||
28 | Shelving takes files that "hg status" reports as not clean, saves the |
|
28 | Shelving takes files that "hg status" reports as not clean, saves the | |
29 | modifications to a bundle (a shelved change), and reverts the files so |
|
29 | modifications to a bundle (a shelved change), and reverts the files so | |
30 | that their state in the working directory becomes clean. |
|
30 | that their state in the working directory becomes clean. | |
31 |
|
31 | |||
32 | To restore these changes to the working directory, using "hg unshelve"; |
|
32 | To restore these changes to the working directory, using "hg unshelve"; | |
33 | this will work even if you switch to a different commit. |
|
33 | this will work even if you switch to a different commit. | |
34 |
|
34 | |||
35 | When no files are specified, "hg shelve" saves all not-clean files. If |
|
35 | When no files are specified, "hg shelve" saves all not-clean files. If | |
36 | specific files or directories are named, only changes to those files are |
|
36 | specific files or directories are named, only changes to those files are | |
37 | shelved. |
|
37 | shelved. | |
38 |
|
38 | |||
39 | In bare shelve (when no files are specified, without interactive, include |
|
39 | In bare shelve (when no files are specified, without interactive, include | |
40 | and exclude option), shelving remembers information if the working |
|
40 | and exclude option), shelving remembers information if the working | |
41 | directory was on newly created branch, in other words working directory |
|
41 | directory was on newly created branch, in other words working directory | |
42 | was on different branch than its first parent. In this situation |
|
42 | was on different branch than its first parent. In this situation | |
43 | unshelving restores branch information to the working directory. |
|
43 | unshelving restores branch information to the working directory. | |
44 |
|
44 | |||
45 | Each shelved change has a name that makes it easier to find later. The |
|
45 | Each shelved change has a name that makes it easier to find later. The | |
46 | name of a shelved change defaults to being based on the active bookmark, |
|
46 | name of a shelved change defaults to being based on the active bookmark, | |
47 | or if there is no active bookmark, the current named branch. To specify a |
|
47 | or if there is no active bookmark, the current named branch. To specify a | |
48 | different name, use "--name". |
|
48 | different name, use "--name". | |
49 |
|
49 | |||
50 | To see a list of existing shelved changes, use the "--list" option. For |
|
50 | To see a list of existing shelved changes, use the "--list" option. For | |
51 | each shelved change, this will print its name, age, and description; use " |
|
51 | each shelved change, this will print its name, age, and description; use " | |
52 | --patch" or "--stat" for more details. |
|
52 | --patch" or "--stat" for more details. | |
53 |
|
53 | |||
54 | To delete specific shelved changes, use "--delete". To delete all shelved |
|
54 | To delete specific shelved changes, use "--delete". To delete all shelved | |
55 | changes, use "--cleanup". |
|
55 | changes, use "--cleanup". | |
56 |
|
56 | |||
57 | (use 'hg help -e shelve' to show help for the shelve extension) |
|
57 | (use 'hg help -e shelve' to show help for the shelve extension) | |
58 |
|
58 | |||
59 | options ([+] can be repeated): |
|
59 | options ([+] can be repeated): | |
60 |
|
60 | |||
61 | -A --addremove mark new/missing files as added/removed before |
|
61 | -A --addremove mark new/missing files as added/removed before | |
62 | shelving |
|
62 | shelving | |
63 | -u --unknown store unknown files in the shelve |
|
63 | -u --unknown store unknown files in the shelve | |
64 | --cleanup delete all shelved changes |
|
64 | --cleanup delete all shelved changes | |
65 | --date DATE shelve with the specified commit date |
|
65 | --date DATE shelve with the specified commit date | |
66 | -d --delete delete the named shelved change(s) |
|
66 | -d --delete delete the named shelved change(s) | |
67 | -e --edit invoke editor on commit messages |
|
67 | -e --edit invoke editor on commit messages | |
68 | -l --list list current shelves |
|
68 | -l --list list current shelves | |
69 | -m --message TEXT use text as shelve message |
|
69 | -m --message TEXT use text as shelve message | |
70 | -n --name NAME use the given name for the shelved commit |
|
70 | -n --name NAME use the given name for the shelved commit | |
71 | -p --patch show patch |
|
71 | -p --patch show patch | |
72 | -i --interactive interactive mode, only works while creating a shelve |
|
72 | -i --interactive interactive mode, only works while creating a shelve | |
73 | --stat output diffstat-style summary of changes |
|
73 | --stat output diffstat-style summary of changes | |
74 | -I --include PATTERN [+] include names matching the given patterns |
|
74 | -I --include PATTERN [+] include names matching the given patterns | |
75 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
75 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
76 | --mq operate on patch repository |
|
76 | --mq operate on patch repository | |
77 |
|
77 | |||
78 | (some details hidden, use --verbose to show complete help) |
|
78 | (some details hidden, use --verbose to show complete help) | |
79 |
|
79 | |||
80 | shelving in an empty repo should be possible |
|
80 | shelving in an empty repo should be possible | |
81 | (this tests also that editor is not invoked, if '--edit' is not |
|
81 | (this tests also that editor is not invoked, if '--edit' is not | |
82 | specified) |
|
82 | specified) | |
83 |
|
83 | |||
84 | $ HGEDITOR=cat hg shelve |
|
84 | $ HGEDITOR=cat hg shelve | |
85 | shelved as default |
|
85 | shelved as default | |
86 | 0 files updated, 0 files merged, 5 files removed, 0 files unresolved |
|
86 | 0 files updated, 0 files merged, 5 files removed, 0 files unresolved | |
87 |
|
87 | |||
88 | $ hg unshelve |
|
88 | $ hg unshelve | |
89 | unshelving change 'default' |
|
89 | unshelving change 'default' | |
90 |
|
90 | |||
91 | $ hg commit -q -m 'initial commit' |
|
91 | $ hg commit -q -m 'initial commit' | |
92 |
|
92 | |||
93 | $ hg shelve |
|
93 | $ hg shelve | |
94 | nothing changed |
|
94 | nothing changed | |
95 | [1] |
|
95 | [1] | |
96 |
|
96 | |||
97 | make sure shelve files were backed up |
|
97 | make sure shelve files were backed up | |
98 |
|
98 | |||
99 | $ ls .hg/shelve-backup |
|
99 | $ ls .hg/shelve-backup | |
100 | default.hg |
|
100 | default.hg | |
101 | default.patch |
|
101 | default.patch | |
102 |
|
102 | |||
103 | checks to make sure we dont create a directory or |
|
103 | checks to make sure we dont create a directory or | |
104 | hidden file while choosing a new shelve name |
|
104 | hidden file while choosing a new shelve name | |
105 |
|
105 | |||
106 | when we are given a name |
|
106 | when we are given a name | |
107 |
|
107 | |||
108 | $ hg shelve -n foo/bar |
|
108 | $ hg shelve -n foo/bar | |
109 | abort: shelved change names can not contain slashes |
|
109 | abort: shelved change names can not contain slashes | |
110 | [255] |
|
110 | [255] | |
111 | $ hg shelve -n .baz |
|
111 | $ hg shelve -n .baz | |
112 | abort: shelved change names can not start with '.' |
|
112 | abort: shelved change names can not start with '.' | |
113 | [255] |
|
113 | [255] | |
114 | $ hg shelve -n foo\\bar |
|
114 | $ hg shelve -n foo\\bar | |
115 | abort: shelved change names can not contain slashes |
|
115 | abort: shelved change names can not contain slashes | |
116 | [255] |
|
116 | [255] | |
117 |
|
117 | |||
118 | when shelve has to choose itself |
|
118 | when shelve has to choose itself | |
119 |
|
119 | |||
120 | $ hg branch x/y -q |
|
120 | $ hg branch x/y -q | |
121 | $ hg commit -q -m "Branch commit 0" |
|
121 | $ hg commit -q -m "Branch commit 0" | |
122 | $ hg shelve |
|
122 | $ hg shelve | |
123 | nothing changed |
|
123 | nothing changed | |
124 | [1] |
|
124 | [1] | |
125 | $ hg branch .x -q |
|
125 | $ hg branch .x -q | |
126 | $ hg commit -q -m "Branch commit 1" |
|
126 | $ hg commit -q -m "Branch commit 1" | |
127 | $ hg shelve |
|
127 | $ hg shelve | |
128 | nothing changed |
|
128 | nothing changed | |
129 | [1] |
|
129 | [1] | |
130 | $ hg branch x\\y -q |
|
130 | $ hg branch x\\y -q | |
131 | $ hg commit -q -m "Branch commit 2" |
|
131 | $ hg commit -q -m "Branch commit 2" | |
132 | $ hg shelve |
|
132 | $ hg shelve | |
133 | nothing changed |
|
133 | nothing changed | |
134 | [1] |
|
134 | [1] | |
135 |
|
135 | |||
136 | cleaning the branches made for name checking tests |
|
136 | cleaning the branches made for name checking tests | |
137 |
|
137 | |||
138 | $ hg up default -q |
|
138 | $ hg up default -q | |
139 | $ hg strip 3 -q |
|
139 | $ hg strip 3 -q | |
140 | $ hg strip 2 -q |
|
140 | $ hg strip 2 -q | |
141 | $ hg strip 1 -q |
|
141 | $ hg strip 1 -q | |
142 |
|
142 | |||
143 | create an mq patch - shelving should work fine with a patch applied |
|
143 | create an mq patch - shelving should work fine with a patch applied | |
144 |
|
144 | |||
145 | $ echo n > n |
|
145 | $ echo n > n | |
146 | $ hg add n |
|
146 | $ hg add n | |
147 | $ hg commit n -m second |
|
147 | $ hg commit n -m second | |
148 | $ hg qnew second.patch |
|
148 | $ hg qnew second.patch | |
149 |
|
149 | |||
150 | shelve a change that we will delete later |
|
150 | shelve a change that we will delete later | |
151 |
|
151 | |||
152 | $ echo a >> a/a |
|
152 | $ echo a >> a/a | |
153 | $ hg shelve |
|
153 | $ hg shelve | |
154 | shelved as default |
|
154 | shelved as default | |
155 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
155 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
156 |
|
156 | |||
157 | set up some more complex changes to shelve |
|
157 | set up some more complex changes to shelve | |
158 |
|
158 | |||
159 | $ echo a >> a/a |
|
159 | $ echo a >> a/a | |
160 | $ hg mv b b.rename |
|
160 | $ hg mv b b.rename | |
161 | moving b/b to b.rename/b (glob) |
|
161 | moving b/b to b.rename/b (glob) | |
162 | $ hg cp c c.copy |
|
162 | $ hg cp c c.copy | |
163 | $ hg status -C |
|
163 | $ hg status -C | |
164 | M a/a |
|
164 | M a/a | |
165 | A b.rename/b |
|
165 | A b.rename/b | |
166 | b/b |
|
166 | b/b | |
167 | A c.copy |
|
167 | A c.copy | |
168 | c |
|
168 | c | |
169 | R b/b |
|
169 | R b/b | |
170 |
|
170 | |||
171 | the common case - no options or filenames |
|
171 | the common case - no options or filenames | |
172 |
|
172 | |||
173 | $ hg shelve |
|
173 | $ hg shelve | |
174 | shelved as default-01 |
|
174 | shelved as default-01 | |
175 | 2 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
175 | 2 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
176 | $ hg status -C |
|
176 | $ hg status -C | |
177 |
|
177 | |||
178 | ensure that our shelved changes exist |
|
178 | ensure that our shelved changes exist | |
179 |
|
179 | |||
180 | $ hg shelve -l |
|
180 | $ hg shelve -l | |
181 | default-01 (*)* changes to: [mq]: second.patch (glob) |
|
181 | default-01 (*)* changes to: [mq]: second.patch (glob) | |
182 | default (*)* changes to: [mq]: second.patch (glob) |
|
182 | default (*)* changes to: [mq]: second.patch (glob) | |
183 |
|
183 | |||
184 | $ hg shelve -l -p default |
|
184 | $ hg shelve -l -p default | |
185 | default (*)* changes to: [mq]: second.patch (glob) |
|
185 | default (*)* changes to: [mq]: second.patch (glob) | |
186 |
|
186 | |||
187 | diff --git a/a/a b/a/a |
|
187 | diff --git a/a/a b/a/a | |
188 | --- a/a/a |
|
188 | --- a/a/a | |
189 | +++ b/a/a |
|
189 | +++ b/a/a | |
190 | @@ -1,1 +1,2 @@ |
|
190 | @@ -1,1 +1,2 @@ | |
191 | a |
|
191 | a | |
192 | +a |
|
192 | +a | |
193 |
|
193 | |||
194 | $ hg shelve --list --addremove |
|
194 | $ hg shelve --list --addremove | |
195 | abort: options '--list' and '--addremove' may not be used together |
|
195 | abort: options '--list' and '--addremove' may not be used together | |
196 | [255] |
|
196 | [255] | |
197 |
|
197 | |||
198 | delete our older shelved change |
|
198 | delete our older shelved change | |
199 |
|
199 | |||
200 | $ hg shelve -d default |
|
200 | $ hg shelve -d default | |
201 | $ hg qfinish -a -q |
|
201 | $ hg qfinish -a -q | |
202 |
|
202 | |||
203 | ensure shelve backups aren't overwritten |
|
203 | ensure shelve backups aren't overwritten | |
204 |
|
204 | |||
205 | $ ls .hg/shelve-backup/ |
|
205 | $ ls .hg/shelve-backup/ | |
206 | default-1.hg |
|
206 | default-1.hg | |
207 | default-1.patch |
|
207 | default-1.patch | |
208 | default.hg |
|
208 | default.hg | |
209 | default.patch |
|
209 | default.patch | |
210 |
|
210 | |||
211 | local edits should not prevent a shelved change from applying |
|
211 | local edits should not prevent a shelved change from applying | |
212 |
|
212 | |||
213 | $ printf "z\na\n" > a/a |
|
213 | $ printf "z\na\n" > a/a | |
214 | $ hg unshelve --keep |
|
214 | $ hg unshelve --keep | |
215 | unshelving change 'default-01' |
|
215 | unshelving change 'default-01' | |
216 | temporarily committing pending changes (restore with 'hg unshelve --abort') |
|
216 | temporarily committing pending changes (restore with 'hg unshelve --abort') | |
217 | rebasing shelved changes |
|
217 | rebasing shelved changes | |
218 | rebasing 4:32c69314e062 "changes to: [mq]: second.patch" (tip) |
|
218 | rebasing 4:32c69314e062 "changes to: [mq]: second.patch" (tip) | |
219 | merging a/a |
|
219 | merging a/a | |
220 |
|
220 | |||
221 | $ hg revert --all -q |
|
221 | $ hg revert --all -q | |
222 | $ rm a/a.orig b.rename/b c.copy |
|
222 | $ rm a/a.orig b.rename/b c.copy | |
223 |
|
223 | |||
224 | apply it and make sure our state is as expected |
|
224 | apply it and make sure our state is as expected | |
225 |
|
225 | |||
226 | (this also tests that same timestamp prevents backups from being |
|
226 | (this also tests that same timestamp prevents backups from being | |
227 | removed, even though there are more than 'maxbackups' backups) |
|
227 | removed, even though there are more than 'maxbackups' backups) | |
228 |
|
228 | |||
229 | $ f -t .hg/shelve-backup/default.patch |
|
229 | $ f -t .hg/shelve-backup/default.patch | |
230 | .hg/shelve-backup/default.patch: file |
|
230 | .hg/shelve-backup/default.patch: file | |
231 | $ touch -t 200001010000 .hg/shelve-backup/default.patch |
|
231 | $ touch -t 200001010000 .hg/shelve-backup/default.patch | |
232 | $ f -t .hg/shelve-backup/default-1.patch |
|
232 | $ f -t .hg/shelve-backup/default-1.patch | |
233 | .hg/shelve-backup/default-1.patch: file |
|
233 | .hg/shelve-backup/default-1.patch: file | |
234 | $ touch -t 200001010000 .hg/shelve-backup/default-1.patch |
|
234 | $ touch -t 200001010000 .hg/shelve-backup/default-1.patch | |
235 |
|
235 | |||
236 | $ hg unshelve |
|
236 | $ hg unshelve | |
237 | unshelving change 'default-01' |
|
237 | unshelving change 'default-01' | |
238 | $ hg status -C |
|
238 | $ hg status -C | |
239 | M a/a |
|
239 | M a/a | |
240 | A b.rename/b |
|
240 | A b.rename/b | |
241 | b/b |
|
241 | b/b | |
242 | A c.copy |
|
242 | A c.copy | |
243 | c |
|
243 | c | |
244 | R b/b |
|
244 | R b/b | |
245 | $ hg shelve -l |
|
245 | $ hg shelve -l | |
246 |
|
246 | |||
247 | (both of default.hg and default-1.hg should be still kept, because it |
|
247 | (both of default.hg and default-1.hg should be still kept, because it | |
248 | is difficult to decide actual order of them from same timestamp) |
|
248 | is difficult to decide actual order of them from same timestamp) | |
249 |
|
249 | |||
250 | $ ls .hg/shelve-backup/ |
|
250 | $ ls .hg/shelve-backup/ | |
251 | default-01.hg |
|
251 | default-01.hg | |
252 | default-01.patch |
|
252 | default-01.patch | |
253 | default-1.hg |
|
253 | default-1.hg | |
254 | default-1.patch |
|
254 | default-1.patch | |
255 | default.hg |
|
255 | default.hg | |
256 | default.patch |
|
256 | default.patch | |
257 |
|
257 | |||
258 | $ hg unshelve |
|
258 | $ hg unshelve | |
259 | abort: no shelved changes to apply! |
|
259 | abort: no shelved changes to apply! | |
260 | [255] |
|
260 | [255] | |
261 | $ hg unshelve foo |
|
261 | $ hg unshelve foo | |
262 | abort: shelved change 'foo' not found |
|
262 | abort: shelved change 'foo' not found | |
263 | [255] |
|
263 | [255] | |
264 |
|
264 | |||
265 | named shelves, specific filenames, and "commit messages" should all work |
|
265 | named shelves, specific filenames, and "commit messages" should all work | |
266 | (this tests also that editor is invoked, if '--edit' is specified) |
|
266 | (this tests also that editor is invoked, if '--edit' is specified) | |
267 |
|
267 | |||
268 | $ hg status -C |
|
268 | $ hg status -C | |
269 | M a/a |
|
269 | M a/a | |
270 | A b.rename/b |
|
270 | A b.rename/b | |
271 | b/b |
|
271 | b/b | |
272 | A c.copy |
|
272 | A c.copy | |
273 | c |
|
273 | c | |
274 | R b/b |
|
274 | R b/b | |
275 | $ HGEDITOR=cat hg shelve -q -n wibble -m wat -e a |
|
275 | $ HGEDITOR=cat hg shelve -q -n wibble -m wat -e a | |
276 | wat |
|
276 | wat | |
277 |
|
277 | |||
278 |
|
278 | |||
279 | HG: Enter commit message. Lines beginning with 'HG:' are removed. |
|
279 | HG: Enter commit message. Lines beginning with 'HG:' are removed. | |
280 | HG: Leave message empty to abort commit. |
|
280 | HG: Leave message empty to abort commit. | |
281 | HG: -- |
|
281 | HG: -- | |
282 | HG: user: shelve@localhost |
|
282 | HG: user: shelve@localhost | |
283 | HG: branch 'default' |
|
283 | HG: branch 'default' | |
284 | HG: changed a/a |
|
284 | HG: changed a/a | |
285 |
|
285 | |||
286 | expect "a" to no longer be present, but status otherwise unchanged |
|
286 | expect "a" to no longer be present, but status otherwise unchanged | |
287 |
|
287 | |||
288 | $ hg status -C |
|
288 | $ hg status -C | |
289 | A b.rename/b |
|
289 | A b.rename/b | |
290 | b/b |
|
290 | b/b | |
291 | A c.copy |
|
291 | A c.copy | |
292 | c |
|
292 | c | |
293 | R b/b |
|
293 | R b/b | |
294 | $ hg shelve -l --stat |
|
294 | $ hg shelve -l --stat | |
295 | wibble (*) wat (glob) |
|
295 | wibble (*) wat (glob) | |
296 | a/a | 1 + |
|
296 | a/a | 1 + | |
297 | 1 files changed, 1 insertions(+), 0 deletions(-) |
|
297 | 1 files changed, 1 insertions(+), 0 deletions(-) | |
298 |
|
298 | |||
299 | and now "a/a" should reappear |
|
299 | and now "a/a" should reappear | |
300 |
|
300 | |||
301 | $ cd a |
|
301 | $ cd a | |
302 | $ hg unshelve -q wibble |
|
302 | $ hg unshelve -q wibble | |
303 | $ cd .. |
|
303 | $ cd .. | |
304 | $ hg status -C |
|
304 | $ hg status -C | |
305 | M a/a |
|
305 | M a/a | |
306 | A b.rename/b |
|
306 | A b.rename/b | |
307 | b/b |
|
307 | b/b | |
308 | A c.copy |
|
308 | A c.copy | |
309 | c |
|
309 | c | |
310 | R b/b |
|
310 | R b/b | |
311 |
|
311 | |||
312 | ensure old shelve backups are being deleted automatically |
|
312 | ensure old shelve backups are being deleted automatically | |
313 |
|
313 | |||
314 | $ ls .hg/shelve-backup/ |
|
314 | $ ls .hg/shelve-backup/ | |
315 | default-01.hg |
|
315 | default-01.hg | |
316 | default-01.patch |
|
316 | default-01.patch | |
317 | wibble.hg |
|
317 | wibble.hg | |
318 | wibble.patch |
|
318 | wibble.patch | |
319 |
|
319 | |||
320 | cause unshelving to result in a merge with 'a' conflicting |
|
320 | cause unshelving to result in a merge with 'a' conflicting | |
321 |
|
321 | |||
322 | $ hg shelve -q |
|
322 | $ hg shelve -q | |
323 | $ echo c>>a/a |
|
323 | $ echo c>>a/a | |
324 | $ hg commit -m second |
|
324 | $ hg commit -m second | |
325 | $ hg tip --template '{files}\n' |
|
325 | $ hg tip --template '{files}\n' | |
326 | a/a |
|
326 | a/a | |
327 |
|
327 | |||
328 | add an unrelated change that should be preserved |
|
328 | add an unrelated change that should be preserved | |
329 |
|
329 | |||
330 | $ mkdir foo |
|
330 | $ mkdir foo | |
331 | $ echo foo > foo/foo |
|
331 | $ echo foo > foo/foo | |
332 | $ hg add foo/foo |
|
332 | $ hg add foo/foo | |
333 |
|
333 | |||
334 | force a conflicted merge to occur |
|
334 | force a conflicted merge to occur | |
335 |
|
335 | |||
336 | $ hg unshelve |
|
336 | $ hg unshelve | |
337 | unshelving change 'default' |
|
337 | unshelving change 'default' | |
338 | temporarily committing pending changes (restore with 'hg unshelve --abort') |
|
338 | temporarily committing pending changes (restore with 'hg unshelve --abort') | |
339 | rebasing shelved changes |
|
339 | rebasing shelved changes | |
340 | rebasing 5:32c69314e062 "changes to: [mq]: second.patch" (tip) |
|
340 | rebasing 5:32c69314e062 "changes to: [mq]: second.patch" (tip) | |
341 | merging a/a |
|
341 | merging a/a | |
342 | warning: conflicts while merging a/a! (edit, then use 'hg resolve --mark') |
|
342 | warning: conflicts while merging a/a! (edit, then use 'hg resolve --mark') | |
343 | unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') |
|
343 | unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') | |
344 | [1] |
|
344 | [1] | |
345 | $ hg status -v |
|
345 | $ hg status -v | |
346 | M a/a |
|
346 | M a/a | |
347 | M b.rename/b |
|
347 | M b.rename/b | |
348 | M c.copy |
|
348 | M c.copy | |
349 | R b/b |
|
349 | R b/b | |
350 | ? a/a.orig |
|
350 | ? a/a.orig | |
351 | # The repository is in an unfinished *unshelve* state. |
|
351 | # The repository is in an unfinished *unshelve* state. | |
352 |
|
352 | |||
353 | # Unresolved merge conflicts: |
|
353 | # Unresolved merge conflicts: | |
354 | # |
|
354 | # | |
355 | # a/a |
|
355 | # a/a (glob) | |
356 | # |
|
356 | # | |
357 | # To mark files as resolved: hg resolve --mark FILE |
|
357 | # To mark files as resolved: hg resolve --mark FILE | |
358 |
|
358 | |||
359 | # To continue: hg unshelve --continue |
|
359 | # To continue: hg unshelve --continue | |
360 | # To abort: hg unshelve --abort |
|
360 | # To abort: hg unshelve --abort | |
361 |
|
361 | |||
362 |
|
362 | |||
363 | ensure that we have a merge with unresolved conflicts |
|
363 | ensure that we have a merge with unresolved conflicts | |
364 |
|
364 | |||
365 | $ hg heads -q --template '{rev}\n' |
|
365 | $ hg heads -q --template '{rev}\n' | |
366 | 5 |
|
366 | 5 | |
367 | 4 |
|
367 | 4 | |
368 | $ hg parents -q --template '{rev}\n' |
|
368 | $ hg parents -q --template '{rev}\n' | |
369 | 4 |
|
369 | 4 | |
370 | 5 |
|
370 | 5 | |
371 | $ hg status |
|
371 | $ hg status | |
372 | M a/a |
|
372 | M a/a | |
373 | M b.rename/b |
|
373 | M b.rename/b | |
374 | M c.copy |
|
374 | M c.copy | |
375 | R b/b |
|
375 | R b/b | |
376 | ? a/a.orig |
|
376 | ? a/a.orig | |
377 | $ hg diff |
|
377 | $ hg diff | |
378 | diff --git a/a/a b/a/a |
|
378 | diff --git a/a/a b/a/a | |
379 | --- a/a/a |
|
379 | --- a/a/a | |
380 | +++ b/a/a |
|
380 | +++ b/a/a | |
381 | @@ -1,2 +1,6 @@ |
|
381 | @@ -1,2 +1,6 @@ | |
382 | a |
|
382 | a | |
383 | +<<<<<<< dest: * - shelve: pending changes temporary commit (glob) |
|
383 | +<<<<<<< dest: * - shelve: pending changes temporary commit (glob) | |
384 | c |
|
384 | c | |
385 | +======= |
|
385 | +======= | |
386 | +a |
|
386 | +a | |
387 | +>>>>>>> source: 32c69314e062 - shelve: changes to: [mq]: second.patch |
|
387 | +>>>>>>> source: 32c69314e062 - shelve: changes to: [mq]: second.patch | |
388 | diff --git a/b/b b/b.rename/b |
|
388 | diff --git a/b/b b/b.rename/b | |
389 | rename from b/b |
|
389 | rename from b/b | |
390 | rename to b.rename/b |
|
390 | rename to b.rename/b | |
391 | diff --git a/c b/c.copy |
|
391 | diff --git a/c b/c.copy | |
392 | copy from c |
|
392 | copy from c | |
393 | copy to c.copy |
|
393 | copy to c.copy | |
394 | $ hg resolve -l |
|
394 | $ hg resolve -l | |
395 | U a/a |
|
395 | U a/a | |
396 |
|
396 | |||
397 | $ hg shelve |
|
397 | $ hg shelve | |
398 | abort: unshelve already in progress |
|
398 | abort: unshelve already in progress | |
399 | (use 'hg unshelve --continue' or 'hg unshelve --abort') |
|
399 | (use 'hg unshelve --continue' or 'hg unshelve --abort') | |
400 | [255] |
|
400 | [255] | |
401 |
|
401 | |||
402 | abort the unshelve and be happy |
|
402 | abort the unshelve and be happy | |
403 |
|
403 | |||
404 | $ hg status |
|
404 | $ hg status | |
405 | M a/a |
|
405 | M a/a | |
406 | M b.rename/b |
|
406 | M b.rename/b | |
407 | M c.copy |
|
407 | M c.copy | |
408 | R b/b |
|
408 | R b/b | |
409 | ? a/a.orig |
|
409 | ? a/a.orig | |
410 | $ hg unshelve -a |
|
410 | $ hg unshelve -a | |
411 | rebase aborted |
|
411 | rebase aborted | |
412 | unshelve of 'default' aborted |
|
412 | unshelve of 'default' aborted | |
413 | $ hg heads -q |
|
413 | $ hg heads -q | |
414 | 3:2e69b451d1ea |
|
414 | 3:2e69b451d1ea | |
415 | $ hg parents |
|
415 | $ hg parents | |
416 | changeset: 3:2e69b451d1ea |
|
416 | changeset: 3:2e69b451d1ea | |
417 | tag: tip |
|
417 | tag: tip | |
418 | user: test |
|
418 | user: test | |
419 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
419 | date: Thu Jan 01 00:00:00 1970 +0000 | |
420 | summary: second |
|
420 | summary: second | |
421 |
|
421 | |||
422 | $ hg resolve -l |
|
422 | $ hg resolve -l | |
423 | $ hg status |
|
423 | $ hg status | |
424 | A foo/foo |
|
424 | A foo/foo | |
425 | ? a/a.orig |
|
425 | ? a/a.orig | |
426 |
|
426 | |||
427 | try to continue with no unshelve underway |
|
427 | try to continue with no unshelve underway | |
428 |
|
428 | |||
429 | $ hg unshelve -c |
|
429 | $ hg unshelve -c | |
430 | abort: no unshelve in progress |
|
430 | abort: no unshelve in progress | |
431 | [255] |
|
431 | [255] | |
432 | $ hg status |
|
432 | $ hg status | |
433 | A foo/foo |
|
433 | A foo/foo | |
434 | ? a/a.orig |
|
434 | ? a/a.orig | |
435 |
|
435 | |||
436 | redo the unshelve to get a conflict |
|
436 | redo the unshelve to get a conflict | |
437 |
|
437 | |||
438 | $ hg unshelve -q |
|
438 | $ hg unshelve -q | |
439 | warning: conflicts while merging a/a! (edit, then use 'hg resolve --mark') |
|
439 | warning: conflicts while merging a/a! (edit, then use 'hg resolve --mark') | |
440 | unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') |
|
440 | unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') | |
441 | [1] |
|
441 | [1] | |
442 |
|
442 | |||
443 | attempt to continue |
|
443 | attempt to continue | |
444 |
|
444 | |||
445 | $ hg unshelve -c |
|
445 | $ hg unshelve -c | |
446 | abort: unresolved conflicts, can't continue |
|
446 | abort: unresolved conflicts, can't continue | |
447 | (see 'hg resolve', then 'hg unshelve --continue') |
|
447 | (see 'hg resolve', then 'hg unshelve --continue') | |
448 | [255] |
|
448 | [255] | |
449 |
|
449 | |||
450 | $ hg revert -r . a/a |
|
450 | $ hg revert -r . a/a | |
451 | $ hg resolve -m a/a |
|
451 | $ hg resolve -m a/a | |
452 | (no more unresolved files) |
|
452 | (no more unresolved files) | |
453 | continue: hg unshelve --continue |
|
453 | continue: hg unshelve --continue | |
454 |
|
454 | |||
455 | $ hg commit -m 'commit while unshelve in progress' |
|
455 | $ hg commit -m 'commit while unshelve in progress' | |
456 | abort: unshelve already in progress |
|
456 | abort: unshelve already in progress | |
457 | (use 'hg unshelve --continue' or 'hg unshelve --abort') |
|
457 | (use 'hg unshelve --continue' or 'hg unshelve --abort') | |
458 | [255] |
|
458 | [255] | |
459 |
|
459 | |||
460 | $ hg graft --continue |
|
460 | $ hg graft --continue | |
461 | abort: no graft in progress |
|
461 | abort: no graft in progress | |
462 | (continue: hg unshelve --continue) |
|
462 | (continue: hg unshelve --continue) | |
463 | [255] |
|
463 | [255] | |
464 | $ hg unshelve -c |
|
464 | $ hg unshelve -c | |
465 | rebasing 5:32c69314e062 "changes to: [mq]: second.patch" (tip) |
|
465 | rebasing 5:32c69314e062 "changes to: [mq]: second.patch" (tip) | |
466 | unshelve of 'default' complete |
|
466 | unshelve of 'default' complete | |
467 |
|
467 | |||
468 | ensure the repo is as we hope |
|
468 | ensure the repo is as we hope | |
469 |
|
469 | |||
470 | $ hg parents |
|
470 | $ hg parents | |
471 | changeset: 3:2e69b451d1ea |
|
471 | changeset: 3:2e69b451d1ea | |
472 | tag: tip |
|
472 | tag: tip | |
473 | user: test |
|
473 | user: test | |
474 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
474 | date: Thu Jan 01 00:00:00 1970 +0000 | |
475 | summary: second |
|
475 | summary: second | |
476 |
|
476 | |||
477 | $ hg heads -q |
|
477 | $ hg heads -q | |
478 | 3:2e69b451d1ea |
|
478 | 3:2e69b451d1ea | |
479 |
|
479 | |||
480 | $ hg status -C |
|
480 | $ hg status -C | |
481 | A b.rename/b |
|
481 | A b.rename/b | |
482 | b/b |
|
482 | b/b | |
483 | A c.copy |
|
483 | A c.copy | |
484 | c |
|
484 | c | |
485 | A foo/foo |
|
485 | A foo/foo | |
486 | R b/b |
|
486 | R b/b | |
487 | ? a/a.orig |
|
487 | ? a/a.orig | |
488 |
|
488 | |||
489 | there should be no shelves left |
|
489 | there should be no shelves left | |
490 |
|
490 | |||
491 | $ hg shelve -l |
|
491 | $ hg shelve -l | |
492 |
|
492 | |||
493 | #if execbit |
|
493 | #if execbit | |
494 |
|
494 | |||
495 | ensure that metadata-only changes are shelved |
|
495 | ensure that metadata-only changes are shelved | |
496 |
|
496 | |||
497 | $ chmod +x a/a |
|
497 | $ chmod +x a/a | |
498 | $ hg shelve -q -n execbit a/a |
|
498 | $ hg shelve -q -n execbit a/a | |
499 | $ hg status a/a |
|
499 | $ hg status a/a | |
500 | $ hg unshelve -q execbit |
|
500 | $ hg unshelve -q execbit | |
501 | $ hg status a/a |
|
501 | $ hg status a/a | |
502 | M a/a |
|
502 | M a/a | |
503 | $ hg revert a/a |
|
503 | $ hg revert a/a | |
504 |
|
504 | |||
505 | #endif |
|
505 | #endif | |
506 |
|
506 | |||
507 | #if symlink |
|
507 | #if symlink | |
508 |
|
508 | |||
509 | $ rm a/a |
|
509 | $ rm a/a | |
510 | $ ln -s foo a/a |
|
510 | $ ln -s foo a/a | |
511 | $ hg shelve -q -n symlink a/a |
|
511 | $ hg shelve -q -n symlink a/a | |
512 | $ hg status a/a |
|
512 | $ hg status a/a | |
513 | $ hg unshelve -q -n symlink |
|
513 | $ hg unshelve -q -n symlink | |
514 | $ hg status a/a |
|
514 | $ hg status a/a | |
515 | M a/a |
|
515 | M a/a | |
516 | $ hg revert a/a |
|
516 | $ hg revert a/a | |
517 |
|
517 | |||
518 | #endif |
|
518 | #endif | |
519 |
|
519 | |||
520 | set up another conflict between a commit and a shelved change |
|
520 | set up another conflict between a commit and a shelved change | |
521 |
|
521 | |||
522 | $ hg revert -q -C -a |
|
522 | $ hg revert -q -C -a | |
523 | $ rm a/a.orig b.rename/b c.copy |
|
523 | $ rm a/a.orig b.rename/b c.copy | |
524 | $ echo a >> a/a |
|
524 | $ echo a >> a/a | |
525 | $ hg shelve -q |
|
525 | $ hg shelve -q | |
526 | $ echo x >> a/a |
|
526 | $ echo x >> a/a | |
527 | $ hg ci -m 'create conflict' |
|
527 | $ hg ci -m 'create conflict' | |
528 | $ hg add foo/foo |
|
528 | $ hg add foo/foo | |
529 |
|
529 | |||
530 | if we resolve a conflict while unshelving, the unshelve should succeed |
|
530 | if we resolve a conflict while unshelving, the unshelve should succeed | |
531 |
|
531 | |||
532 | $ hg unshelve --tool :merge-other --keep |
|
532 | $ hg unshelve --tool :merge-other --keep | |
533 | unshelving change 'default' |
|
533 | unshelving change 'default' | |
534 | temporarily committing pending changes (restore with 'hg unshelve --abort') |
|
534 | temporarily committing pending changes (restore with 'hg unshelve --abort') | |
535 | rebasing shelved changes |
|
535 | rebasing shelved changes | |
536 | rebasing 6:2f694dd83a13 "changes to: second" (tip) |
|
536 | rebasing 6:2f694dd83a13 "changes to: second" (tip) | |
537 | merging a/a |
|
537 | merging a/a | |
538 | $ hg parents -q |
|
538 | $ hg parents -q | |
539 | 4:33f7f61e6c5e |
|
539 | 4:33f7f61e6c5e | |
540 | $ hg shelve -l |
|
540 | $ hg shelve -l | |
541 | default (*)* changes to: second (glob) |
|
541 | default (*)* changes to: second (glob) | |
542 | $ hg status |
|
542 | $ hg status | |
543 | M a/a |
|
543 | M a/a | |
544 | A foo/foo |
|
544 | A foo/foo | |
545 | $ cat a/a |
|
545 | $ cat a/a | |
546 | a |
|
546 | a | |
547 | c |
|
547 | c | |
548 | a |
|
548 | a | |
549 | $ cat > a/a << EOF |
|
549 | $ cat > a/a << EOF | |
550 | > a |
|
550 | > a | |
551 | > c |
|
551 | > c | |
552 | > x |
|
552 | > x | |
553 | > EOF |
|
553 | > EOF | |
554 |
|
554 | |||
555 | $ HGMERGE=true hg unshelve |
|
555 | $ HGMERGE=true hg unshelve | |
556 | unshelving change 'default' |
|
556 | unshelving change 'default' | |
557 | temporarily committing pending changes (restore with 'hg unshelve --abort') |
|
557 | temporarily committing pending changes (restore with 'hg unshelve --abort') | |
558 | rebasing shelved changes |
|
558 | rebasing shelved changes | |
559 | rebasing 6:2f694dd83a13 "changes to: second" (tip) |
|
559 | rebasing 6:2f694dd83a13 "changes to: second" (tip) | |
560 | merging a/a |
|
560 | merging a/a | |
561 | note: rebase of 6:2f694dd83a13 created no changes to commit |
|
561 | note: rebase of 6:2f694dd83a13 created no changes to commit | |
562 | $ hg parents -q |
|
562 | $ hg parents -q | |
563 | 4:33f7f61e6c5e |
|
563 | 4:33f7f61e6c5e | |
564 | $ hg shelve -l |
|
564 | $ hg shelve -l | |
565 | $ hg status |
|
565 | $ hg status | |
566 | A foo/foo |
|
566 | A foo/foo | |
567 | $ cat a/a |
|
567 | $ cat a/a | |
568 | a |
|
568 | a | |
569 | c |
|
569 | c | |
570 | x |
|
570 | x | |
571 |
|
571 | |||
572 | test keep and cleanup |
|
572 | test keep and cleanup | |
573 |
|
573 | |||
574 | $ hg shelve |
|
574 | $ hg shelve | |
575 | shelved as default |
|
575 | shelved as default | |
576 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
576 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
577 | $ hg shelve --list |
|
577 | $ hg shelve --list | |
578 | default (*)* changes to: create conflict (glob) |
|
578 | default (*)* changes to: create conflict (glob) | |
579 | $ hg unshelve -k |
|
579 | $ hg unshelve -k | |
580 | unshelving change 'default' |
|
580 | unshelving change 'default' | |
581 | $ hg shelve --list |
|
581 | $ hg shelve --list | |
582 | default (*)* changes to: create conflict (glob) |
|
582 | default (*)* changes to: create conflict (glob) | |
583 | $ hg shelve --cleanup |
|
583 | $ hg shelve --cleanup | |
584 | $ hg shelve --list |
|
584 | $ hg shelve --list | |
585 |
|
585 | |||
586 | $ hg shelve --cleanup --delete |
|
586 | $ hg shelve --cleanup --delete | |
587 | abort: options '--cleanup' and '--delete' may not be used together |
|
587 | abort: options '--cleanup' and '--delete' may not be used together | |
588 | [255] |
|
588 | [255] | |
589 | $ hg shelve --cleanup --patch |
|
589 | $ hg shelve --cleanup --patch | |
590 | abort: options '--cleanup' and '--patch' may not be used together |
|
590 | abort: options '--cleanup' and '--patch' may not be used together | |
591 | [255] |
|
591 | [255] | |
592 | $ hg shelve --cleanup --message MESSAGE |
|
592 | $ hg shelve --cleanup --message MESSAGE | |
593 | abort: options '--cleanup' and '--message' may not be used together |
|
593 | abort: options '--cleanup' and '--message' may not be used together | |
594 | [255] |
|
594 | [255] | |
595 |
|
595 | |||
596 | test bookmarks |
|
596 | test bookmarks | |
597 |
|
597 | |||
598 | $ hg bookmark test |
|
598 | $ hg bookmark test | |
599 | $ hg bookmark |
|
599 | $ hg bookmark | |
600 | * test 4:33f7f61e6c5e |
|
600 | * test 4:33f7f61e6c5e | |
601 | $ hg shelve |
|
601 | $ hg shelve | |
602 | shelved as test |
|
602 | shelved as test | |
603 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
603 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
604 | $ hg bookmark |
|
604 | $ hg bookmark | |
605 | * test 4:33f7f61e6c5e |
|
605 | * test 4:33f7f61e6c5e | |
606 | $ hg unshelve |
|
606 | $ hg unshelve | |
607 | unshelving change 'test' |
|
607 | unshelving change 'test' | |
608 | $ hg bookmark |
|
608 | $ hg bookmark | |
609 | * test 4:33f7f61e6c5e |
|
609 | * test 4:33f7f61e6c5e | |
610 |
|
610 | |||
611 | shelve should still work even if mq is disabled |
|
611 | shelve should still work even if mq is disabled | |
612 |
|
612 | |||
613 | $ hg --config extensions.mq=! shelve |
|
613 | $ hg --config extensions.mq=! shelve | |
614 | shelved as test |
|
614 | shelved as test | |
615 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
615 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
616 | $ hg --config extensions.mq=! shelve --list |
|
616 | $ hg --config extensions.mq=! shelve --list | |
617 | test (*)* changes to: create conflict (glob) |
|
617 | test (*)* changes to: create conflict (glob) | |
618 | $ hg bookmark |
|
618 | $ hg bookmark | |
619 | * test 4:33f7f61e6c5e |
|
619 | * test 4:33f7f61e6c5e | |
620 | $ hg --config extensions.mq=! unshelve |
|
620 | $ hg --config extensions.mq=! unshelve | |
621 | unshelving change 'test' |
|
621 | unshelving change 'test' | |
622 | $ hg bookmark |
|
622 | $ hg bookmark | |
623 | * test 4:33f7f61e6c5e |
|
623 | * test 4:33f7f61e6c5e | |
624 |
|
624 | |||
625 | shelve should leave dirstate clean (issue4055) |
|
625 | shelve should leave dirstate clean (issue4055) | |
626 |
|
626 | |||
627 | $ cd .. |
|
627 | $ cd .. | |
628 | $ hg init shelverebase |
|
628 | $ hg init shelverebase | |
629 | $ cd shelverebase |
|
629 | $ cd shelverebase | |
630 | $ printf 'x\ny\n' > x |
|
630 | $ printf 'x\ny\n' > x | |
631 | $ echo z > z |
|
631 | $ echo z > z | |
632 | $ hg commit -Aqm xy |
|
632 | $ hg commit -Aqm xy | |
633 | $ echo z >> x |
|
633 | $ echo z >> x | |
634 | $ hg commit -Aqm z |
|
634 | $ hg commit -Aqm z | |
635 | $ hg up 0 |
|
635 | $ hg up 0 | |
636 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
636 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
637 | $ printf 'a\nx\ny\nz\n' > x |
|
637 | $ printf 'a\nx\ny\nz\n' > x | |
638 | $ hg commit -Aqm xyz |
|
638 | $ hg commit -Aqm xyz | |
639 | $ echo c >> z |
|
639 | $ echo c >> z | |
640 | $ hg shelve |
|
640 | $ hg shelve | |
641 | shelved as default |
|
641 | shelved as default | |
642 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
642 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
643 | $ hg rebase -d 1 --config extensions.rebase= |
|
643 | $ hg rebase -d 1 --config extensions.rebase= | |
644 | rebasing 2:323bfa07f744 "xyz" (tip) |
|
644 | rebasing 2:323bfa07f744 "xyz" (tip) | |
645 | merging x |
|
645 | merging x | |
646 | saved backup bundle to $TESTTMP/shelverebase/.hg/strip-backup/323bfa07f744-78114325-rebase.hg (glob) |
|
646 | saved backup bundle to $TESTTMP/shelverebase/.hg/strip-backup/323bfa07f744-78114325-rebase.hg (glob) | |
647 | $ hg unshelve |
|
647 | $ hg unshelve | |
648 | unshelving change 'default' |
|
648 | unshelving change 'default' | |
649 | rebasing shelved changes |
|
649 | rebasing shelved changes | |
650 | rebasing 4:82a0d7d6ba61 "changes to: xyz" (tip) |
|
650 | rebasing 4:82a0d7d6ba61 "changes to: xyz" (tip) | |
651 | $ hg status |
|
651 | $ hg status | |
652 | M z |
|
652 | M z | |
653 |
|
653 | |||
654 | $ cd .. |
|
654 | $ cd .. | |
655 |
|
655 | |||
656 | shelve should only unshelve pending changes (issue4068) |
|
656 | shelve should only unshelve pending changes (issue4068) | |
657 |
|
657 | |||
658 | $ hg init onlypendingchanges |
|
658 | $ hg init onlypendingchanges | |
659 | $ cd onlypendingchanges |
|
659 | $ cd onlypendingchanges | |
660 | $ touch a |
|
660 | $ touch a | |
661 | $ hg ci -Aqm a |
|
661 | $ hg ci -Aqm a | |
662 | $ touch b |
|
662 | $ touch b | |
663 | $ hg ci -Aqm b |
|
663 | $ hg ci -Aqm b | |
664 | $ hg up -q 0 |
|
664 | $ hg up -q 0 | |
665 | $ touch c |
|
665 | $ touch c | |
666 | $ hg ci -Aqm c |
|
666 | $ hg ci -Aqm c | |
667 |
|
667 | |||
668 | $ touch d |
|
668 | $ touch d | |
669 | $ hg add d |
|
669 | $ hg add d | |
670 | $ hg shelve |
|
670 | $ hg shelve | |
671 | shelved as default |
|
671 | shelved as default | |
672 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
672 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
673 | $ hg up -q 1 |
|
673 | $ hg up -q 1 | |
674 | $ hg unshelve |
|
674 | $ hg unshelve | |
675 | unshelving change 'default' |
|
675 | unshelving change 'default' | |
676 | rebasing shelved changes |
|
676 | rebasing shelved changes | |
677 | rebasing 3:958bcbd1776e "changes to: c" (tip) |
|
677 | rebasing 3:958bcbd1776e "changes to: c" (tip) | |
678 | $ hg status |
|
678 | $ hg status | |
679 | A d |
|
679 | A d | |
680 |
|
680 | |||
681 | unshelve should work on an ancestor of the original commit |
|
681 | unshelve should work on an ancestor of the original commit | |
682 |
|
682 | |||
683 | $ hg shelve |
|
683 | $ hg shelve | |
684 | shelved as default |
|
684 | shelved as default | |
685 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
685 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
686 | $ hg up 0 |
|
686 | $ hg up 0 | |
687 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
687 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
688 | $ hg unshelve |
|
688 | $ hg unshelve | |
689 | unshelving change 'default' |
|
689 | unshelving change 'default' | |
690 | rebasing shelved changes |
|
690 | rebasing shelved changes | |
691 | rebasing 3:013284d9655e "changes to: b" (tip) |
|
691 | rebasing 3:013284d9655e "changes to: b" (tip) | |
692 | $ hg status |
|
692 | $ hg status | |
693 | A d |
|
693 | A d | |
694 |
|
694 | |||
695 | test bug 4073 we need to enable obsolete markers for it |
|
695 | test bug 4073 we need to enable obsolete markers for it | |
696 |
|
696 | |||
697 | $ cat >> $HGRCPATH << EOF |
|
697 | $ cat >> $HGRCPATH << EOF | |
698 | > [experimental] |
|
698 | > [experimental] | |
699 | > stabilization=createmarkers |
|
699 | > stabilization=createmarkers | |
700 | > EOF |
|
700 | > EOF | |
701 | $ hg shelve |
|
701 | $ hg shelve | |
702 | shelved as default |
|
702 | shelved as default | |
703 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
703 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
704 | $ hg debugobsolete `hg --debug id -i -r 1` |
|
704 | $ hg debugobsolete `hg --debug id -i -r 1` | |
705 | obsoleted 1 changesets |
|
705 | obsoleted 1 changesets | |
706 | $ hg unshelve |
|
706 | $ hg unshelve | |
707 | unshelving change 'default' |
|
707 | unshelving change 'default' | |
708 |
|
708 | |||
709 | unshelve should leave unknown files alone (issue4113) |
|
709 | unshelve should leave unknown files alone (issue4113) | |
710 |
|
710 | |||
711 | $ echo e > e |
|
711 | $ echo e > e | |
712 | $ hg shelve |
|
712 | $ hg shelve | |
713 | shelved as default |
|
713 | shelved as default | |
714 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
714 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
715 | $ hg status |
|
715 | $ hg status | |
716 | ? e |
|
716 | ? e | |
717 | $ hg unshelve |
|
717 | $ hg unshelve | |
718 | unshelving change 'default' |
|
718 | unshelving change 'default' | |
719 | $ hg status |
|
719 | $ hg status | |
720 | A d |
|
720 | A d | |
721 | ? e |
|
721 | ? e | |
722 | $ cat e |
|
722 | $ cat e | |
723 | e |
|
723 | e | |
724 |
|
724 | |||
725 | unshelve should keep a copy of unknown files |
|
725 | unshelve should keep a copy of unknown files | |
726 |
|
726 | |||
727 | $ hg add e |
|
727 | $ hg add e | |
728 | $ hg shelve |
|
728 | $ hg shelve | |
729 | shelved as default |
|
729 | shelved as default | |
730 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
730 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
731 | $ echo z > e |
|
731 | $ echo z > e | |
732 | $ hg unshelve |
|
732 | $ hg unshelve | |
733 | unshelving change 'default' |
|
733 | unshelving change 'default' | |
734 | $ cat e |
|
734 | $ cat e | |
735 | e |
|
735 | e | |
736 | $ cat e.orig |
|
736 | $ cat e.orig | |
737 | z |
|
737 | z | |
738 |
|
738 | |||
739 |
|
739 | |||
740 | unshelve and conflicts with tracked and untracked files |
|
740 | unshelve and conflicts with tracked and untracked files | |
741 |
|
741 | |||
742 | preparing: |
|
742 | preparing: | |
743 |
|
743 | |||
744 | $ rm *.orig |
|
744 | $ rm *.orig | |
745 | $ hg ci -qm 'commit stuff' |
|
745 | $ hg ci -qm 'commit stuff' | |
746 | $ hg phase -p null: |
|
746 | $ hg phase -p null: | |
747 |
|
747 | |||
748 | no other changes - no merge: |
|
748 | no other changes - no merge: | |
749 |
|
749 | |||
750 | $ echo f > f |
|
750 | $ echo f > f | |
751 | $ hg add f |
|
751 | $ hg add f | |
752 | $ hg shelve |
|
752 | $ hg shelve | |
753 | shelved as default |
|
753 | shelved as default | |
754 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
754 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
755 | $ echo g > f |
|
755 | $ echo g > f | |
756 | $ hg unshelve |
|
756 | $ hg unshelve | |
757 | unshelving change 'default' |
|
757 | unshelving change 'default' | |
758 | $ hg st |
|
758 | $ hg st | |
759 | A f |
|
759 | A f | |
760 | ? f.orig |
|
760 | ? f.orig | |
761 | $ cat f |
|
761 | $ cat f | |
762 | f |
|
762 | f | |
763 | $ cat f.orig |
|
763 | $ cat f.orig | |
764 | g |
|
764 | g | |
765 |
|
765 | |||
766 | other uncommitted changes - merge: |
|
766 | other uncommitted changes - merge: | |
767 |
|
767 | |||
768 | $ hg st |
|
768 | $ hg st | |
769 | A f |
|
769 | A f | |
770 | ? f.orig |
|
770 | ? f.orig | |
771 | $ hg shelve |
|
771 | $ hg shelve | |
772 | shelved as default |
|
772 | shelved as default | |
773 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
773 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
774 | $ hg log -G --template '{rev} {desc|firstline} {author}' -R bundle://.hg/shelved/default.hg -r 'bundle()' |
|
774 | $ hg log -G --template '{rev} {desc|firstline} {author}' -R bundle://.hg/shelved/default.hg -r 'bundle()' | |
775 | o 4 changes to: commit stuff shelve@localhost |
|
775 | o 4 changes to: commit stuff shelve@localhost | |
776 | | |
|
776 | | | |
777 | ~ |
|
777 | ~ | |
778 | $ hg log -G --template '{rev} {desc|firstline} {author}' |
|
778 | $ hg log -G --template '{rev} {desc|firstline} {author}' | |
779 | @ 3 commit stuff test |
|
779 | @ 3 commit stuff test | |
780 | | |
|
780 | | | |
781 | | o 2 c test |
|
781 | | o 2 c test | |
782 | |/ |
|
782 | |/ | |
783 | o 0 a test |
|
783 | o 0 a test | |
784 |
|
784 | |||
785 | $ mv f.orig f |
|
785 | $ mv f.orig f | |
786 | $ echo 1 > a |
|
786 | $ echo 1 > a | |
787 | $ hg unshelve --date '1073741824 0' |
|
787 | $ hg unshelve --date '1073741824 0' | |
788 | unshelving change 'default' |
|
788 | unshelving change 'default' | |
789 | temporarily committing pending changes (restore with 'hg unshelve --abort') |
|
789 | temporarily committing pending changes (restore with 'hg unshelve --abort') | |
790 | rebasing shelved changes |
|
790 | rebasing shelved changes | |
791 | rebasing 5:81152db69da7 "changes to: commit stuff" (tip) |
|
791 | rebasing 5:81152db69da7 "changes to: commit stuff" (tip) | |
792 | merging f |
|
792 | merging f | |
793 | warning: conflicts while merging f! (edit, then use 'hg resolve --mark') |
|
793 | warning: conflicts while merging f! (edit, then use 'hg resolve --mark') | |
794 | unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') |
|
794 | unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') | |
795 | [1] |
|
795 | [1] | |
796 | $ hg log -G --template '{rev} {desc|firstline} {author} {date|isodate}' |
|
796 | $ hg log -G --template '{rev} {desc|firstline} {author} {date|isodate}' | |
797 | @ 5 changes to: commit stuff shelve@localhost 1970-01-01 00:00 +0000 |
|
797 | @ 5 changes to: commit stuff shelve@localhost 1970-01-01 00:00 +0000 | |
798 | | |
|
798 | | | |
799 | | @ 4 pending changes temporary commit shelve@localhost 2004-01-10 13:37 +0000 |
|
799 | | @ 4 pending changes temporary commit shelve@localhost 2004-01-10 13:37 +0000 | |
800 | |/ |
|
800 | |/ | |
801 | o 3 commit stuff test 1970-01-01 00:00 +0000 |
|
801 | o 3 commit stuff test 1970-01-01 00:00 +0000 | |
802 | | |
|
802 | | | |
803 | | o 2 c test 1970-01-01 00:00 +0000 |
|
803 | | o 2 c test 1970-01-01 00:00 +0000 | |
804 | |/ |
|
804 | |/ | |
805 | o 0 a test 1970-01-01 00:00 +0000 |
|
805 | o 0 a test 1970-01-01 00:00 +0000 | |
806 |
|
806 | |||
807 | $ hg st |
|
807 | $ hg st | |
808 | M f |
|
808 | M f | |
809 | ? f.orig |
|
809 | ? f.orig | |
810 | $ cat f |
|
810 | $ cat f | |
811 | <<<<<<< dest: 5f6b880e719b - shelve: pending changes temporary commit |
|
811 | <<<<<<< dest: 5f6b880e719b - shelve: pending changes temporary commit | |
812 | g |
|
812 | g | |
813 | ======= |
|
813 | ======= | |
814 | f |
|
814 | f | |
815 | >>>>>>> source: 81152db69da7 - shelve: changes to: commit stuff |
|
815 | >>>>>>> source: 81152db69da7 - shelve: changes to: commit stuff | |
816 | $ cat f.orig |
|
816 | $ cat f.orig | |
817 | g |
|
817 | g | |
818 | $ hg unshelve --abort -t false |
|
818 | $ hg unshelve --abort -t false | |
819 | tool option will be ignored |
|
819 | tool option will be ignored | |
820 | rebase aborted |
|
820 | rebase aborted | |
821 | unshelve of 'default' aborted |
|
821 | unshelve of 'default' aborted | |
822 | $ hg st |
|
822 | $ hg st | |
823 | M a |
|
823 | M a | |
824 | ? f.orig |
|
824 | ? f.orig | |
825 | $ cat f.orig |
|
825 | $ cat f.orig | |
826 | g |
|
826 | g | |
827 | $ hg unshelve |
|
827 | $ hg unshelve | |
828 | unshelving change 'default' |
|
828 | unshelving change 'default' | |
829 | temporarily committing pending changes (restore with 'hg unshelve --abort') |
|
829 | temporarily committing pending changes (restore with 'hg unshelve --abort') | |
830 | rebasing shelved changes |
|
830 | rebasing shelved changes | |
831 | rebasing 5:81152db69da7 "changes to: commit stuff" (tip) |
|
831 | rebasing 5:81152db69da7 "changes to: commit stuff" (tip) | |
832 | $ hg st |
|
832 | $ hg st | |
833 | M a |
|
833 | M a | |
834 | A f |
|
834 | A f | |
835 | ? f.orig |
|
835 | ? f.orig | |
836 |
|
836 | |||
837 | other committed changes - merge: |
|
837 | other committed changes - merge: | |
838 |
|
838 | |||
839 | $ hg shelve f |
|
839 | $ hg shelve f | |
840 | shelved as default |
|
840 | shelved as default | |
841 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
841 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
842 | $ hg ci a -m 'intermediate other change' |
|
842 | $ hg ci a -m 'intermediate other change' | |
843 | $ mv f.orig f |
|
843 | $ mv f.orig f | |
844 | $ hg unshelve |
|
844 | $ hg unshelve | |
845 | unshelving change 'default' |
|
845 | unshelving change 'default' | |
846 | rebasing shelved changes |
|
846 | rebasing shelved changes | |
847 | rebasing 5:81152db69da7 "changes to: commit stuff" (tip) |
|
847 | rebasing 5:81152db69da7 "changes to: commit stuff" (tip) | |
848 | merging f |
|
848 | merging f | |
849 | warning: conflicts while merging f! (edit, then use 'hg resolve --mark') |
|
849 | warning: conflicts while merging f! (edit, then use 'hg resolve --mark') | |
850 | unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') |
|
850 | unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') | |
851 | [1] |
|
851 | [1] | |
852 | $ hg st |
|
852 | $ hg st | |
853 | M f |
|
853 | M f | |
854 | ? f.orig |
|
854 | ? f.orig | |
855 | $ cat f |
|
855 | $ cat f | |
856 | <<<<<<< dest: * - test: intermediate other change (glob) |
|
856 | <<<<<<< dest: * - test: intermediate other change (glob) | |
857 | g |
|
857 | g | |
858 | ======= |
|
858 | ======= | |
859 | f |
|
859 | f | |
860 | >>>>>>> source: 81152db69da7 - shelve: changes to: commit stuff |
|
860 | >>>>>>> source: 81152db69da7 - shelve: changes to: commit stuff | |
861 | $ cat f.orig |
|
861 | $ cat f.orig | |
862 | g |
|
862 | g | |
863 | $ hg unshelve --abort |
|
863 | $ hg unshelve --abort | |
864 | rebase aborted |
|
864 | rebase aborted | |
865 | unshelve of 'default' aborted |
|
865 | unshelve of 'default' aborted | |
866 | $ hg st |
|
866 | $ hg st | |
867 | ? f.orig |
|
867 | ? f.orig | |
868 | $ cat f.orig |
|
868 | $ cat f.orig | |
869 | g |
|
869 | g | |
870 | $ hg shelve --delete default |
|
870 | $ hg shelve --delete default | |
871 |
|
871 | |||
872 | Recreate some conflict again |
|
872 | Recreate some conflict again | |
873 |
|
873 | |||
874 | $ cd ../repo |
|
874 | $ cd ../repo | |
875 | $ hg up -C -r 3 |
|
875 | $ hg up -C -r 3 | |
876 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
876 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
877 | (leaving bookmark test) |
|
877 | (leaving bookmark test) | |
878 | $ echo y >> a/a |
|
878 | $ echo y >> a/a | |
879 | $ hg shelve |
|
879 | $ hg shelve | |
880 | shelved as default |
|
880 | shelved as default | |
881 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
881 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
882 | $ hg up test |
|
882 | $ hg up test | |
883 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
883 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
884 | (activating bookmark test) |
|
884 | (activating bookmark test) | |
885 | $ hg bookmark |
|
885 | $ hg bookmark | |
886 | * test 4:33f7f61e6c5e |
|
886 | * test 4:33f7f61e6c5e | |
887 | $ hg unshelve |
|
887 | $ hg unshelve | |
888 | unshelving change 'default' |
|
888 | unshelving change 'default' | |
889 | rebasing shelved changes |
|
889 | rebasing shelved changes | |
890 | rebasing 5:e42a7da90865 "changes to: second" (tip) |
|
890 | rebasing 5:e42a7da90865 "changes to: second" (tip) | |
891 | merging a/a |
|
891 | merging a/a | |
892 | warning: conflicts while merging a/a! (edit, then use 'hg resolve --mark') |
|
892 | warning: conflicts while merging a/a! (edit, then use 'hg resolve --mark') | |
893 | unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') |
|
893 | unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') | |
894 | [1] |
|
894 | [1] | |
895 | $ hg bookmark |
|
895 | $ hg bookmark | |
896 | test 4:33f7f61e6c5e |
|
896 | test 4:33f7f61e6c5e | |
897 |
|
897 | |||
898 | Test that resolving all conflicts in one direction (so that the rebase |
|
898 | Test that resolving all conflicts in one direction (so that the rebase | |
899 | is a no-op), works (issue4398) |
|
899 | is a no-op), works (issue4398) | |
900 |
|
900 | |||
901 | $ hg revert -a -r . |
|
901 | $ hg revert -a -r . | |
902 | reverting a/a (glob) |
|
902 | reverting a/a (glob) | |
903 | $ hg resolve -m a/a |
|
903 | $ hg resolve -m a/a | |
904 | (no more unresolved files) |
|
904 | (no more unresolved files) | |
905 | continue: hg unshelve --continue |
|
905 | continue: hg unshelve --continue | |
906 | $ hg unshelve -c |
|
906 | $ hg unshelve -c | |
907 | rebasing 5:e42a7da90865 "changes to: second" (tip) |
|
907 | rebasing 5:e42a7da90865 "changes to: second" (tip) | |
908 | note: rebase of 5:e42a7da90865 created no changes to commit |
|
908 | note: rebase of 5:e42a7da90865 created no changes to commit | |
909 | unshelve of 'default' complete |
|
909 | unshelve of 'default' complete | |
910 | $ hg bookmark |
|
910 | $ hg bookmark | |
911 | * test 4:33f7f61e6c5e |
|
911 | * test 4:33f7f61e6c5e | |
912 | $ hg diff |
|
912 | $ hg diff | |
913 | $ hg status |
|
913 | $ hg status | |
914 | ? a/a.orig |
|
914 | ? a/a.orig | |
915 | ? foo/foo |
|
915 | ? foo/foo | |
916 | $ hg summary |
|
916 | $ hg summary | |
917 | parent: 4:33f7f61e6c5e tip |
|
917 | parent: 4:33f7f61e6c5e tip | |
918 | create conflict |
|
918 | create conflict | |
919 | branch: default |
|
919 | branch: default | |
920 | bookmarks: *test |
|
920 | bookmarks: *test | |
921 | commit: 2 unknown (clean) |
|
921 | commit: 2 unknown (clean) | |
922 | update: (current) |
|
922 | update: (current) | |
923 | phases: 5 draft |
|
923 | phases: 5 draft | |
924 |
|
924 | |||
925 | $ hg shelve --delete --stat |
|
925 | $ hg shelve --delete --stat | |
926 | abort: options '--delete' and '--stat' may not be used together |
|
926 | abort: options '--delete' and '--stat' may not be used together | |
927 | [255] |
|
927 | [255] | |
928 | $ hg shelve --delete --name NAME |
|
928 | $ hg shelve --delete --name NAME | |
929 | abort: options '--delete' and '--name' may not be used together |
|
929 | abort: options '--delete' and '--name' may not be used together | |
930 | [255] |
|
930 | [255] | |
931 |
|
931 | |||
932 | Test interactive shelve |
|
932 | Test interactive shelve | |
933 | $ cat <<EOF >> $HGRCPATH |
|
933 | $ cat <<EOF >> $HGRCPATH | |
934 | > [ui] |
|
934 | > [ui] | |
935 | > interactive = true |
|
935 | > interactive = true | |
936 | > EOF |
|
936 | > EOF | |
937 | $ echo 'a' >> a/b |
|
937 | $ echo 'a' >> a/b | |
938 | $ cat a/a >> a/b |
|
938 | $ cat a/a >> a/b | |
939 | $ echo 'x' >> a/b |
|
939 | $ echo 'x' >> a/b | |
940 | $ mv a/b a/a |
|
940 | $ mv a/b a/a | |
941 | $ echo 'a' >> foo/foo |
|
941 | $ echo 'a' >> foo/foo | |
942 | $ hg st |
|
942 | $ hg st | |
943 | M a/a |
|
943 | M a/a | |
944 | ? a/a.orig |
|
944 | ? a/a.orig | |
945 | ? foo/foo |
|
945 | ? foo/foo | |
946 | $ cat a/a |
|
946 | $ cat a/a | |
947 | a |
|
947 | a | |
948 | a |
|
948 | a | |
949 | c |
|
949 | c | |
950 | x |
|
950 | x | |
951 | x |
|
951 | x | |
952 | $ cat foo/foo |
|
952 | $ cat foo/foo | |
953 | foo |
|
953 | foo | |
954 | a |
|
954 | a | |
955 | $ hg shelve --interactive --config ui.interactive=false |
|
955 | $ hg shelve --interactive --config ui.interactive=false | |
956 | abort: running non-interactively |
|
956 | abort: running non-interactively | |
957 | [255] |
|
957 | [255] | |
958 | $ hg shelve --interactive << EOF |
|
958 | $ hg shelve --interactive << EOF | |
959 | > y |
|
959 | > y | |
960 | > y |
|
960 | > y | |
961 | > n |
|
961 | > n | |
962 | > EOF |
|
962 | > EOF | |
963 | diff --git a/a/a b/a/a |
|
963 | diff --git a/a/a b/a/a | |
964 | 2 hunks, 2 lines changed |
|
964 | 2 hunks, 2 lines changed | |
965 | examine changes to 'a/a'? [Ynesfdaq?] y |
|
965 | examine changes to 'a/a'? [Ynesfdaq?] y | |
966 |
|
966 | |||
967 | @@ -1,3 +1,4 @@ |
|
967 | @@ -1,3 +1,4 @@ | |
968 | +a |
|
968 | +a | |
969 | a |
|
969 | a | |
970 | c |
|
970 | c | |
971 | x |
|
971 | x | |
972 | record change 1/2 to 'a/a'? [Ynesfdaq?] y |
|
972 | record change 1/2 to 'a/a'? [Ynesfdaq?] y | |
973 |
|
973 | |||
974 | @@ -1,3 +2,4 @@ |
|
974 | @@ -1,3 +2,4 @@ | |
975 | a |
|
975 | a | |
976 | c |
|
976 | c | |
977 | x |
|
977 | x | |
978 | +x |
|
978 | +x | |
979 | record change 2/2 to 'a/a'? [Ynesfdaq?] n |
|
979 | record change 2/2 to 'a/a'? [Ynesfdaq?] n | |
980 |
|
980 | |||
981 | shelved as test |
|
981 | shelved as test | |
982 | merging a/a |
|
982 | merging a/a | |
983 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
983 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
984 | $ cat a/a |
|
984 | $ cat a/a | |
985 | a |
|
985 | a | |
986 | c |
|
986 | c | |
987 | x |
|
987 | x | |
988 | x |
|
988 | x | |
989 | $ cat foo/foo |
|
989 | $ cat foo/foo | |
990 | foo |
|
990 | foo | |
991 | a |
|
991 | a | |
992 | $ hg st |
|
992 | $ hg st | |
993 | M a/a |
|
993 | M a/a | |
994 | ? foo/foo |
|
994 | ? foo/foo | |
995 | $ hg bookmark |
|
995 | $ hg bookmark | |
996 | * test 4:33f7f61e6c5e |
|
996 | * test 4:33f7f61e6c5e | |
997 | $ hg unshelve |
|
997 | $ hg unshelve | |
998 | unshelving change 'test' |
|
998 | unshelving change 'test' | |
999 | temporarily committing pending changes (restore with 'hg unshelve --abort') |
|
999 | temporarily committing pending changes (restore with 'hg unshelve --abort') | |
1000 | rebasing shelved changes |
|
1000 | rebasing shelved changes | |
1001 | rebasing 6:96a1354f65f6 "changes to: create conflict" (tip) |
|
1001 | rebasing 6:96a1354f65f6 "changes to: create conflict" (tip) | |
1002 | merging a/a |
|
1002 | merging a/a | |
1003 | $ hg bookmark |
|
1003 | $ hg bookmark | |
1004 | * test 4:33f7f61e6c5e |
|
1004 | * test 4:33f7f61e6c5e | |
1005 | $ cat a/a |
|
1005 | $ cat a/a | |
1006 | a |
|
1006 | a | |
1007 | a |
|
1007 | a | |
1008 | c |
|
1008 | c | |
1009 | x |
|
1009 | x | |
1010 | x |
|
1010 | x | |
1011 |
|
1011 | |||
1012 | shelve --patch and shelve --stat should work with valid shelfnames |
|
1012 | shelve --patch and shelve --stat should work with valid shelfnames | |
1013 |
|
1013 | |||
1014 | $ hg up --clean . |
|
1014 | $ hg up --clean . | |
1015 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1015 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1016 | (leaving bookmark test) |
|
1016 | (leaving bookmark test) | |
1017 | $ hg shelve --list |
|
1017 | $ hg shelve --list | |
1018 | $ echo 'patch a' > shelf-patch-a |
|
1018 | $ echo 'patch a' > shelf-patch-a | |
1019 | $ hg add shelf-patch-a |
|
1019 | $ hg add shelf-patch-a | |
1020 | $ hg shelve |
|
1020 | $ hg shelve | |
1021 | shelved as default |
|
1021 | shelved as default | |
1022 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1022 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1023 | $ echo 'patch b' > shelf-patch-b |
|
1023 | $ echo 'patch b' > shelf-patch-b | |
1024 | $ hg add shelf-patch-b |
|
1024 | $ hg add shelf-patch-b | |
1025 | $ hg shelve |
|
1025 | $ hg shelve | |
1026 | shelved as default-01 |
|
1026 | shelved as default-01 | |
1027 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1027 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1028 | $ hg shelve --patch default default-01 |
|
1028 | $ hg shelve --patch default default-01 | |
1029 | default-01 (*)* changes to: create conflict (glob) |
|
1029 | default-01 (*)* changes to: create conflict (glob) | |
1030 |
|
1030 | |||
1031 | diff --git a/shelf-patch-b b/shelf-patch-b |
|
1031 | diff --git a/shelf-patch-b b/shelf-patch-b | |
1032 | new file mode 100644 |
|
1032 | new file mode 100644 | |
1033 | --- /dev/null |
|
1033 | --- /dev/null | |
1034 | +++ b/shelf-patch-b |
|
1034 | +++ b/shelf-patch-b | |
1035 | @@ -0,0 +1,1 @@ |
|
1035 | @@ -0,0 +1,1 @@ | |
1036 | +patch b |
|
1036 | +patch b | |
1037 | default (*)* changes to: create conflict (glob) |
|
1037 | default (*)* changes to: create conflict (glob) | |
1038 |
|
1038 | |||
1039 | diff --git a/shelf-patch-a b/shelf-patch-a |
|
1039 | diff --git a/shelf-patch-a b/shelf-patch-a | |
1040 | new file mode 100644 |
|
1040 | new file mode 100644 | |
1041 | --- /dev/null |
|
1041 | --- /dev/null | |
1042 | +++ b/shelf-patch-a |
|
1042 | +++ b/shelf-patch-a | |
1043 | @@ -0,0 +1,1 @@ |
|
1043 | @@ -0,0 +1,1 @@ | |
1044 | +patch a |
|
1044 | +patch a | |
1045 | $ hg shelve --stat default default-01 |
|
1045 | $ hg shelve --stat default default-01 | |
1046 | default-01 (*)* changes to: create conflict (glob) |
|
1046 | default-01 (*)* changes to: create conflict (glob) | |
1047 | shelf-patch-b | 1 + |
|
1047 | shelf-patch-b | 1 + | |
1048 | 1 files changed, 1 insertions(+), 0 deletions(-) |
|
1048 | 1 files changed, 1 insertions(+), 0 deletions(-) | |
1049 | default (*)* changes to: create conflict (glob) |
|
1049 | default (*)* changes to: create conflict (glob) | |
1050 | shelf-patch-a | 1 + |
|
1050 | shelf-patch-a | 1 + | |
1051 | 1 files changed, 1 insertions(+), 0 deletions(-) |
|
1051 | 1 files changed, 1 insertions(+), 0 deletions(-) | |
1052 | $ hg shelve --patch default |
|
1052 | $ hg shelve --patch default | |
1053 | default (*)* changes to: create conflict (glob) |
|
1053 | default (*)* changes to: create conflict (glob) | |
1054 |
|
1054 | |||
1055 | diff --git a/shelf-patch-a b/shelf-patch-a |
|
1055 | diff --git a/shelf-patch-a b/shelf-patch-a | |
1056 | new file mode 100644 |
|
1056 | new file mode 100644 | |
1057 | --- /dev/null |
|
1057 | --- /dev/null | |
1058 | +++ b/shelf-patch-a |
|
1058 | +++ b/shelf-patch-a | |
1059 | @@ -0,0 +1,1 @@ |
|
1059 | @@ -0,0 +1,1 @@ | |
1060 | +patch a |
|
1060 | +patch a | |
1061 | $ hg shelve --stat default |
|
1061 | $ hg shelve --stat default | |
1062 | default (*)* changes to: create conflict (glob) |
|
1062 | default (*)* changes to: create conflict (glob) | |
1063 | shelf-patch-a | 1 + |
|
1063 | shelf-patch-a | 1 + | |
1064 | 1 files changed, 1 insertions(+), 0 deletions(-) |
|
1064 | 1 files changed, 1 insertions(+), 0 deletions(-) | |
1065 | $ hg shelve --patch nonexistentshelf |
|
1065 | $ hg shelve --patch nonexistentshelf | |
1066 | abort: cannot find shelf nonexistentshelf |
|
1066 | abort: cannot find shelf nonexistentshelf | |
1067 | [255] |
|
1067 | [255] | |
1068 | $ hg shelve --stat nonexistentshelf |
|
1068 | $ hg shelve --stat nonexistentshelf | |
1069 | abort: cannot find shelf nonexistentshelf |
|
1069 | abort: cannot find shelf nonexistentshelf | |
1070 | [255] |
|
1070 | [255] | |
1071 | $ hg shelve --patch default nonexistentshelf |
|
1071 | $ hg shelve --patch default nonexistentshelf | |
1072 | abort: cannot find shelf nonexistentshelf |
|
1072 | abort: cannot find shelf nonexistentshelf | |
1073 | [255] |
|
1073 | [255] | |
1074 | $ hg shelve --patch |
|
1074 | $ hg shelve --patch | |
1075 | abort: --patch expects at least one shelf |
|
1075 | abort: --patch expects at least one shelf | |
1076 | [255] |
|
1076 | [255] | |
1077 |
|
1077 | |||
1078 | $ cd .. |
|
1078 | $ cd .. | |
1079 |
|
1079 | |||
1080 | Shelve from general delta repo uses bundle2 on disk |
|
1080 | Shelve from general delta repo uses bundle2 on disk | |
1081 | -------------------------------------------------- |
|
1081 | -------------------------------------------------- | |
1082 |
|
1082 | |||
1083 | no general delta |
|
1083 | no general delta | |
1084 |
|
1084 | |||
1085 | $ hg clone --pull repo bundle1 --config format.usegeneraldelta=0 |
|
1085 | $ hg clone --pull repo bundle1 --config format.usegeneraldelta=0 | |
1086 | requesting all changes |
|
1086 | requesting all changes | |
1087 | adding changesets |
|
1087 | adding changesets | |
1088 | adding manifests |
|
1088 | adding manifests | |
1089 | adding file changes |
|
1089 | adding file changes | |
1090 | added 5 changesets with 8 changes to 6 files |
|
1090 | added 5 changesets with 8 changes to 6 files | |
1091 | updating to branch default |
|
1091 | updating to branch default | |
1092 | 6 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1092 | 6 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1093 | $ cd bundle1 |
|
1093 | $ cd bundle1 | |
1094 | $ echo babar > jungle |
|
1094 | $ echo babar > jungle | |
1095 | $ hg add jungle |
|
1095 | $ hg add jungle | |
1096 | $ hg shelve |
|
1096 | $ hg shelve | |
1097 | shelved as default |
|
1097 | shelved as default | |
1098 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1098 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1099 | $ hg debugbundle .hg/shelved/*.hg |
|
1099 | $ hg debugbundle .hg/shelved/*.hg | |
1100 | 45993d65fe9dc3c6d8764b9c3b07fa831ee7d92d |
|
1100 | 45993d65fe9dc3c6d8764b9c3b07fa831ee7d92d | |
1101 | $ cd .. |
|
1101 | $ cd .. | |
1102 |
|
1102 | |||
1103 | with general delta |
|
1103 | with general delta | |
1104 |
|
1104 | |||
1105 | $ hg clone --pull repo bundle2 --config format.usegeneraldelta=1 |
|
1105 | $ hg clone --pull repo bundle2 --config format.usegeneraldelta=1 | |
1106 | requesting all changes |
|
1106 | requesting all changes | |
1107 | adding changesets |
|
1107 | adding changesets | |
1108 | adding manifests |
|
1108 | adding manifests | |
1109 | adding file changes |
|
1109 | adding file changes | |
1110 | added 5 changesets with 8 changes to 6 files |
|
1110 | added 5 changesets with 8 changes to 6 files | |
1111 | updating to branch default |
|
1111 | updating to branch default | |
1112 | 6 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1112 | 6 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1113 | $ cd bundle2 |
|
1113 | $ cd bundle2 | |
1114 | $ echo babar > jungle |
|
1114 | $ echo babar > jungle | |
1115 | $ hg add jungle |
|
1115 | $ hg add jungle | |
1116 | $ hg shelve |
|
1116 | $ hg shelve | |
1117 | shelved as default |
|
1117 | shelved as default | |
1118 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1118 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1119 | $ hg debugbundle .hg/shelved/*.hg |
|
1119 | $ hg debugbundle .hg/shelved/*.hg | |
1120 | Stream params: {Compression: BZ} |
|
1120 | Stream params: {Compression: BZ} | |
1121 | changegroup -- {nbchanges: 1, version: 02} |
|
1121 | changegroup -- {nbchanges: 1, version: 02} | |
1122 | 45993d65fe9dc3c6d8764b9c3b07fa831ee7d92d |
|
1122 | 45993d65fe9dc3c6d8764b9c3b07fa831ee7d92d | |
1123 | $ cd .. |
|
1123 | $ cd .. | |
1124 |
|
1124 | |||
1125 | Test visibility of in-memory changes inside transaction to external hook |
|
1125 | Test visibility of in-memory changes inside transaction to external hook | |
1126 | ------------------------------------------------------------------------ |
|
1126 | ------------------------------------------------------------------------ | |
1127 |
|
1127 | |||
1128 | $ cd repo |
|
1128 | $ cd repo | |
1129 |
|
1129 | |||
1130 | $ echo xxxx >> x |
|
1130 | $ echo xxxx >> x | |
1131 | $ hg commit -m "#5: changes to invoke rebase" |
|
1131 | $ hg commit -m "#5: changes to invoke rebase" | |
1132 |
|
1132 | |||
1133 | $ cat > $TESTTMP/checkvisibility.sh <<EOF |
|
1133 | $ cat > $TESTTMP/checkvisibility.sh <<EOF | |
1134 | > echo "==== \$1:" |
|
1134 | > echo "==== \$1:" | |
1135 | > hg parents --template "VISIBLE {rev}:{node|short}\n" |
|
1135 | > hg parents --template "VISIBLE {rev}:{node|short}\n" | |
1136 | > # test that pending changes are hidden |
|
1136 | > # test that pending changes are hidden | |
1137 | > unset HG_PENDING |
|
1137 | > unset HG_PENDING | |
1138 | > hg parents --template "ACTUAL {rev}:{node|short}\n" |
|
1138 | > hg parents --template "ACTUAL {rev}:{node|short}\n" | |
1139 | > echo "====" |
|
1139 | > echo "====" | |
1140 | > EOF |
|
1140 | > EOF | |
1141 |
|
1141 | |||
1142 | $ cat >> .hg/hgrc <<EOF |
|
1142 | $ cat >> .hg/hgrc <<EOF | |
1143 | > [defaults] |
|
1143 | > [defaults] | |
1144 | > # to fix hash id of temporary revisions |
|
1144 | > # to fix hash id of temporary revisions | |
1145 | > unshelve = --date '0 0' |
|
1145 | > unshelve = --date '0 0' | |
1146 | > EOF |
|
1146 | > EOF | |
1147 |
|
1147 | |||
1148 | "hg unshelve" at REV5 implies steps below: |
|
1148 | "hg unshelve" at REV5 implies steps below: | |
1149 |
|
1149 | |||
1150 | (1) commit changes in the working directory (REV6) |
|
1150 | (1) commit changes in the working directory (REV6) | |
1151 | (2) unbundle shelved revision (REV7) |
|
1151 | (2) unbundle shelved revision (REV7) | |
1152 | (3) rebase: merge REV7 into REV6 (REV6 => REV6, REV7) |
|
1152 | (3) rebase: merge REV7 into REV6 (REV6 => REV6, REV7) | |
1153 | (4) rebase: commit merged revision (REV8) |
|
1153 | (4) rebase: commit merged revision (REV8) | |
1154 | (5) rebase: update to REV6 (REV8 => REV6) |
|
1154 | (5) rebase: update to REV6 (REV8 => REV6) | |
1155 | (6) update to REV5 (REV6 => REV5) |
|
1155 | (6) update to REV5 (REV6 => REV5) | |
1156 | (7) abort transaction |
|
1156 | (7) abort transaction | |
1157 |
|
1157 | |||
1158 | == test visibility to external preupdate hook |
|
1158 | == test visibility to external preupdate hook | |
1159 |
|
1159 | |||
1160 | $ cat >> .hg/hgrc <<EOF |
|
1160 | $ cat >> .hg/hgrc <<EOF | |
1161 | > [hooks] |
|
1161 | > [hooks] | |
1162 | > preupdate.visibility = sh $TESTTMP/checkvisibility.sh preupdate |
|
1162 | > preupdate.visibility = sh $TESTTMP/checkvisibility.sh preupdate | |
1163 | > EOF |
|
1163 | > EOF | |
1164 |
|
1164 | |||
1165 | $ echo nnnn >> n |
|
1165 | $ echo nnnn >> n | |
1166 |
|
1166 | |||
1167 | $ sh $TESTTMP/checkvisibility.sh before-unshelving |
|
1167 | $ sh $TESTTMP/checkvisibility.sh before-unshelving | |
1168 | ==== before-unshelving: |
|
1168 | ==== before-unshelving: | |
1169 | VISIBLE 5:703117a2acfb |
|
1169 | VISIBLE 5:703117a2acfb | |
1170 | ACTUAL 5:703117a2acfb |
|
1170 | ACTUAL 5:703117a2acfb | |
1171 | ==== |
|
1171 | ==== | |
1172 |
|
1172 | |||
1173 | $ hg unshelve --keep default |
|
1173 | $ hg unshelve --keep default | |
1174 | temporarily committing pending changes (restore with 'hg unshelve --abort') |
|
1174 | temporarily committing pending changes (restore with 'hg unshelve --abort') | |
1175 | rebasing shelved changes |
|
1175 | rebasing shelved changes | |
1176 | rebasing 7:206bf5d4f922 "changes to: create conflict" (tip) |
|
1176 | rebasing 7:206bf5d4f922 "changes to: create conflict" (tip) | |
1177 | ==== preupdate: |
|
1177 | ==== preupdate: | |
1178 | VISIBLE 6:66b86db80ee4 |
|
1178 | VISIBLE 6:66b86db80ee4 | |
1179 | ACTUAL 5:703117a2acfb |
|
1179 | ACTUAL 5:703117a2acfb | |
1180 | ==== |
|
1180 | ==== | |
1181 | ==== preupdate: |
|
1181 | ==== preupdate: | |
1182 | VISIBLE 8:a0e04704317e |
|
1182 | VISIBLE 8:a0e04704317e | |
1183 | ACTUAL 5:703117a2acfb |
|
1183 | ACTUAL 5:703117a2acfb | |
1184 | ==== |
|
1184 | ==== | |
1185 | ==== preupdate: |
|
1185 | ==== preupdate: | |
1186 | VISIBLE 6:66b86db80ee4 |
|
1186 | VISIBLE 6:66b86db80ee4 | |
1187 | ACTUAL 5:703117a2acfb |
|
1187 | ACTUAL 5:703117a2acfb | |
1188 | ==== |
|
1188 | ==== | |
1189 |
|
1189 | |||
1190 | $ cat >> .hg/hgrc <<EOF |
|
1190 | $ cat >> .hg/hgrc <<EOF | |
1191 | > [hooks] |
|
1191 | > [hooks] | |
1192 | > preupdate.visibility = |
|
1192 | > preupdate.visibility = | |
1193 | > EOF |
|
1193 | > EOF | |
1194 |
|
1194 | |||
1195 | $ sh $TESTTMP/checkvisibility.sh after-unshelving |
|
1195 | $ sh $TESTTMP/checkvisibility.sh after-unshelving | |
1196 | ==== after-unshelving: |
|
1196 | ==== after-unshelving: | |
1197 | VISIBLE 5:703117a2acfb |
|
1197 | VISIBLE 5:703117a2acfb | |
1198 | ACTUAL 5:703117a2acfb |
|
1198 | ACTUAL 5:703117a2acfb | |
1199 | ==== |
|
1199 | ==== | |
1200 |
|
1200 | |||
1201 | == test visibility to external update hook |
|
1201 | == test visibility to external update hook | |
1202 |
|
1202 | |||
1203 | $ hg update -q -C 5 |
|
1203 | $ hg update -q -C 5 | |
1204 |
|
1204 | |||
1205 | $ cat >> .hg/hgrc <<EOF |
|
1205 | $ cat >> .hg/hgrc <<EOF | |
1206 | > [hooks] |
|
1206 | > [hooks] | |
1207 | > update.visibility = sh $TESTTMP/checkvisibility.sh update |
|
1207 | > update.visibility = sh $TESTTMP/checkvisibility.sh update | |
1208 | > EOF |
|
1208 | > EOF | |
1209 |
|
1209 | |||
1210 | $ echo nnnn >> n |
|
1210 | $ echo nnnn >> n | |
1211 |
|
1211 | |||
1212 | $ sh $TESTTMP/checkvisibility.sh before-unshelving |
|
1212 | $ sh $TESTTMP/checkvisibility.sh before-unshelving | |
1213 | ==== before-unshelving: |
|
1213 | ==== before-unshelving: | |
1214 | VISIBLE 5:703117a2acfb |
|
1214 | VISIBLE 5:703117a2acfb | |
1215 | ACTUAL 5:703117a2acfb |
|
1215 | ACTUAL 5:703117a2acfb | |
1216 | ==== |
|
1216 | ==== | |
1217 |
|
1217 | |||
1218 | $ hg unshelve --keep default |
|
1218 | $ hg unshelve --keep default | |
1219 | temporarily committing pending changes (restore with 'hg unshelve --abort') |
|
1219 | temporarily committing pending changes (restore with 'hg unshelve --abort') | |
1220 | rebasing shelved changes |
|
1220 | rebasing shelved changes | |
1221 | rebasing 7:206bf5d4f922 "changes to: create conflict" (tip) |
|
1221 | rebasing 7:206bf5d4f922 "changes to: create conflict" (tip) | |
1222 | ==== update: |
|
1222 | ==== update: | |
1223 | VISIBLE 6:66b86db80ee4 |
|
1223 | VISIBLE 6:66b86db80ee4 | |
1224 | VISIBLE 7:206bf5d4f922 |
|
1224 | VISIBLE 7:206bf5d4f922 | |
1225 | ACTUAL 5:703117a2acfb |
|
1225 | ACTUAL 5:703117a2acfb | |
1226 | ==== |
|
1226 | ==== | |
1227 | ==== update: |
|
1227 | ==== update: | |
1228 | VISIBLE 6:66b86db80ee4 |
|
1228 | VISIBLE 6:66b86db80ee4 | |
1229 | ACTUAL 5:703117a2acfb |
|
1229 | ACTUAL 5:703117a2acfb | |
1230 | ==== |
|
1230 | ==== | |
1231 | ==== update: |
|
1231 | ==== update: | |
1232 | VISIBLE 5:703117a2acfb |
|
1232 | VISIBLE 5:703117a2acfb | |
1233 | ACTUAL 5:703117a2acfb |
|
1233 | ACTUAL 5:703117a2acfb | |
1234 | ==== |
|
1234 | ==== | |
1235 |
|
1235 | |||
1236 | $ cat >> .hg/hgrc <<EOF |
|
1236 | $ cat >> .hg/hgrc <<EOF | |
1237 | > [hooks] |
|
1237 | > [hooks] | |
1238 | > update.visibility = |
|
1238 | > update.visibility = | |
1239 | > EOF |
|
1239 | > EOF | |
1240 |
|
1240 | |||
1241 | $ sh $TESTTMP/checkvisibility.sh after-unshelving |
|
1241 | $ sh $TESTTMP/checkvisibility.sh after-unshelving | |
1242 | ==== after-unshelving: |
|
1242 | ==== after-unshelving: | |
1243 | VISIBLE 5:703117a2acfb |
|
1243 | VISIBLE 5:703117a2acfb | |
1244 | ACTUAL 5:703117a2acfb |
|
1244 | ACTUAL 5:703117a2acfb | |
1245 | ==== |
|
1245 | ==== | |
1246 |
|
1246 | |||
1247 | $ cd .. |
|
1247 | $ cd .. | |
1248 |
|
1248 | |||
1249 | test .orig files go where the user wants them to |
|
1249 | test .orig files go where the user wants them to | |
1250 | --------------------------------------------------------------- |
|
1250 | --------------------------------------------------------------- | |
1251 | $ hg init salvage |
|
1251 | $ hg init salvage | |
1252 | $ cd salvage |
|
1252 | $ cd salvage | |
1253 | $ echo 'content' > root |
|
1253 | $ echo 'content' > root | |
1254 | $ hg commit -A -m 'root' -q |
|
1254 | $ hg commit -A -m 'root' -q | |
1255 | $ echo '' > root |
|
1255 | $ echo '' > root | |
1256 | $ hg shelve -q |
|
1256 | $ hg shelve -q | |
1257 | $ echo 'contADDent' > root |
|
1257 | $ echo 'contADDent' > root | |
1258 | $ hg unshelve -q --config 'ui.origbackuppath=.hg/origbackups' |
|
1258 | $ hg unshelve -q --config 'ui.origbackuppath=.hg/origbackups' | |
1259 | warning: conflicts while merging root! (edit, then use 'hg resolve --mark') |
|
1259 | warning: conflicts while merging root! (edit, then use 'hg resolve --mark') | |
1260 | unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') |
|
1260 | unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') | |
1261 | [1] |
|
1261 | [1] | |
1262 | $ ls .hg/origbackups |
|
1262 | $ ls .hg/origbackups | |
1263 | root |
|
1263 | root | |
1264 | $ rm -rf .hg/origbackups |
|
1264 | $ rm -rf .hg/origbackups | |
1265 |
|
1265 | |||
1266 | test Abort unshelve always gets user out of the unshelved state |
|
1266 | test Abort unshelve always gets user out of the unshelved state | |
1267 | --------------------------------------------------------------- |
|
1267 | --------------------------------------------------------------- | |
1268 | Wreak havoc on the unshelve process |
|
1268 | Wreak havoc on the unshelve process | |
1269 | $ rm .hg/unshelverebasestate |
|
1269 | $ rm .hg/unshelverebasestate | |
1270 | $ hg unshelve --abort |
|
1270 | $ hg unshelve --abort | |
1271 | unshelve of 'default' aborted |
|
1271 | unshelve of 'default' aborted | |
1272 | abort: (No such file or directory|The system cannot find the file specified) (re) |
|
1272 | abort: (No such file or directory|The system cannot find the file specified) (re) | |
1273 | [255] |
|
1273 | [255] | |
1274 | Can the user leave the current state? |
|
1274 | Can the user leave the current state? | |
1275 | $ hg up -C . |
|
1275 | $ hg up -C . | |
1276 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1276 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1277 |
|
1277 | |||
1278 | Try again but with a corrupted shelve state file |
|
1278 | Try again but with a corrupted shelve state file | |
1279 | $ hg strip -r 2 -r 1 -q |
|
1279 | $ hg strip -r 2 -r 1 -q | |
1280 | $ hg up -r 0 -q |
|
1280 | $ hg up -r 0 -q | |
1281 | $ echo '' > root |
|
1281 | $ echo '' > root | |
1282 | $ hg shelve -q |
|
1282 | $ hg shelve -q | |
1283 | $ echo 'contADDent' > root |
|
1283 | $ echo 'contADDent' > root | |
1284 | $ hg unshelve -q |
|
1284 | $ hg unshelve -q | |
1285 | warning: conflicts while merging root! (edit, then use 'hg resolve --mark') |
|
1285 | warning: conflicts while merging root! (edit, then use 'hg resolve --mark') | |
1286 | unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') |
|
1286 | unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') | |
1287 | [1] |
|
1287 | [1] | |
1288 | $ sed 's/ae8c668541e8/123456789012/' .hg/shelvedstate > ../corrupt-shelvedstate |
|
1288 | $ sed 's/ae8c668541e8/123456789012/' .hg/shelvedstate > ../corrupt-shelvedstate | |
1289 | $ mv ../corrupt-shelvedstate .hg/histedit-state |
|
1289 | $ mv ../corrupt-shelvedstate .hg/histedit-state | |
1290 | $ hg unshelve --abort 2>&1 | grep 'rebase aborted' |
|
1290 | $ hg unshelve --abort 2>&1 | grep 'rebase aborted' | |
1291 | rebase aborted |
|
1291 | rebase aborted | |
1292 | $ hg up -C . |
|
1292 | $ hg up -C . | |
1293 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1293 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1294 |
|
1294 | |||
1295 | $ cd .. |
|
1295 | $ cd .. | |
1296 |
|
1296 | |||
1297 | Keep active bookmark while (un)shelving even on shared repo (issue4940) |
|
1297 | Keep active bookmark while (un)shelving even on shared repo (issue4940) | |
1298 | ----------------------------------------------------------------------- |
|
1298 | ----------------------------------------------------------------------- | |
1299 |
|
1299 | |||
1300 | $ cat <<EOF >> $HGRCPATH |
|
1300 | $ cat <<EOF >> $HGRCPATH | |
1301 | > [extensions] |
|
1301 | > [extensions] | |
1302 | > share = |
|
1302 | > share = | |
1303 | > EOF |
|
1303 | > EOF | |
1304 |
|
1304 | |||
1305 | $ hg bookmarks -R repo |
|
1305 | $ hg bookmarks -R repo | |
1306 | test 4:33f7f61e6c5e |
|
1306 | test 4:33f7f61e6c5e | |
1307 | $ hg share -B repo share |
|
1307 | $ hg share -B repo share | |
1308 | updating working directory |
|
1308 | updating working directory | |
1309 | 6 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1309 | 6 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1310 | $ cd share |
|
1310 | $ cd share | |
1311 |
|
1311 | |||
1312 | $ hg bookmarks |
|
1312 | $ hg bookmarks | |
1313 | test 4:33f7f61e6c5e |
|
1313 | test 4:33f7f61e6c5e | |
1314 | $ hg bookmarks foo |
|
1314 | $ hg bookmarks foo | |
1315 | $ hg bookmarks |
|
1315 | $ hg bookmarks | |
1316 | * foo 5:703117a2acfb |
|
1316 | * foo 5:703117a2acfb | |
1317 | test 4:33f7f61e6c5e |
|
1317 | test 4:33f7f61e6c5e | |
1318 | $ echo x >> x |
|
1318 | $ echo x >> x | |
1319 | $ hg shelve |
|
1319 | $ hg shelve | |
1320 | shelved as foo |
|
1320 | shelved as foo | |
1321 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1321 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1322 | $ hg bookmarks |
|
1322 | $ hg bookmarks | |
1323 | * foo 5:703117a2acfb |
|
1323 | * foo 5:703117a2acfb | |
1324 | test 4:33f7f61e6c5e |
|
1324 | test 4:33f7f61e6c5e | |
1325 |
|
1325 | |||
1326 | $ hg unshelve |
|
1326 | $ hg unshelve | |
1327 | unshelving change 'foo' |
|
1327 | unshelving change 'foo' | |
1328 | $ hg bookmarks |
|
1328 | $ hg bookmarks | |
1329 | * foo 5:703117a2acfb |
|
1329 | * foo 5:703117a2acfb | |
1330 | test 4:33f7f61e6c5e |
|
1330 | test 4:33f7f61e6c5e | |
1331 |
|
1331 | |||
1332 | $ cd .. |
|
1332 | $ cd .. | |
1333 |
|
1333 | |||
1334 | Shelve and unshelve unknown files. For the purposes of unshelve, a shelved |
|
1334 | Shelve and unshelve unknown files. For the purposes of unshelve, a shelved | |
1335 | unknown file is the same as a shelved added file, except that it will be in |
|
1335 | unknown file is the same as a shelved added file, except that it will be in | |
1336 | unknown state after unshelve if and only if it was either absent or unknown |
|
1336 | unknown state after unshelve if and only if it was either absent or unknown | |
1337 | before the unshelve operation. |
|
1337 | before the unshelve operation. | |
1338 |
|
1338 | |||
1339 | $ hg init unknowns |
|
1339 | $ hg init unknowns | |
1340 | $ cd unknowns |
|
1340 | $ cd unknowns | |
1341 |
|
1341 | |||
1342 | The simplest case is if I simply have an unknown file that I shelve and unshelve |
|
1342 | The simplest case is if I simply have an unknown file that I shelve and unshelve | |
1343 |
|
1343 | |||
1344 | $ echo unknown > unknown |
|
1344 | $ echo unknown > unknown | |
1345 | $ hg status |
|
1345 | $ hg status | |
1346 | ? unknown |
|
1346 | ? unknown | |
1347 | $ hg shelve --unknown |
|
1347 | $ hg shelve --unknown | |
1348 | shelved as default |
|
1348 | shelved as default | |
1349 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1349 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1350 | $ hg status |
|
1350 | $ hg status | |
1351 | $ hg unshelve |
|
1351 | $ hg unshelve | |
1352 | unshelving change 'default' |
|
1352 | unshelving change 'default' | |
1353 | $ hg status |
|
1353 | $ hg status | |
1354 | ? unknown |
|
1354 | ? unknown | |
1355 | $ rm unknown |
|
1355 | $ rm unknown | |
1356 |
|
1356 | |||
1357 | If I shelve, add the file, and unshelve, does it stay added? |
|
1357 | If I shelve, add the file, and unshelve, does it stay added? | |
1358 |
|
1358 | |||
1359 | $ echo unknown > unknown |
|
1359 | $ echo unknown > unknown | |
1360 | $ hg shelve -u |
|
1360 | $ hg shelve -u | |
1361 | shelved as default |
|
1361 | shelved as default | |
1362 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1362 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1363 | $ hg status |
|
1363 | $ hg status | |
1364 | $ touch unknown |
|
1364 | $ touch unknown | |
1365 | $ hg add unknown |
|
1365 | $ hg add unknown | |
1366 | $ hg status |
|
1366 | $ hg status | |
1367 | A unknown |
|
1367 | A unknown | |
1368 | $ hg unshelve |
|
1368 | $ hg unshelve | |
1369 | unshelving change 'default' |
|
1369 | unshelving change 'default' | |
1370 | temporarily committing pending changes (restore with 'hg unshelve --abort') |
|
1370 | temporarily committing pending changes (restore with 'hg unshelve --abort') | |
1371 | rebasing shelved changes |
|
1371 | rebasing shelved changes | |
1372 | rebasing 1:098df96e7410 "(changes in empty repository)" (tip) |
|
1372 | rebasing 1:098df96e7410 "(changes in empty repository)" (tip) | |
1373 | merging unknown |
|
1373 | merging unknown | |
1374 | $ hg status |
|
1374 | $ hg status | |
1375 | A unknown |
|
1375 | A unknown | |
1376 | $ hg forget unknown |
|
1376 | $ hg forget unknown | |
1377 | $ rm unknown |
|
1377 | $ rm unknown | |
1378 |
|
1378 | |||
1379 | And if I shelve, commit, then unshelve, does it become modified? |
|
1379 | And if I shelve, commit, then unshelve, does it become modified? | |
1380 |
|
1380 | |||
1381 | $ echo unknown > unknown |
|
1381 | $ echo unknown > unknown | |
1382 | $ hg shelve -u |
|
1382 | $ hg shelve -u | |
1383 | shelved as default |
|
1383 | shelved as default | |
1384 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1384 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1385 | $ hg status |
|
1385 | $ hg status | |
1386 | $ touch unknown |
|
1386 | $ touch unknown | |
1387 | $ hg add unknown |
|
1387 | $ hg add unknown | |
1388 | $ hg commit -qm "Add unknown" |
|
1388 | $ hg commit -qm "Add unknown" | |
1389 | $ hg status |
|
1389 | $ hg status | |
1390 | $ hg unshelve |
|
1390 | $ hg unshelve | |
1391 | unshelving change 'default' |
|
1391 | unshelving change 'default' | |
1392 | rebasing shelved changes |
|
1392 | rebasing shelved changes | |
1393 | rebasing 1:098df96e7410 "(changes in empty repository)" (tip) |
|
1393 | rebasing 1:098df96e7410 "(changes in empty repository)" (tip) | |
1394 | merging unknown |
|
1394 | merging unknown | |
1395 | $ hg status |
|
1395 | $ hg status | |
1396 | M unknown |
|
1396 | M unknown | |
1397 | $ hg remove --force unknown |
|
1397 | $ hg remove --force unknown | |
1398 | $ hg commit -qm "Remove unknown" |
|
1398 | $ hg commit -qm "Remove unknown" | |
1399 |
|
1399 | |||
1400 | $ cd .. |
|
1400 | $ cd .. | |
1401 |
|
1401 | |||
1402 | We expects that non-bare shelve keeps newly created branch in |
|
1402 | We expects that non-bare shelve keeps newly created branch in | |
1403 | working directory. |
|
1403 | working directory. | |
1404 |
|
1404 | |||
1405 | $ hg init shelve-preserve-new-branch |
|
1405 | $ hg init shelve-preserve-new-branch | |
1406 | $ cd shelve-preserve-new-branch |
|
1406 | $ cd shelve-preserve-new-branch | |
1407 | $ echo "a" >> a |
|
1407 | $ echo "a" >> a | |
1408 | $ hg add a |
|
1408 | $ hg add a | |
1409 | $ echo "b" >> b |
|
1409 | $ echo "b" >> b | |
1410 | $ hg add b |
|
1410 | $ hg add b | |
1411 | $ hg commit -m "ab" |
|
1411 | $ hg commit -m "ab" | |
1412 | $ echo "aa" >> a |
|
1412 | $ echo "aa" >> a | |
1413 | $ echo "bb" >> b |
|
1413 | $ echo "bb" >> b | |
1414 | $ hg branch new-branch |
|
1414 | $ hg branch new-branch | |
1415 | marked working directory as branch new-branch |
|
1415 | marked working directory as branch new-branch | |
1416 | (branches are permanent and global, did you want a bookmark?) |
|
1416 | (branches are permanent and global, did you want a bookmark?) | |
1417 | $ hg status |
|
1417 | $ hg status | |
1418 | M a |
|
1418 | M a | |
1419 | M b |
|
1419 | M b | |
1420 | $ hg branch |
|
1420 | $ hg branch | |
1421 | new-branch |
|
1421 | new-branch | |
1422 | $ hg shelve a |
|
1422 | $ hg shelve a | |
1423 | shelved as default |
|
1423 | shelved as default | |
1424 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1424 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1425 | $ hg branch |
|
1425 | $ hg branch | |
1426 | new-branch |
|
1426 | new-branch | |
1427 | $ hg status |
|
1427 | $ hg status | |
1428 | M b |
|
1428 | M b | |
1429 | $ touch "c" >> c |
|
1429 | $ touch "c" >> c | |
1430 | $ hg add c |
|
1430 | $ hg add c | |
1431 | $ hg status |
|
1431 | $ hg status | |
1432 | M b |
|
1432 | M b | |
1433 | A c |
|
1433 | A c | |
1434 | $ hg shelve --exclude c |
|
1434 | $ hg shelve --exclude c | |
1435 | shelved as default-01 |
|
1435 | shelved as default-01 | |
1436 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1436 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1437 | $ hg branch |
|
1437 | $ hg branch | |
1438 | new-branch |
|
1438 | new-branch | |
1439 | $ hg status |
|
1439 | $ hg status | |
1440 | A c |
|
1440 | A c | |
1441 | $ hg shelve --include c |
|
1441 | $ hg shelve --include c | |
1442 | shelved as default-02 |
|
1442 | shelved as default-02 | |
1443 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1443 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1444 | $ hg branch |
|
1444 | $ hg branch | |
1445 | new-branch |
|
1445 | new-branch | |
1446 | $ hg status |
|
1446 | $ hg status | |
1447 | $ echo "d" >> d |
|
1447 | $ echo "d" >> d | |
1448 | $ hg add d |
|
1448 | $ hg add d | |
1449 | $ hg status |
|
1449 | $ hg status | |
1450 | A d |
|
1450 | A d | |
1451 |
|
1451 | |||
1452 | We expect that bare-shelve will not keep branch in current working directory. |
|
1452 | We expect that bare-shelve will not keep branch in current working directory. | |
1453 |
|
1453 | |||
1454 | $ hg shelve |
|
1454 | $ hg shelve | |
1455 | shelved as default-03 |
|
1455 | shelved as default-03 | |
1456 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1456 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1457 | $ hg branch |
|
1457 | $ hg branch | |
1458 | default |
|
1458 | default | |
1459 | $ cd .. |
|
1459 | $ cd .. | |
1460 |
|
1460 | |||
1461 | When i shelve commit on newly created branch i expect |
|
1461 | When i shelve commit on newly created branch i expect | |
1462 | that after unshelve newly created branch will be preserved. |
|
1462 | that after unshelve newly created branch will be preserved. | |
1463 |
|
1463 | |||
1464 | $ hg init shelve_on_new_branch_simple |
|
1464 | $ hg init shelve_on_new_branch_simple | |
1465 | $ cd shelve_on_new_branch_simple |
|
1465 | $ cd shelve_on_new_branch_simple | |
1466 | $ echo "aaa" >> a |
|
1466 | $ echo "aaa" >> a | |
1467 | $ hg commit -A -m "a" |
|
1467 | $ hg commit -A -m "a" | |
1468 | adding a |
|
1468 | adding a | |
1469 | $ hg branch |
|
1469 | $ hg branch | |
1470 | default |
|
1470 | default | |
1471 | $ hg branch test |
|
1471 | $ hg branch test | |
1472 | marked working directory as branch test |
|
1472 | marked working directory as branch test | |
1473 | (branches are permanent and global, did you want a bookmark?) |
|
1473 | (branches are permanent and global, did you want a bookmark?) | |
1474 | $ echo "bbb" >> a |
|
1474 | $ echo "bbb" >> a | |
1475 | $ hg status |
|
1475 | $ hg status | |
1476 | M a |
|
1476 | M a | |
1477 | $ hg shelve |
|
1477 | $ hg shelve | |
1478 | shelved as default |
|
1478 | shelved as default | |
1479 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1479 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1480 | $ hg branch |
|
1480 | $ hg branch | |
1481 | default |
|
1481 | default | |
1482 | $ echo "bbb" >> b |
|
1482 | $ echo "bbb" >> b | |
1483 | $ hg status |
|
1483 | $ hg status | |
1484 | ? b |
|
1484 | ? b | |
1485 | $ hg unshelve |
|
1485 | $ hg unshelve | |
1486 | unshelving change 'default' |
|
1486 | unshelving change 'default' | |
1487 | marked working directory as branch test |
|
1487 | marked working directory as branch test | |
1488 | $ hg status |
|
1488 | $ hg status | |
1489 | M a |
|
1489 | M a | |
1490 | ? b |
|
1490 | ? b | |
1491 | $ hg branch |
|
1491 | $ hg branch | |
1492 | test |
|
1492 | test | |
1493 | $ cd .. |
|
1493 | $ cd .. | |
1494 |
|
1494 | |||
1495 | When i shelve commit on newly created branch, make |
|
1495 | When i shelve commit on newly created branch, make | |
1496 | some changes, unshelve it and running into merge |
|
1496 | some changes, unshelve it and running into merge | |
1497 | conflicts i expect that after fixing them and |
|
1497 | conflicts i expect that after fixing them and | |
1498 | running unshelve --continue newly created branch |
|
1498 | running unshelve --continue newly created branch | |
1499 | will be preserved. |
|
1499 | will be preserved. | |
1500 |
|
1500 | |||
1501 | $ hg init shelve_on_new_branch_conflict |
|
1501 | $ hg init shelve_on_new_branch_conflict | |
1502 | $ cd shelve_on_new_branch_conflict |
|
1502 | $ cd shelve_on_new_branch_conflict | |
1503 | $ echo "aaa" >> a |
|
1503 | $ echo "aaa" >> a | |
1504 | $ hg commit -A -m "a" |
|
1504 | $ hg commit -A -m "a" | |
1505 | adding a |
|
1505 | adding a | |
1506 | $ hg branch |
|
1506 | $ hg branch | |
1507 | default |
|
1507 | default | |
1508 | $ hg branch test |
|
1508 | $ hg branch test | |
1509 | marked working directory as branch test |
|
1509 | marked working directory as branch test | |
1510 | (branches are permanent and global, did you want a bookmark?) |
|
1510 | (branches are permanent and global, did you want a bookmark?) | |
1511 | $ echo "bbb" >> a |
|
1511 | $ echo "bbb" >> a | |
1512 | $ hg status |
|
1512 | $ hg status | |
1513 | M a |
|
1513 | M a | |
1514 | $ hg shelve |
|
1514 | $ hg shelve | |
1515 | shelved as default |
|
1515 | shelved as default | |
1516 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1516 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1517 | $ hg branch |
|
1517 | $ hg branch | |
1518 | default |
|
1518 | default | |
1519 | $ echo "ccc" >> a |
|
1519 | $ echo "ccc" >> a | |
1520 | $ hg status |
|
1520 | $ hg status | |
1521 | M a |
|
1521 | M a | |
1522 | $ hg unshelve |
|
1522 | $ hg unshelve | |
1523 | unshelving change 'default' |
|
1523 | unshelving change 'default' | |
1524 | temporarily committing pending changes (restore with 'hg unshelve --abort') |
|
1524 | temporarily committing pending changes (restore with 'hg unshelve --abort') | |
1525 | rebasing shelved changes |
|
1525 | rebasing shelved changes | |
1526 | rebasing 2:425c97ef07f3 "changes to: a" (tip) |
|
1526 | rebasing 2:425c97ef07f3 "changes to: a" (tip) | |
1527 | merging a |
|
1527 | merging a | |
1528 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
|
1528 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | |
1529 | unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') |
|
1529 | unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') | |
1530 | [1] |
|
1530 | [1] | |
1531 | $ echo "aaabbbccc" > a |
|
1531 | $ echo "aaabbbccc" > a | |
1532 | $ rm a.orig |
|
1532 | $ rm a.orig | |
1533 | $ hg resolve --mark a |
|
1533 | $ hg resolve --mark a | |
1534 | (no more unresolved files) |
|
1534 | (no more unresolved files) | |
1535 | continue: hg unshelve --continue |
|
1535 | continue: hg unshelve --continue | |
1536 | $ hg unshelve --continue |
|
1536 | $ hg unshelve --continue | |
1537 | rebasing 2:425c97ef07f3 "changes to: a" (tip) |
|
1537 | rebasing 2:425c97ef07f3 "changes to: a" (tip) | |
1538 | marked working directory as branch test |
|
1538 | marked working directory as branch test | |
1539 | unshelve of 'default' complete |
|
1539 | unshelve of 'default' complete | |
1540 | $ cat a |
|
1540 | $ cat a | |
1541 | aaabbbccc |
|
1541 | aaabbbccc | |
1542 | $ hg status |
|
1542 | $ hg status | |
1543 | M a |
|
1543 | M a | |
1544 | $ hg branch |
|
1544 | $ hg branch | |
1545 | test |
|
1545 | test | |
1546 | $ hg commit -m "test-commit" |
|
1546 | $ hg commit -m "test-commit" | |
1547 |
|
1547 | |||
1548 | When i shelve on test branch, update to default branch |
|
1548 | When i shelve on test branch, update to default branch | |
1549 | and unshelve i expect that it will not preserve previous |
|
1549 | and unshelve i expect that it will not preserve previous | |
1550 | test branch. |
|
1550 | test branch. | |
1551 |
|
1551 | |||
1552 | $ echo "xxx" > b |
|
1552 | $ echo "xxx" > b | |
1553 | $ hg add b |
|
1553 | $ hg add b | |
1554 | $ hg shelve |
|
1554 | $ hg shelve | |
1555 | shelved as test |
|
1555 | shelved as test | |
1556 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1556 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1557 | $ hg update -r default |
|
1557 | $ hg update -r default | |
1558 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1558 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1559 | $ hg unshelve |
|
1559 | $ hg unshelve | |
1560 | unshelving change 'test' |
|
1560 | unshelving change 'test' | |
1561 | rebasing shelved changes |
|
1561 | rebasing shelved changes | |
1562 | rebasing 2:357525f34729 "changes to: test-commit" (tip) |
|
1562 | rebasing 2:357525f34729 "changes to: test-commit" (tip) | |
1563 | $ hg status |
|
1563 | $ hg status | |
1564 | A b |
|
1564 | A b | |
1565 | $ hg branch |
|
1565 | $ hg branch | |
1566 | default |
|
1566 | default | |
1567 | $ cd .. |
|
1567 | $ cd .. | |
1568 |
|
1568 | |||
1569 | When i unshelve resulting in merge conflicts and makes saved |
|
1569 | When i unshelve resulting in merge conflicts and makes saved | |
1570 | file shelvedstate looks like in previous versions in |
|
1570 | file shelvedstate looks like in previous versions in | |
1571 | mercurial(without restore branch information in 7th line) i |
|
1571 | mercurial(without restore branch information in 7th line) i | |
1572 | expect that after resolving conflicts and successfully |
|
1572 | expect that after resolving conflicts and successfully | |
1573 | running 'shelve --continue' the branch information won't be |
|
1573 | running 'shelve --continue' the branch information won't be | |
1574 | restored and branch will be unchanged. |
|
1574 | restored and branch will be unchanged. | |
1575 |
|
1575 | |||
1576 | shelve on new branch, conflict with previous shelvedstate |
|
1576 | shelve on new branch, conflict with previous shelvedstate | |
1577 |
|
1577 | |||
1578 | $ hg init conflict |
|
1578 | $ hg init conflict | |
1579 | $ cd conflict |
|
1579 | $ cd conflict | |
1580 | $ echo "aaa" >> a |
|
1580 | $ echo "aaa" >> a | |
1581 | $ hg commit -A -m "a" |
|
1581 | $ hg commit -A -m "a" | |
1582 | adding a |
|
1582 | adding a | |
1583 | $ hg branch |
|
1583 | $ hg branch | |
1584 | default |
|
1584 | default | |
1585 | $ hg branch test |
|
1585 | $ hg branch test | |
1586 | marked working directory as branch test |
|
1586 | marked working directory as branch test | |
1587 | (branches are permanent and global, did you want a bookmark?) |
|
1587 | (branches are permanent and global, did you want a bookmark?) | |
1588 | $ echo "bbb" >> a |
|
1588 | $ echo "bbb" >> a | |
1589 | $ hg status |
|
1589 | $ hg status | |
1590 | M a |
|
1590 | M a | |
1591 | $ hg shelve |
|
1591 | $ hg shelve | |
1592 | shelved as default |
|
1592 | shelved as default | |
1593 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1593 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1594 | $ hg branch |
|
1594 | $ hg branch | |
1595 | default |
|
1595 | default | |
1596 | $ echo "ccc" >> a |
|
1596 | $ echo "ccc" >> a | |
1597 | $ hg status |
|
1597 | $ hg status | |
1598 | M a |
|
1598 | M a | |
1599 | $ hg unshelve |
|
1599 | $ hg unshelve | |
1600 | unshelving change 'default' |
|
1600 | unshelving change 'default' | |
1601 | temporarily committing pending changes (restore with 'hg unshelve --abort') |
|
1601 | temporarily committing pending changes (restore with 'hg unshelve --abort') | |
1602 | rebasing shelved changes |
|
1602 | rebasing shelved changes | |
1603 | rebasing 2:425c97ef07f3 "changes to: a" (tip) |
|
1603 | rebasing 2:425c97ef07f3 "changes to: a" (tip) | |
1604 | merging a |
|
1604 | merging a | |
1605 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
|
1605 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | |
1606 | unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') |
|
1606 | unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') | |
1607 | [1] |
|
1607 | [1] | |
1608 |
|
1608 | |||
1609 | Removing restore branch information from shelvedstate file(making it looks like |
|
1609 | Removing restore branch information from shelvedstate file(making it looks like | |
1610 | in previous versions) and running unshelve --continue |
|
1610 | in previous versions) and running unshelve --continue | |
1611 |
|
1611 | |||
1612 | $ cp .hg/shelvedstate .hg/shelvedstate_old |
|
1612 | $ cp .hg/shelvedstate .hg/shelvedstate_old | |
1613 | $ cat .hg/shelvedstate_old | grep -v 'branchtorestore' > .hg/shelvedstate |
|
1613 | $ cat .hg/shelvedstate_old | grep -v 'branchtorestore' > .hg/shelvedstate | |
1614 |
|
1614 | |||
1615 | $ echo "aaabbbccc" > a |
|
1615 | $ echo "aaabbbccc" > a | |
1616 | $ rm a.orig |
|
1616 | $ rm a.orig | |
1617 | $ hg resolve --mark a |
|
1617 | $ hg resolve --mark a | |
1618 | (no more unresolved files) |
|
1618 | (no more unresolved files) | |
1619 | continue: hg unshelve --continue |
|
1619 | continue: hg unshelve --continue | |
1620 | $ hg unshelve --continue |
|
1620 | $ hg unshelve --continue | |
1621 | rebasing 2:425c97ef07f3 "changes to: a" (tip) |
|
1621 | rebasing 2:425c97ef07f3 "changes to: a" (tip) | |
1622 | unshelve of 'default' complete |
|
1622 | unshelve of 'default' complete | |
1623 | $ cat a |
|
1623 | $ cat a | |
1624 | aaabbbccc |
|
1624 | aaabbbccc | |
1625 | $ hg status |
|
1625 | $ hg status | |
1626 | M a |
|
1626 | M a | |
1627 | $ hg branch |
|
1627 | $ hg branch | |
1628 | default |
|
1628 | default | |
1629 | $ cd .. |
|
1629 | $ cd .. | |
1630 |
|
1630 | |||
1631 | On non bare shelve the branch information shouldn't be restored |
|
1631 | On non bare shelve the branch information shouldn't be restored | |
1632 |
|
1632 | |||
1633 | $ hg init bare_shelve_on_new_branch |
|
1633 | $ hg init bare_shelve_on_new_branch | |
1634 | $ cd bare_shelve_on_new_branch |
|
1634 | $ cd bare_shelve_on_new_branch | |
1635 | $ echo "aaa" >> a |
|
1635 | $ echo "aaa" >> a | |
1636 | $ hg commit -A -m "a" |
|
1636 | $ hg commit -A -m "a" | |
1637 | adding a |
|
1637 | adding a | |
1638 | $ hg branch |
|
1638 | $ hg branch | |
1639 | default |
|
1639 | default | |
1640 | $ hg branch test |
|
1640 | $ hg branch test | |
1641 | marked working directory as branch test |
|
1641 | marked working directory as branch test | |
1642 | (branches are permanent and global, did you want a bookmark?) |
|
1642 | (branches are permanent and global, did you want a bookmark?) | |
1643 | $ echo "bbb" >> a |
|
1643 | $ echo "bbb" >> a | |
1644 | $ hg status |
|
1644 | $ hg status | |
1645 | M a |
|
1645 | M a | |
1646 | $ hg shelve a |
|
1646 | $ hg shelve a | |
1647 | shelved as default |
|
1647 | shelved as default | |
1648 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1648 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1649 | $ hg branch |
|
1649 | $ hg branch | |
1650 | test |
|
1650 | test | |
1651 | $ hg branch default |
|
1651 | $ hg branch default | |
1652 | marked working directory as branch default |
|
1652 | marked working directory as branch default | |
1653 | (branches are permanent and global, did you want a bookmark?) |
|
1653 | (branches are permanent and global, did you want a bookmark?) | |
1654 | $ echo "bbb" >> b |
|
1654 | $ echo "bbb" >> b | |
1655 | $ hg status |
|
1655 | $ hg status | |
1656 | ? b |
|
1656 | ? b | |
1657 | $ hg unshelve |
|
1657 | $ hg unshelve | |
1658 | unshelving change 'default' |
|
1658 | unshelving change 'default' | |
1659 | $ hg status |
|
1659 | $ hg status | |
1660 | M a |
|
1660 | M a | |
1661 | ? b |
|
1661 | ? b | |
1662 | $ hg branch |
|
1662 | $ hg branch | |
1663 | default |
|
1663 | default | |
1664 | $ cd .. |
|
1664 | $ cd .. | |
1665 |
|
1665 | |||
1666 | Prepare unshelve with a corrupted shelvedstate |
|
1666 | Prepare unshelve with a corrupted shelvedstate | |
1667 | $ hg init r1 && cd r1 |
|
1667 | $ hg init r1 && cd r1 | |
1668 | $ echo text1 > file && hg add file |
|
1668 | $ echo text1 > file && hg add file | |
1669 | $ hg shelve |
|
1669 | $ hg shelve | |
1670 | shelved as default |
|
1670 | shelved as default | |
1671 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1671 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1672 | $ echo text2 > file && hg ci -Am text1 |
|
1672 | $ echo text2 > file && hg ci -Am text1 | |
1673 | adding file |
|
1673 | adding file | |
1674 | $ hg unshelve |
|
1674 | $ hg unshelve | |
1675 | unshelving change 'default' |
|
1675 | unshelving change 'default' | |
1676 | rebasing shelved changes |
|
1676 | rebasing shelved changes | |
1677 | rebasing 1:396ea74229f9 "(changes in empty repository)" (tip) |
|
1677 | rebasing 1:396ea74229f9 "(changes in empty repository)" (tip) | |
1678 | merging file |
|
1678 | merging file | |
1679 | warning: conflicts while merging file! (edit, then use 'hg resolve --mark') |
|
1679 | warning: conflicts while merging file! (edit, then use 'hg resolve --mark') | |
1680 | unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') |
|
1680 | unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') | |
1681 | [1] |
|
1681 | [1] | |
1682 | $ echo somethingsomething > .hg/shelvedstate |
|
1682 | $ echo somethingsomething > .hg/shelvedstate | |
1683 |
|
1683 | |||
1684 | Unshelve --continue fails with appropriate message if shelvedstate is corrupted |
|
1684 | Unshelve --continue fails with appropriate message if shelvedstate is corrupted | |
1685 | $ hg unshelve --continue |
|
1685 | $ hg unshelve --continue | |
1686 | abort: corrupted shelved state file |
|
1686 | abort: corrupted shelved state file | |
1687 | (please run hg unshelve --abort to abort unshelve operation) |
|
1687 | (please run hg unshelve --abort to abort unshelve operation) | |
1688 | [255] |
|
1688 | [255] | |
1689 |
|
1689 | |||
1690 | Unshelve --abort works with a corrupted shelvedstate |
|
1690 | Unshelve --abort works with a corrupted shelvedstate | |
1691 | $ hg unshelve --abort |
|
1691 | $ hg unshelve --abort | |
1692 | could not read shelved state file, your working copy may be in an unexpected state |
|
1692 | could not read shelved state file, your working copy may be in an unexpected state | |
1693 | please update to some commit |
|
1693 | please update to some commit | |
1694 |
|
1694 | |||
1695 | Unshelve --abort fails with appropriate message if there's no unshelve in |
|
1695 | Unshelve --abort fails with appropriate message if there's no unshelve in | |
1696 | progress |
|
1696 | progress | |
1697 | $ hg unshelve --abort |
|
1697 | $ hg unshelve --abort | |
1698 | abort: no unshelve in progress |
|
1698 | abort: no unshelve in progress | |
1699 | [255] |
|
1699 | [255] | |
1700 | $ cd .. |
|
1700 | $ cd .. | |
1701 |
|
1701 | |||
1702 | Unshelve respects --keep even if user intervention is needed |
|
1702 | Unshelve respects --keep even if user intervention is needed | |
1703 | $ hg init unshelvekeep && cd unshelvekeep |
|
1703 | $ hg init unshelvekeep && cd unshelvekeep | |
1704 | $ echo 1 > file && hg ci -Am 1 |
|
1704 | $ echo 1 > file && hg ci -Am 1 | |
1705 | adding file |
|
1705 | adding file | |
1706 | $ echo 2 >> file |
|
1706 | $ echo 2 >> file | |
1707 | $ hg shelve |
|
1707 | $ hg shelve | |
1708 | shelved as default |
|
1708 | shelved as default | |
1709 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1709 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1710 | $ echo 3 >> file && hg ci -Am 13 |
|
1710 | $ echo 3 >> file && hg ci -Am 13 | |
1711 | $ hg shelve --list |
|
1711 | $ hg shelve --list | |
1712 | default (*s ago) changes to: 1 (glob) |
|
1712 | default (*s ago) changes to: 1 (glob) | |
1713 | $ hg unshelve --keep |
|
1713 | $ hg unshelve --keep | |
1714 | unshelving change 'default' |
|
1714 | unshelving change 'default' | |
1715 | rebasing shelved changes |
|
1715 | rebasing shelved changes | |
1716 | rebasing 2:3fbe6fbb0bef "changes to: 1" (tip) |
|
1716 | rebasing 2:3fbe6fbb0bef "changes to: 1" (tip) | |
1717 | merging file |
|
1717 | merging file | |
1718 | warning: conflicts while merging file! (edit, then use 'hg resolve --mark') |
|
1718 | warning: conflicts while merging file! (edit, then use 'hg resolve --mark') | |
1719 | unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') |
|
1719 | unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') | |
1720 | [1] |
|
1720 | [1] | |
1721 | $ hg resolve --mark file |
|
1721 | $ hg resolve --mark file | |
1722 | (no more unresolved files) |
|
1722 | (no more unresolved files) | |
1723 | continue: hg unshelve --continue |
|
1723 | continue: hg unshelve --continue | |
1724 | $ hg unshelve --continue |
|
1724 | $ hg unshelve --continue | |
1725 | rebasing 2:3fbe6fbb0bef "changes to: 1" (tip) |
|
1725 | rebasing 2:3fbe6fbb0bef "changes to: 1" (tip) | |
1726 | unshelve of 'default' complete |
|
1726 | unshelve of 'default' complete | |
1727 | $ hg shelve --list |
|
1727 | $ hg shelve --list | |
1728 | default (*s ago) changes to: 1 (glob) |
|
1728 | default (*s ago) changes to: 1 (glob) | |
1729 | $ cd .. |
|
1729 | $ cd .. | |
1730 |
|
1730 | |||
1731 | Unshelving when there are deleted files does not crash (issue4176) |
|
1731 | Unshelving when there are deleted files does not crash (issue4176) | |
1732 | $ hg init unshelve-deleted-file && cd unshelve-deleted-file |
|
1732 | $ hg init unshelve-deleted-file && cd unshelve-deleted-file | |
1733 | $ echo a > a && echo b > b && hg ci -Am ab |
|
1733 | $ echo a > a && echo b > b && hg ci -Am ab | |
1734 | adding a |
|
1734 | adding a | |
1735 | adding b |
|
1735 | adding b | |
1736 | $ echo aa > a && hg shelve |
|
1736 | $ echo aa > a && hg shelve | |
1737 | shelved as default |
|
1737 | shelved as default | |
1738 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1738 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1739 | $ rm b |
|
1739 | $ rm b | |
1740 | $ hg st |
|
1740 | $ hg st | |
1741 | ! b |
|
1741 | ! b | |
1742 | $ hg unshelve |
|
1742 | $ hg unshelve | |
1743 | unshelving change 'default' |
|
1743 | unshelving change 'default' | |
1744 | $ hg shelve |
|
1744 | $ hg shelve | |
1745 | shelved as default |
|
1745 | shelved as default | |
1746 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1746 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1747 | $ rm a && echo b > b |
|
1747 | $ rm a && echo b > b | |
1748 | $ hg st |
|
1748 | $ hg st | |
1749 | ! a |
|
1749 | ! a | |
1750 | $ hg unshelve |
|
1750 | $ hg unshelve | |
1751 | unshelving change 'default' |
|
1751 | unshelving change 'default' | |
1752 | abort: shelved change touches missing files |
|
1752 | abort: shelved change touches missing files | |
1753 | (run hg status to see which files are missing) |
|
1753 | (run hg status to see which files are missing) | |
1754 | [255] |
|
1754 | [255] | |
1755 | $ hg st |
|
1755 | $ hg st | |
1756 | ! a |
|
1756 | ! a | |
1757 | $ cd .. |
|
1757 | $ cd .. | |
1758 |
|
1758 | |||
1759 | New versions of Mercurial know how to read onld shelvedstate files |
|
1759 | New versions of Mercurial know how to read onld shelvedstate files | |
1760 | $ hg init oldshelvedstate |
|
1760 | $ hg init oldshelvedstate | |
1761 | $ cd oldshelvedstate |
|
1761 | $ cd oldshelvedstate | |
1762 | $ echo root > root && hg ci -Am root |
|
1762 | $ echo root > root && hg ci -Am root | |
1763 | adding root |
|
1763 | adding root | |
1764 | $ echo 1 > a |
|
1764 | $ echo 1 > a | |
1765 | $ hg add a |
|
1765 | $ hg add a | |
1766 | $ hg shelve --name ashelve |
|
1766 | $ hg shelve --name ashelve | |
1767 | shelved as ashelve |
|
1767 | shelved as ashelve | |
1768 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1768 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1769 | $ echo 2 > a |
|
1769 | $ echo 2 > a | |
1770 | $ hg ci -Am a |
|
1770 | $ hg ci -Am a | |
1771 | adding a |
|
1771 | adding a | |
1772 | $ hg unshelve |
|
1772 | $ hg unshelve | |
1773 | unshelving change 'ashelve' |
|
1773 | unshelving change 'ashelve' | |
1774 | rebasing shelved changes |
|
1774 | rebasing shelved changes | |
1775 | rebasing 2:003d2d94241c "changes to: root" (tip) |
|
1775 | rebasing 2:003d2d94241c "changes to: root" (tip) | |
1776 | merging a |
|
1776 | merging a | |
1777 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
|
1777 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | |
1778 | unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') |
|
1778 | unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') | |
1779 | [1] |
|
1779 | [1] | |
1780 | putting v1 shelvedstate file in place of a created v2 |
|
1780 | putting v1 shelvedstate file in place of a created v2 | |
1781 | $ cat << EOF > .hg/shelvedstate |
|
1781 | $ cat << EOF > .hg/shelvedstate | |
1782 | > 1 |
|
1782 | > 1 | |
1783 | > ashelve |
|
1783 | > ashelve | |
1784 | > 8b058dae057a5a78f393f4535d9e363dd5efac9d |
|
1784 | > 8b058dae057a5a78f393f4535d9e363dd5efac9d | |
1785 | > 8b058dae057a5a78f393f4535d9e363dd5efac9d |
|
1785 | > 8b058dae057a5a78f393f4535d9e363dd5efac9d | |
1786 | > 8b058dae057a5a78f393f4535d9e363dd5efac9d 003d2d94241cc7aff0c3a148e966d6a4a377f3a7 |
|
1786 | > 8b058dae057a5a78f393f4535d9e363dd5efac9d 003d2d94241cc7aff0c3a148e966d6a4a377f3a7 | |
1787 | > 003d2d94241cc7aff0c3a148e966d6a4a377f3a7 |
|
1787 | > 003d2d94241cc7aff0c3a148e966d6a4a377f3a7 | |
1788 | > |
|
1788 | > | |
1789 | > nokeep |
|
1789 | > nokeep | |
1790 | > :no-active-bookmark |
|
1790 | > :no-active-bookmark | |
1791 | > EOF |
|
1791 | > EOF | |
1792 | $ echo 1 > a |
|
1792 | $ echo 1 > a | |
1793 | $ hg resolve --mark a |
|
1793 | $ hg resolve --mark a | |
1794 | (no more unresolved files) |
|
1794 | (no more unresolved files) | |
1795 | continue: hg unshelve --continue |
|
1795 | continue: hg unshelve --continue | |
1796 | mercurial does not crash |
|
1796 | mercurial does not crash | |
1797 | $ hg unshelve --continue |
|
1797 | $ hg unshelve --continue | |
1798 | rebasing 2:003d2d94241c "changes to: root" (tip) |
|
1798 | rebasing 2:003d2d94241c "changes to: root" (tip) | |
1799 | unshelve of 'ashelve' complete |
|
1799 | unshelve of 'ashelve' complete | |
1800 | $ cd .. |
|
1800 | $ cd .. | |
1801 |
|
1801 |
General Comments 0
You need to be logged in to leave comments.
Login now