Show More
@@ -1,547 +1,547 b'' | |||||
1 | $ echo "[extensions]" >> $HGRCPATH |
|
1 | $ echo "[extensions]" >> $HGRCPATH | |
2 | $ echo "mq=" >> $HGRCPATH |
|
2 | $ echo "mq=" >> $HGRCPATH | |
3 | $ echo "[diff]" >> $HGRCPATH |
|
3 | $ echo "[diff]" >> $HGRCPATH | |
4 | $ echo "nodates=1" >> $HGRCPATH |
|
4 | $ echo "nodates=1" >> $HGRCPATH | |
5 |
|
5 | |||
6 | $ hg init a |
|
6 | $ hg init a | |
7 | $ cd a |
|
7 | $ cd a | |
8 |
|
8 | |||
9 | $ mkdir 1 2 |
|
9 | $ mkdir 1 2 | |
10 | $ echo 'base' > 1/base |
|
10 | $ echo 'base' > 1/base | |
11 | $ echo 'base' > 2/base |
|
11 | $ echo 'base' > 2/base | |
12 | $ hg ci -Ambase |
|
12 | $ hg ci -Ambase | |
13 | adding 1/base |
|
13 | adding 1/base | |
14 | adding 2/base |
|
14 | adding 2/base | |
15 |
|
15 | |||
16 | $ hg qnew -mmqbase mqbase |
|
16 | $ hg qnew -mmqbase mqbase | |
17 |
|
17 | |||
18 | $ echo 'patched' > 1/base |
|
18 | $ echo 'patched' > 1/base | |
19 | $ echo 'patched' > 2/base |
|
19 | $ echo 'patched' > 2/base | |
20 | $ hg qrefresh |
|
20 | $ hg qrefresh | |
21 |
|
21 | |||
22 | $ hg qdiff |
|
22 | $ hg qdiff | |
23 | diff -r e7af5904b465 1/base |
|
23 | diff -r e7af5904b465 1/base | |
24 | --- a/1/base |
|
24 | --- a/1/base | |
25 | +++ b/1/base |
|
25 | +++ b/1/base | |
26 | @@ -1,1 +1,1 @@ |
|
26 | @@ -1,1 +1,1 @@ | |
27 | -base |
|
27 | -base | |
28 | +patched |
|
28 | +patched | |
29 | diff -r e7af5904b465 2/base |
|
29 | diff -r e7af5904b465 2/base | |
30 | --- a/2/base |
|
30 | --- a/2/base | |
31 | +++ b/2/base |
|
31 | +++ b/2/base | |
32 | @@ -1,1 +1,1 @@ |
|
32 | @@ -1,1 +1,1 @@ | |
33 | -base |
|
33 | -base | |
34 | +patched |
|
34 | +patched | |
35 |
|
35 | |||
36 | $ hg qdiff . |
|
36 | $ hg qdiff . | |
37 | diff -r e7af5904b465 1/base |
|
37 | diff -r e7af5904b465 1/base | |
38 | --- a/1/base |
|
38 | --- a/1/base | |
39 | +++ b/1/base |
|
39 | +++ b/1/base | |
40 | @@ -1,1 +1,1 @@ |
|
40 | @@ -1,1 +1,1 @@ | |
41 | -base |
|
41 | -base | |
42 | +patched |
|
42 | +patched | |
43 | diff -r e7af5904b465 2/base |
|
43 | diff -r e7af5904b465 2/base | |
44 | --- a/2/base |
|
44 | --- a/2/base | |
45 | +++ b/2/base |
|
45 | +++ b/2/base | |
46 | @@ -1,1 +1,1 @@ |
|
46 | @@ -1,1 +1,1 @@ | |
47 | -base |
|
47 | -base | |
48 | +patched |
|
48 | +patched | |
49 |
|
49 | |||
50 | $ cat .hg/patches/mqbase |
|
50 | $ cat .hg/patches/mqbase | |
51 | # HG changeset patch |
|
51 | # HG changeset patch | |
52 | # Parent e7af5904b465cd1f4f3cf6b26fe14e8db6f63eaa |
|
52 | # Parent e7af5904b465cd1f4f3cf6b26fe14e8db6f63eaa | |
53 | mqbase |
|
53 | mqbase | |
54 |
|
54 | |||
55 | diff -r e7af5904b465 1/base |
|
55 | diff -r e7af5904b465 1/base | |
56 | --- a/1/base |
|
56 | --- a/1/base | |
57 | +++ b/1/base |
|
57 | +++ b/1/base | |
58 | @@ -1,1 +1,1 @@ |
|
58 | @@ -1,1 +1,1 @@ | |
59 | -base |
|
59 | -base | |
60 | +patched |
|
60 | +patched | |
61 | diff -r e7af5904b465 2/base |
|
61 | diff -r e7af5904b465 2/base | |
62 | --- a/2/base |
|
62 | --- a/2/base | |
63 | +++ b/2/base |
|
63 | +++ b/2/base | |
64 | @@ -1,1 +1,1 @@ |
|
64 | @@ -1,1 +1,1 @@ | |
65 | -base |
|
65 | -base | |
66 | +patched |
|
66 | +patched | |
67 |
|
67 | |||
68 | $ echo 'patched again' > base |
|
68 | $ echo 'patched again' > base | |
69 | $ hg qrefresh 1 |
|
69 | $ hg qrefresh 1 | |
70 |
|
70 | |||
71 | $ hg qdiff |
|
71 | $ hg qdiff | |
72 | diff -r e7af5904b465 1/base |
|
72 | diff -r e7af5904b465 1/base | |
73 | --- a/1/base |
|
73 | --- a/1/base | |
74 | +++ b/1/base |
|
74 | +++ b/1/base | |
75 | @@ -1,1 +1,1 @@ |
|
75 | @@ -1,1 +1,1 @@ | |
76 | -base |
|
76 | -base | |
77 | +patched |
|
77 | +patched | |
78 | diff -r e7af5904b465 2/base |
|
78 | diff -r e7af5904b465 2/base | |
79 | --- a/2/base |
|
79 | --- a/2/base | |
80 | +++ b/2/base |
|
80 | +++ b/2/base | |
81 | @@ -1,1 +1,1 @@ |
|
81 | @@ -1,1 +1,1 @@ | |
82 | -base |
|
82 | -base | |
83 | +patched |
|
83 | +patched | |
84 |
|
84 | |||
85 | $ hg qdiff . |
|
85 | $ hg qdiff . | |
86 | diff -r e7af5904b465 1/base |
|
86 | diff -r e7af5904b465 1/base | |
87 | --- a/1/base |
|
87 | --- a/1/base | |
88 | +++ b/1/base |
|
88 | +++ b/1/base | |
89 | @@ -1,1 +1,1 @@ |
|
89 | @@ -1,1 +1,1 @@ | |
90 | -base |
|
90 | -base | |
91 | +patched |
|
91 | +patched | |
92 | diff -r e7af5904b465 2/base |
|
92 | diff -r e7af5904b465 2/base | |
93 | --- a/2/base |
|
93 | --- a/2/base | |
94 | +++ b/2/base |
|
94 | +++ b/2/base | |
95 | @@ -1,1 +1,1 @@ |
|
95 | @@ -1,1 +1,1 @@ | |
96 | -base |
|
96 | -base | |
97 | +patched |
|
97 | +patched | |
98 |
|
98 | |||
99 | $ cat .hg/patches/mqbase |
|
99 | $ cat .hg/patches/mqbase | |
100 | # HG changeset patch |
|
100 | # HG changeset patch | |
101 | # Parent e7af5904b465cd1f4f3cf6b26fe14e8db6f63eaa |
|
101 | # Parent e7af5904b465cd1f4f3cf6b26fe14e8db6f63eaa | |
102 | mqbase |
|
102 | mqbase | |
103 |
|
103 | |||
104 | diff -r e7af5904b465 1/base |
|
104 | diff -r e7af5904b465 1/base | |
105 | --- a/1/base |
|
105 | --- a/1/base | |
106 | +++ b/1/base |
|
106 | +++ b/1/base | |
107 | @@ -1,1 +1,1 @@ |
|
107 | @@ -1,1 +1,1 @@ | |
108 | -base |
|
108 | -base | |
109 | +patched |
|
109 | +patched | |
110 |
|
110 | |||
111 | qrefresh . in subdir: |
|
111 | qrefresh . in subdir: | |
112 |
|
112 | |||
113 | $ ( cd 1 ; hg qrefresh . ) |
|
113 | $ ( cd 1 ; hg qrefresh . ) | |
114 |
|
114 | |||
115 | $ hg qdiff |
|
115 | $ hg qdiff | |
116 | diff -r e7af5904b465 1/base |
|
116 | diff -r e7af5904b465 1/base | |
117 | --- a/1/base |
|
117 | --- a/1/base | |
118 | +++ b/1/base |
|
118 | +++ b/1/base | |
119 | @@ -1,1 +1,1 @@ |
|
119 | @@ -1,1 +1,1 @@ | |
120 | -base |
|
120 | -base | |
121 | +patched |
|
121 | +patched | |
122 | diff -r e7af5904b465 2/base |
|
122 | diff -r e7af5904b465 2/base | |
123 | --- a/2/base |
|
123 | --- a/2/base | |
124 | +++ b/2/base |
|
124 | +++ b/2/base | |
125 | @@ -1,1 +1,1 @@ |
|
125 | @@ -1,1 +1,1 @@ | |
126 | -base |
|
126 | -base | |
127 | +patched |
|
127 | +patched | |
128 |
|
128 | |||
129 | $ hg qdiff . |
|
129 | $ hg qdiff . | |
130 | diff -r e7af5904b465 1/base |
|
130 | diff -r e7af5904b465 1/base | |
131 | --- a/1/base |
|
131 | --- a/1/base | |
132 | +++ b/1/base |
|
132 | +++ b/1/base | |
133 | @@ -1,1 +1,1 @@ |
|
133 | @@ -1,1 +1,1 @@ | |
134 | -base |
|
134 | -base | |
135 | +patched |
|
135 | +patched | |
136 | diff -r e7af5904b465 2/base |
|
136 | diff -r e7af5904b465 2/base | |
137 | --- a/2/base |
|
137 | --- a/2/base | |
138 | +++ b/2/base |
|
138 | +++ b/2/base | |
139 | @@ -1,1 +1,1 @@ |
|
139 | @@ -1,1 +1,1 @@ | |
140 | -base |
|
140 | -base | |
141 | +patched |
|
141 | +patched | |
142 |
|
142 | |||
143 | $ cat .hg/patches/mqbase |
|
143 | $ cat .hg/patches/mqbase | |
144 | # HG changeset patch |
|
144 | # HG changeset patch | |
145 | # Parent e7af5904b465cd1f4f3cf6b26fe14e8db6f63eaa |
|
145 | # Parent e7af5904b465cd1f4f3cf6b26fe14e8db6f63eaa | |
146 | mqbase |
|
146 | mqbase | |
147 |
|
147 | |||
148 | diff -r e7af5904b465 1/base |
|
148 | diff -r e7af5904b465 1/base | |
149 | --- a/1/base |
|
149 | --- a/1/base | |
150 | +++ b/1/base |
|
150 | +++ b/1/base | |
151 | @@ -1,1 +1,1 @@ |
|
151 | @@ -1,1 +1,1 @@ | |
152 | -base |
|
152 | -base | |
153 | +patched |
|
153 | +patched | |
154 |
|
154 | |||
155 | qrefresh in hg-root again: |
|
155 | qrefresh in hg-root again: | |
156 |
|
156 | |||
157 | $ hg qrefresh |
|
157 | $ hg qrefresh | |
158 |
|
158 | |||
159 | $ hg qdiff |
|
159 | $ hg qdiff | |
160 | diff -r e7af5904b465 1/base |
|
160 | diff -r e7af5904b465 1/base | |
161 | --- a/1/base |
|
161 | --- a/1/base | |
162 | +++ b/1/base |
|
162 | +++ b/1/base | |
163 | @@ -1,1 +1,1 @@ |
|
163 | @@ -1,1 +1,1 @@ | |
164 | -base |
|
164 | -base | |
165 | +patched |
|
165 | +patched | |
166 | diff -r e7af5904b465 2/base |
|
166 | diff -r e7af5904b465 2/base | |
167 | --- a/2/base |
|
167 | --- a/2/base | |
168 | +++ b/2/base |
|
168 | +++ b/2/base | |
169 | @@ -1,1 +1,1 @@ |
|
169 | @@ -1,1 +1,1 @@ | |
170 | -base |
|
170 | -base | |
171 | +patched |
|
171 | +patched | |
172 |
|
172 | |||
173 | $ hg qdiff . |
|
173 | $ hg qdiff . | |
174 | diff -r e7af5904b465 1/base |
|
174 | diff -r e7af5904b465 1/base | |
175 | --- a/1/base |
|
175 | --- a/1/base | |
176 | +++ b/1/base |
|
176 | +++ b/1/base | |
177 | @@ -1,1 +1,1 @@ |
|
177 | @@ -1,1 +1,1 @@ | |
178 | -base |
|
178 | -base | |
179 | +patched |
|
179 | +patched | |
180 | diff -r e7af5904b465 2/base |
|
180 | diff -r e7af5904b465 2/base | |
181 | --- a/2/base |
|
181 | --- a/2/base | |
182 | +++ b/2/base |
|
182 | +++ b/2/base | |
183 | @@ -1,1 +1,1 @@ |
|
183 | @@ -1,1 +1,1 @@ | |
184 | -base |
|
184 | -base | |
185 | +patched |
|
185 | +patched | |
186 |
|
186 | |||
187 | $ cat .hg/patches/mqbase |
|
187 | $ cat .hg/patches/mqbase | |
188 | # HG changeset patch |
|
188 | # HG changeset patch | |
189 | # Parent e7af5904b465cd1f4f3cf6b26fe14e8db6f63eaa |
|
189 | # Parent e7af5904b465cd1f4f3cf6b26fe14e8db6f63eaa | |
190 | mqbase |
|
190 | mqbase | |
191 |
|
191 | |||
192 | diff -r e7af5904b465 1/base |
|
192 | diff -r e7af5904b465 1/base | |
193 | --- a/1/base |
|
193 | --- a/1/base | |
194 | +++ b/1/base |
|
194 | +++ b/1/base | |
195 | @@ -1,1 +1,1 @@ |
|
195 | @@ -1,1 +1,1 @@ | |
196 | -base |
|
196 | -base | |
197 | +patched |
|
197 | +patched | |
198 | diff -r e7af5904b465 2/base |
|
198 | diff -r e7af5904b465 2/base | |
199 | --- a/2/base |
|
199 | --- a/2/base | |
200 | +++ b/2/base |
|
200 | +++ b/2/base | |
201 | @@ -1,1 +1,1 @@ |
|
201 | @@ -1,1 +1,1 @@ | |
202 | -base |
|
202 | -base | |
203 | +patched |
|
203 | +patched | |
204 |
|
204 | |||
205 |
|
205 | |||
206 | qrefresh --short tests: |
|
206 | qrefresh --short tests: | |
207 |
|
207 | |||
208 | $ echo 'orphan' > orphanchild |
|
208 | $ echo 'orphan' > orphanchild | |
209 | $ hg add orphanchild |
|
209 | $ hg add orphanchild | |
210 | $ hg qrefresh nonexistentfilename # clear patch |
|
210 | $ hg qrefresh nonexistentfilename # clear patch | |
211 |
nonexistentfilename: |
|
211 | nonexistentfilename: * (glob) | |
212 | $ hg qrefresh --short 1/base |
|
212 | $ hg qrefresh --short 1/base | |
213 | $ hg qrefresh --short 2/base |
|
213 | $ hg qrefresh --short 2/base | |
214 |
|
214 | |||
215 | $ hg qdiff |
|
215 | $ hg qdiff | |
216 | diff -r e7af5904b465 1/base |
|
216 | diff -r e7af5904b465 1/base | |
217 | --- a/1/base |
|
217 | --- a/1/base | |
218 | +++ b/1/base |
|
218 | +++ b/1/base | |
219 | @@ -1,1 +1,1 @@ |
|
219 | @@ -1,1 +1,1 @@ | |
220 | -base |
|
220 | -base | |
221 | +patched |
|
221 | +patched | |
222 | diff -r e7af5904b465 2/base |
|
222 | diff -r e7af5904b465 2/base | |
223 | --- a/2/base |
|
223 | --- a/2/base | |
224 | +++ b/2/base |
|
224 | +++ b/2/base | |
225 | @@ -1,1 +1,1 @@ |
|
225 | @@ -1,1 +1,1 @@ | |
226 | -base |
|
226 | -base | |
227 | +patched |
|
227 | +patched | |
228 | diff -r e7af5904b465 orphanchild |
|
228 | diff -r e7af5904b465 orphanchild | |
229 | --- /dev/null |
|
229 | --- /dev/null | |
230 | +++ b/orphanchild |
|
230 | +++ b/orphanchild | |
231 | @@ -0,0 +1,1 @@ |
|
231 | @@ -0,0 +1,1 @@ | |
232 | +orphan |
|
232 | +orphan | |
233 |
|
233 | |||
234 | $ cat .hg/patches/mqbase |
|
234 | $ cat .hg/patches/mqbase | |
235 | # HG changeset patch |
|
235 | # HG changeset patch | |
236 | # Parent e7af5904b465cd1f4f3cf6b26fe14e8db6f63eaa |
|
236 | # Parent e7af5904b465cd1f4f3cf6b26fe14e8db6f63eaa | |
237 | mqbase |
|
237 | mqbase | |
238 |
|
238 | |||
239 | diff -r e7af5904b465 1/base |
|
239 | diff -r e7af5904b465 1/base | |
240 | --- a/1/base |
|
240 | --- a/1/base | |
241 | +++ b/1/base |
|
241 | +++ b/1/base | |
242 | @@ -1,1 +1,1 @@ |
|
242 | @@ -1,1 +1,1 @@ | |
243 | -base |
|
243 | -base | |
244 | +patched |
|
244 | +patched | |
245 | diff -r e7af5904b465 2/base |
|
245 | diff -r e7af5904b465 2/base | |
246 | --- a/2/base |
|
246 | --- a/2/base | |
247 | +++ b/2/base |
|
247 | +++ b/2/base | |
248 | @@ -1,1 +1,1 @@ |
|
248 | @@ -1,1 +1,1 @@ | |
249 | -base |
|
249 | -base | |
250 | +patched |
|
250 | +patched | |
251 |
|
251 | |||
252 | $ hg st |
|
252 | $ hg st | |
253 | A orphanchild |
|
253 | A orphanchild | |
254 | ? base |
|
254 | ? base | |
255 |
|
255 | |||
256 | diff shows what is not in patch: |
|
256 | diff shows what is not in patch: | |
257 |
|
257 | |||
258 | $ hg diff |
|
258 | $ hg diff | |
259 | diff -r ???????????? orphanchild (glob) |
|
259 | diff -r ???????????? orphanchild (glob) | |
260 | --- /dev/null |
|
260 | --- /dev/null | |
261 | +++ b/orphanchild |
|
261 | +++ b/orphanchild | |
262 | @@ -0,0 +1,1 @@ |
|
262 | @@ -0,0 +1,1 @@ | |
263 | +orphan |
|
263 | +orphan | |
264 |
|
264 | |||
265 | Before starting exclusive tests: |
|
265 | Before starting exclusive tests: | |
266 |
|
266 | |||
267 | $ cat .hg/patches/mqbase |
|
267 | $ cat .hg/patches/mqbase | |
268 | # HG changeset patch |
|
268 | # HG changeset patch | |
269 | # Parent e7af5904b465cd1f4f3cf6b26fe14e8db6f63eaa |
|
269 | # Parent e7af5904b465cd1f4f3cf6b26fe14e8db6f63eaa | |
270 | mqbase |
|
270 | mqbase | |
271 |
|
271 | |||
272 | diff -r e7af5904b465 1/base |
|
272 | diff -r e7af5904b465 1/base | |
273 | --- a/1/base |
|
273 | --- a/1/base | |
274 | +++ b/1/base |
|
274 | +++ b/1/base | |
275 | @@ -1,1 +1,1 @@ |
|
275 | @@ -1,1 +1,1 @@ | |
276 | -base |
|
276 | -base | |
277 | +patched |
|
277 | +patched | |
278 | diff -r e7af5904b465 2/base |
|
278 | diff -r e7af5904b465 2/base | |
279 | --- a/2/base |
|
279 | --- a/2/base | |
280 | +++ b/2/base |
|
280 | +++ b/2/base | |
281 | @@ -1,1 +1,1 @@ |
|
281 | @@ -1,1 +1,1 @@ | |
282 | -base |
|
282 | -base | |
283 | +patched |
|
283 | +patched | |
284 |
|
284 | |||
285 | Exclude 2/base: |
|
285 | Exclude 2/base: | |
286 |
|
286 | |||
287 | $ hg qref -s -X 2/base |
|
287 | $ hg qref -s -X 2/base | |
288 |
|
288 | |||
289 | $ cat .hg/patches/mqbase |
|
289 | $ cat .hg/patches/mqbase | |
290 | # HG changeset patch |
|
290 | # HG changeset patch | |
291 | # Parent e7af5904b465cd1f4f3cf6b26fe14e8db6f63eaa |
|
291 | # Parent e7af5904b465cd1f4f3cf6b26fe14e8db6f63eaa | |
292 | mqbase |
|
292 | mqbase | |
293 |
|
293 | |||
294 | diff -r e7af5904b465 1/base |
|
294 | diff -r e7af5904b465 1/base | |
295 | --- a/1/base |
|
295 | --- a/1/base | |
296 | +++ b/1/base |
|
296 | +++ b/1/base | |
297 | @@ -1,1 +1,1 @@ |
|
297 | @@ -1,1 +1,1 @@ | |
298 | -base |
|
298 | -base | |
299 | +patched |
|
299 | +patched | |
300 |
|
300 | |||
301 | status shows 2/base as dirty: |
|
301 | status shows 2/base as dirty: | |
302 |
|
302 | |||
303 | $ hg status |
|
303 | $ hg status | |
304 | M 2/base |
|
304 | M 2/base | |
305 | A orphanchild |
|
305 | A orphanchild | |
306 | ? base |
|
306 | ? base | |
307 |
|
307 | |||
308 | Remove 1/base and add 2/base again but not orphanchild: |
|
308 | Remove 1/base and add 2/base again but not orphanchild: | |
309 |
|
309 | |||
310 | $ hg qref -s -X orphanchild -X 1/base 2/base orphanchild |
|
310 | $ hg qref -s -X orphanchild -X 1/base 2/base orphanchild | |
311 |
|
311 | |||
312 | $ cat .hg/patches/mqbase |
|
312 | $ cat .hg/patches/mqbase | |
313 | # HG changeset patch |
|
313 | # HG changeset patch | |
314 | # Parent e7af5904b465cd1f4f3cf6b26fe14e8db6f63eaa |
|
314 | # Parent e7af5904b465cd1f4f3cf6b26fe14e8db6f63eaa | |
315 | mqbase |
|
315 | mqbase | |
316 |
|
316 | |||
317 | diff -r e7af5904b465 2/base |
|
317 | diff -r e7af5904b465 2/base | |
318 | --- a/2/base |
|
318 | --- a/2/base | |
319 | +++ b/2/base |
|
319 | +++ b/2/base | |
320 | @@ -1,1 +1,1 @@ |
|
320 | @@ -1,1 +1,1 @@ | |
321 | -base |
|
321 | -base | |
322 | +patched |
|
322 | +patched | |
323 |
|
323 | |||
324 | Add 1/base with include filter - and thus remove 2/base from patch: |
|
324 | Add 1/base with include filter - and thus remove 2/base from patch: | |
325 |
|
325 | |||
326 | $ hg qref -s -I 1/ o* */* |
|
326 | $ hg qref -s -I 1/ o* */* | |
327 |
|
327 | |||
328 | $ cat .hg/patches/mqbase |
|
328 | $ cat .hg/patches/mqbase | |
329 | # HG changeset patch |
|
329 | # HG changeset patch | |
330 | # Parent e7af5904b465cd1f4f3cf6b26fe14e8db6f63eaa |
|
330 | # Parent e7af5904b465cd1f4f3cf6b26fe14e8db6f63eaa | |
331 | mqbase |
|
331 | mqbase | |
332 |
|
332 | |||
333 | diff -r e7af5904b465 1/base |
|
333 | diff -r e7af5904b465 1/base | |
334 | --- a/1/base |
|
334 | --- a/1/base | |
335 | +++ b/1/base |
|
335 | +++ b/1/base | |
336 | @@ -1,1 +1,1 @@ |
|
336 | @@ -1,1 +1,1 @@ | |
337 | -base |
|
337 | -base | |
338 | +patched |
|
338 | +patched | |
339 |
|
339 | |||
340 | $ cd .. |
|
340 | $ cd .. | |
341 |
|
341 | |||
342 |
|
342 | |||
343 | Test qrefresh --git losing copy metadata: |
|
343 | Test qrefresh --git losing copy metadata: | |
344 |
|
344 | |||
345 | $ hg init repo |
|
345 | $ hg init repo | |
346 | $ cd repo |
|
346 | $ cd repo | |
347 |
|
347 | |||
348 | $ echo "[diff]" >> .hg/hgrc |
|
348 | $ echo "[diff]" >> .hg/hgrc | |
349 | $ echo "git=True" >> .hg/hgrc |
|
349 | $ echo "git=True" >> .hg/hgrc | |
350 | $ echo a > a |
|
350 | $ echo a > a | |
351 |
|
351 | |||
352 | $ hg ci -Am adda |
|
352 | $ hg ci -Am adda | |
353 | adding a |
|
353 | adding a | |
354 | $ hg copy a ab |
|
354 | $ hg copy a ab | |
355 | $ echo b >> ab |
|
355 | $ echo b >> ab | |
356 | $ hg copy a ac |
|
356 | $ hg copy a ac | |
357 | $ echo c >> ac |
|
357 | $ echo c >> ac | |
358 |
|
358 | |||
359 | Capture changes: |
|
359 | Capture changes: | |
360 |
|
360 | |||
361 | $ hg qnew -f p1 |
|
361 | $ hg qnew -f p1 | |
362 |
|
362 | |||
363 | $ hg qdiff |
|
363 | $ hg qdiff | |
364 | diff --git a/a b/ab |
|
364 | diff --git a/a b/ab | |
365 | copy from a |
|
365 | copy from a | |
366 | copy to ab |
|
366 | copy to ab | |
367 | --- a/a |
|
367 | --- a/a | |
368 | +++ b/ab |
|
368 | +++ b/ab | |
369 | @@ -1,1 +1,2 @@ |
|
369 | @@ -1,1 +1,2 @@ | |
370 | a |
|
370 | a | |
371 | +b |
|
371 | +b | |
372 | diff --git a/a b/ac |
|
372 | diff --git a/a b/ac | |
373 | copy from a |
|
373 | copy from a | |
374 | copy to ac |
|
374 | copy to ac | |
375 | --- a/a |
|
375 | --- a/a | |
376 | +++ b/ac |
|
376 | +++ b/ac | |
377 | @@ -1,1 +1,2 @@ |
|
377 | @@ -1,1 +1,2 @@ | |
378 | a |
|
378 | a | |
379 | +c |
|
379 | +c | |
380 |
|
380 | |||
381 | Refresh and check changes again: |
|
381 | Refresh and check changes again: | |
382 |
|
382 | |||
383 | $ hg qrefresh |
|
383 | $ hg qrefresh | |
384 |
|
384 | |||
385 | $ hg qdiff |
|
385 | $ hg qdiff | |
386 | diff --git a/a b/ab |
|
386 | diff --git a/a b/ab | |
387 | copy from a |
|
387 | copy from a | |
388 | copy to ab |
|
388 | copy to ab | |
389 | --- a/a |
|
389 | --- a/a | |
390 | +++ b/ab |
|
390 | +++ b/ab | |
391 | @@ -1,1 +1,2 @@ |
|
391 | @@ -1,1 +1,2 @@ | |
392 | a |
|
392 | a | |
393 | +b |
|
393 | +b | |
394 | diff --git a/a b/ac |
|
394 | diff --git a/a b/ac | |
395 | copy from a |
|
395 | copy from a | |
396 | copy to ac |
|
396 | copy to ac | |
397 | --- a/a |
|
397 | --- a/a | |
398 | +++ b/ac |
|
398 | +++ b/ac | |
399 | @@ -1,1 +1,2 @@ |
|
399 | @@ -1,1 +1,2 @@ | |
400 | a |
|
400 | a | |
401 | +c |
|
401 | +c | |
402 |
|
402 | |||
403 | $ cd .. |
|
403 | $ cd .. | |
404 |
|
404 | |||
405 |
|
405 | |||
406 | Issue1441: qrefresh confused after hg rename: |
|
406 | Issue1441: qrefresh confused after hg rename: | |
407 |
|
407 | |||
408 | $ hg init repo-1441 |
|
408 | $ hg init repo-1441 | |
409 | $ cd repo-1441 |
|
409 | $ cd repo-1441 | |
410 | $ echo a > a |
|
410 | $ echo a > a | |
411 | $ hg add a |
|
411 | $ hg add a | |
412 | $ hg qnew -f p |
|
412 | $ hg qnew -f p | |
413 | $ hg mv a b |
|
413 | $ hg mv a b | |
414 | $ hg qrefresh |
|
414 | $ hg qrefresh | |
415 |
|
415 | |||
416 | $ hg qdiff |
|
416 | $ hg qdiff | |
417 | diff -r 000000000000 b |
|
417 | diff -r 000000000000 b | |
418 | --- /dev/null |
|
418 | --- /dev/null | |
419 | +++ b/b |
|
419 | +++ b/b | |
420 | @@ -0,0 +1,1 @@ |
|
420 | @@ -0,0 +1,1 @@ | |
421 | +a |
|
421 | +a | |
422 |
|
422 | |||
423 | $ cd .. |
|
423 | $ cd .. | |
424 |
|
424 | |||
425 |
|
425 | |||
426 | Issue2025: qrefresh does not honor filtering options when tip != |
|
426 | Issue2025: qrefresh does not honor filtering options when tip != | |
427 | qtip: |
|
427 | qtip: | |
428 |
|
428 | |||
429 | $ hg init repo-2025 |
|
429 | $ hg init repo-2025 | |
430 | $ cd repo-2025 |
|
430 | $ cd repo-2025 | |
431 | $ echo a > a |
|
431 | $ echo a > a | |
432 | $ echo b > b |
|
432 | $ echo b > b | |
433 | $ hg ci -qAm addab |
|
433 | $ hg ci -qAm addab | |
434 | $ echo a >> a |
|
434 | $ echo a >> a | |
435 | $ echo b >> b |
|
435 | $ echo b >> b | |
436 | $ hg qnew -f patch |
|
436 | $ hg qnew -f patch | |
437 | $ hg up -qC 0 |
|
437 | $ hg up -qC 0 | |
438 | $ echo c > c |
|
438 | $ echo c > c | |
439 | $ hg ci -qAm addc |
|
439 | $ hg ci -qAm addc | |
440 | $ hg up -qC 1 |
|
440 | $ hg up -qC 1 | |
441 |
|
441 | |||
442 | refresh with tip != qtip: |
|
442 | refresh with tip != qtip: | |
443 |
|
443 | |||
444 | $ hg --config diff.nodates=1 qrefresh -I b |
|
444 | $ hg --config diff.nodates=1 qrefresh -I b | |
445 |
|
445 | |||
446 | $ hg st |
|
446 | $ hg st | |
447 | M a |
|
447 | M a | |
448 |
|
448 | |||
449 | $ cat b |
|
449 | $ cat b | |
450 | b |
|
450 | b | |
451 | b |
|
451 | b | |
452 |
|
452 | |||
453 | $ cat .hg/patches/patch |
|
453 | $ cat .hg/patches/patch | |
454 | # HG changeset patch |
|
454 | # HG changeset patch | |
455 | # Parent 1a60229be7ac3e4a7f647508e99b87bef1f03593 |
|
455 | # Parent 1a60229be7ac3e4a7f647508e99b87bef1f03593 | |
456 |
|
456 | |||
457 | diff -r 1a60229be7ac b |
|
457 | diff -r 1a60229be7ac b | |
458 | --- a/b |
|
458 | --- a/b | |
459 | +++ b/b |
|
459 | +++ b/b | |
460 | @@ -1,1 +1,2 @@ |
|
460 | @@ -1,1 +1,2 @@ | |
461 | b |
|
461 | b | |
462 | +b |
|
462 | +b | |
463 |
|
463 | |||
464 | $ cd .. |
|
464 | $ cd .. | |
465 |
|
465 | |||
466 |
|
466 | |||
467 | Issue1441 with git patches: |
|
467 | Issue1441 with git patches: | |
468 |
|
468 | |||
469 | $ hg init repo-1441-git |
|
469 | $ hg init repo-1441-git | |
470 | $ cd repo-1441-git |
|
470 | $ cd repo-1441-git | |
471 |
|
471 | |||
472 | $ echo "[diff]" >> .hg/hgrc |
|
472 | $ echo "[diff]" >> .hg/hgrc | |
473 | $ echo "git=True" >> .hg/hgrc |
|
473 | $ echo "git=True" >> .hg/hgrc | |
474 |
|
474 | |||
475 | $ echo a > a |
|
475 | $ echo a > a | |
476 | $ hg add a |
|
476 | $ hg add a | |
477 | $ hg qnew -f p |
|
477 | $ hg qnew -f p | |
478 | $ hg mv a b |
|
478 | $ hg mv a b | |
479 | $ hg qrefresh |
|
479 | $ hg qrefresh | |
480 |
|
480 | |||
481 | $ hg qdiff --nodates |
|
481 | $ hg qdiff --nodates | |
482 | diff --git a/b b/b |
|
482 | diff --git a/b b/b | |
483 | new file mode 100644 |
|
483 | new file mode 100644 | |
484 | --- /dev/null |
|
484 | --- /dev/null | |
485 | +++ b/b |
|
485 | +++ b/b | |
486 | @@ -0,0 +1,1 @@ |
|
486 | @@ -0,0 +1,1 @@ | |
487 | +a |
|
487 | +a | |
488 |
|
488 | |||
489 | $ cd .. |
|
489 | $ cd .. | |
490 |
|
490 | |||
491 | Refresh with bad usernames. Mercurial used to abort on bad usernames, |
|
491 | Refresh with bad usernames. Mercurial used to abort on bad usernames, | |
492 | but only after writing the bad name into the patch. |
|
492 | but only after writing the bad name into the patch. | |
493 |
|
493 | |||
494 | $ hg init bad-usernames |
|
494 | $ hg init bad-usernames | |
495 | $ cd bad-usernames |
|
495 | $ cd bad-usernames | |
496 | $ touch a |
|
496 | $ touch a | |
497 | $ hg add a |
|
497 | $ hg add a | |
498 | $ hg qnew a |
|
498 | $ hg qnew a | |
499 | $ hg qrefresh -u 'foo |
|
499 | $ hg qrefresh -u 'foo | |
500 | > bar' |
|
500 | > bar' | |
501 | transaction abort! |
|
501 | transaction abort! | |
502 | rollback completed |
|
502 | rollback completed | |
503 | refresh interrupted while patch was popped! (revert --all, qpush to recover) |
|
503 | refresh interrupted while patch was popped! (revert --all, qpush to recover) | |
504 | abort: username 'foo\nbar' contains a newline! |
|
504 | abort: username 'foo\nbar' contains a newline! | |
505 | [255] |
|
505 | [255] | |
506 | $ rm a |
|
506 | $ rm a | |
507 | $ cat .hg/patches/a |
|
507 | $ cat .hg/patches/a | |
508 | # HG changeset patch |
|
508 | # HG changeset patch | |
509 | # Parent 0000000000000000000000000000000000000000 |
|
509 | # Parent 0000000000000000000000000000000000000000 | |
510 | diff --git a/a b/a |
|
510 | diff --git a/a b/a | |
511 | new file mode 100644 |
|
511 | new file mode 100644 | |
512 | $ hg qpush |
|
512 | $ hg qpush | |
513 | applying a |
|
513 | applying a | |
514 | now at: a |
|
514 | now at: a | |
515 | $ hg qrefresh -u ' ' |
|
515 | $ hg qrefresh -u ' ' | |
516 | transaction abort! |
|
516 | transaction abort! | |
517 | rollback completed |
|
517 | rollback completed | |
518 | refresh interrupted while patch was popped! (revert --all, qpush to recover) |
|
518 | refresh interrupted while patch was popped! (revert --all, qpush to recover) | |
519 | abort: empty username! |
|
519 | abort: empty username! | |
520 | [255] |
|
520 | [255] | |
521 | $ cat .hg/patches/a |
|
521 | $ cat .hg/patches/a | |
522 | # HG changeset patch |
|
522 | # HG changeset patch | |
523 | # Parent 0000000000000000000000000000000000000000 |
|
523 | # Parent 0000000000000000000000000000000000000000 | |
524 | diff --git a/a b/a |
|
524 | diff --git a/a b/a | |
525 | new file mode 100644 |
|
525 | new file mode 100644 | |
526 | $ cd .. |
|
526 | $ cd .. | |
527 |
|
527 | |||
528 | Refresh with phase data: |
|
528 | Refresh with phase data: | |
529 |
|
529 | |||
530 |
|
530 | |||
531 |
|
531 | |||
532 | $ cd repo |
|
532 | $ cd repo | |
533 | $ echo 'babar' >> a |
|
533 | $ echo 'babar' >> a | |
534 | $ hg qnew -m 'update a' p2.diff |
|
534 | $ hg qnew -m 'update a' p2.diff | |
535 | $ hg phase p2.diff |
|
535 | $ hg phase p2.diff | |
536 | 2: draft |
|
536 | 2: draft | |
537 | $ echo 'beber' >> a |
|
537 | $ echo 'beber' >> a | |
538 | $ hg qref |
|
538 | $ hg qref | |
539 | $ hg phase p2.diff |
|
539 | $ hg phase p2.diff | |
540 | 2: draft |
|
540 | 2: draft | |
541 | $ hg phase --force --secret p2.diff |
|
541 | $ hg phase --force --secret p2.diff | |
542 | $ echo 'bibir' >> a |
|
542 | $ echo 'bibir' >> a | |
543 | $ hg qref |
|
543 | $ hg qref | |
544 | $ hg phase p2.diff |
|
544 | $ hg phase p2.diff | |
545 | 2: secret |
|
545 | 2: secret | |
546 |
|
546 | |||
547 | $ cd .. |
|
547 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now