Show More
@@ -1,583 +1,584 b'' | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
3 | checkundo() |
|
3 | checkundo() | |
4 | { |
|
4 | { | |
5 | if [ -f .hg/store/undo ]; then |
|
5 | if [ -f .hg/store/undo ]; then | |
6 | echo ".hg/store/undo still exists after $1" |
|
6 | echo ".hg/store/undo still exists after $1" | |
7 | fi |
|
7 | fi | |
8 | } |
|
8 | } | |
9 |
|
9 | |||
10 | echo "[extensions]" >> $HGRCPATH |
|
10 | echo "[extensions]" >> $HGRCPATH | |
11 | echo "mq=" >> $HGRCPATH |
|
11 | echo "mq=" >> $HGRCPATH | |
12 |
|
12 | |||
13 | echo % help |
|
13 | echo % help | |
14 | hg help mq |
|
14 | hg help mq | |
15 |
|
15 | |||
16 | hg init a |
|
16 | hg init a | |
17 | cd a |
|
17 | cd a | |
18 | echo a > a |
|
18 | echo a > a | |
19 | hg ci -Ama |
|
19 | hg ci -Ama | |
20 |
|
20 | |||
21 | hg clone . ../k |
|
21 | hg clone . ../k | |
22 |
|
22 | |||
23 | mkdir b |
|
23 | mkdir b | |
24 | echo z > b/z |
|
24 | echo z > b/z | |
25 | hg ci -Ama |
|
25 | hg ci -Ama | |
26 |
|
26 | |||
27 | echo % qinit |
|
27 | echo % qinit | |
28 |
|
28 | |||
29 | hg qinit |
|
29 | hg qinit | |
30 |
|
30 | |||
31 | cd .. |
|
31 | cd .. | |
32 | hg init b |
|
32 | hg init b | |
33 |
|
33 | |||
34 | echo % -R qinit |
|
34 | echo % -R qinit | |
35 |
|
35 | |||
36 | hg -R b qinit |
|
36 | hg -R b qinit | |
37 |
|
37 | |||
38 | hg init c |
|
38 | hg init c | |
39 |
|
39 | |||
40 | echo % qinit -c |
|
40 | echo % qinit -c | |
41 |
|
41 | |||
42 | hg --cwd c qinit -c |
|
42 | hg --cwd c qinit -c | |
43 | hg -R c/.hg/patches st |
|
43 | hg -R c/.hg/patches st | |
44 |
|
44 | |||
45 | echo '% qinit; qinit -c' |
|
45 | echo '% qinit; qinit -c' | |
46 | hg init d |
|
46 | hg init d | |
47 | cd d |
|
47 | cd d | |
48 | hg qinit |
|
48 | hg qinit | |
49 | hg qinit -c |
|
49 | hg qinit -c | |
50 | # qinit -c should create both files if they don't exist |
|
50 | # qinit -c should create both files if they don't exist | |
51 | echo ' .hgignore:' |
|
51 | echo ' .hgignore:' | |
52 | cat .hg/patches/.hgignore |
|
52 | cat .hg/patches/.hgignore | |
53 | echo ' series:' |
|
53 | echo ' series:' | |
54 | cat .hg/patches/series |
|
54 | cat .hg/patches/series | |
55 | hg qinit -c 2>&1 | sed -e 's/repository.*already/repository already/' |
|
55 | hg qinit -c 2>&1 | sed -e 's/repository.*already/repository already/' | |
56 | cd .. |
|
56 | cd .. | |
57 |
|
57 | |||
58 | echo '% qinit; <stuff>; qinit -c' |
|
58 | echo '% qinit; <stuff>; qinit -c' | |
59 | hg init e |
|
59 | hg init e | |
60 | cd e |
|
60 | cd e | |
61 | hg qnew A |
|
61 | hg qnew A | |
62 | checkundo qnew |
|
62 | checkundo qnew | |
63 | echo foo > foo |
|
63 | echo foo > foo | |
64 | hg add foo |
|
64 | hg add foo | |
65 | hg qrefresh |
|
65 | hg qrefresh | |
66 | hg qnew B |
|
66 | hg qnew B | |
67 | echo >> foo |
|
67 | echo >> foo | |
68 | hg qrefresh |
|
68 | hg qrefresh | |
69 | echo status >> .hg/patches/.hgignore |
|
69 | echo status >> .hg/patches/.hgignore | |
70 | echo bleh >> .hg/patches/.hgignore |
|
70 | echo bleh >> .hg/patches/.hgignore | |
71 | hg qinit -c |
|
71 | hg qinit -c | |
72 | hg -R .hg/patches status |
|
72 | hg -R .hg/patches status | |
73 | # qinit -c shouldn't touch these files if they already exist |
|
73 | # qinit -c shouldn't touch these files if they already exist | |
74 | echo ' .hgignore:' |
|
74 | echo ' .hgignore:' | |
75 | cat .hg/patches/.hgignore |
|
75 | cat .hg/patches/.hgignore | |
76 | echo ' series:' |
|
76 | echo ' series:' | |
77 | cat .hg/patches/series |
|
77 | cat .hg/patches/series | |
78 | cd .. |
|
78 | cd .. | |
79 |
|
79 | |||
80 | cd a |
|
80 | cd a | |
81 |
|
81 | |||
82 | hg qnew -m 'foo bar' test.patch |
|
82 | hg qnew -m 'foo bar' test.patch | |
83 |
|
83 | |||
84 | echo % qrefresh |
|
84 | echo % qrefresh | |
85 |
|
85 | |||
86 | echo a >> a |
|
86 | echo a >> a | |
87 | hg qrefresh |
|
87 | hg qrefresh | |
88 | sed -e "s/^\(diff -r \)\([a-f0-9]* \)/\1 x/" \ |
|
88 | sed -e "s/^\(diff -r \)\([a-f0-9]* \)/\1 x/" \ | |
89 | -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ |
|
89 | -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ | |
90 | -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" .hg/patches/test.patch |
|
90 | -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" .hg/patches/test.patch | |
91 |
|
91 | |||
92 | echo % empty qrefresh |
|
92 | echo % empty qrefresh | |
93 |
|
93 | |||
94 | hg qrefresh -X a |
|
94 | hg qrefresh -X a | |
95 | echo 'revision:' |
|
95 | echo 'revision:' | |
96 | hg diff -r -2 -r -1 |
|
96 | hg diff -r -2 -r -1 | |
97 | echo 'patch:' |
|
97 | echo 'patch:' | |
98 | cat .hg/patches/test.patch |
|
98 | cat .hg/patches/test.patch | |
99 | echo 'working dir diff:' |
|
99 | echo 'working dir diff:' | |
100 | hg diff --nodates -q |
|
100 | hg diff --nodates -q | |
101 | # restore things |
|
101 | # restore things | |
102 | hg qrefresh |
|
102 | hg qrefresh | |
103 | checkundo qrefresh |
|
103 | checkundo qrefresh | |
104 |
|
104 | |||
105 | echo % qpop |
|
105 | echo % qpop | |
106 |
|
106 | |||
107 | hg qpop |
|
107 | hg qpop | |
108 | checkundo qpop |
|
108 | checkundo qpop | |
109 |
|
109 | |||
110 | echo % qpush with dump of tag cache |
|
110 | echo % qpush with dump of tag cache | |
111 |
|
111 | |||
112 | # Dump the tag cache to ensure that it has exactly one head after qpush. |
|
112 | # Dump the tag cache to ensure that it has exactly one head after qpush. | |
113 | rm -f .hg/tags.cache |
|
113 | rm -f .hg/tags.cache | |
114 | hg tags > /dev/null |
|
114 | hg tags > /dev/null | |
115 | echo ".hg/tags.cache (pre qpush):" |
|
115 | echo ".hg/tags.cache (pre qpush):" | |
116 | sed 's/ [0-9a-f]*//' .hg/tags.cache |
|
116 | sed 's/ [0-9a-f]*//' .hg/tags.cache | |
117 | hg qpush |
|
117 | hg qpush | |
118 | hg tags > /dev/null |
|
118 | hg tags > /dev/null | |
119 | echo ".hg/tags.cache (post qpush):" |
|
119 | echo ".hg/tags.cache (post qpush):" | |
120 | sed 's/ [0-9a-f]*//' .hg/tags.cache |
|
120 | sed 's/ [0-9a-f]*//' .hg/tags.cache | |
121 |
|
121 | |||
122 | checkundo qpush |
|
122 | checkundo qpush | |
123 |
|
123 | |||
124 | cd .. |
|
124 | cd .. | |
125 |
|
125 | |||
126 | echo % pop/push outside repo |
|
126 | echo % pop/push outside repo | |
127 |
|
127 | |||
128 | hg -R a qpop |
|
128 | hg -R a qpop | |
129 | hg -R a qpush |
|
129 | hg -R a qpush | |
130 |
|
130 | |||
131 | cd a |
|
131 | cd a | |
132 | hg qnew test2.patch |
|
132 | hg qnew test2.patch | |
133 |
|
133 | |||
134 | echo % qrefresh in subdir |
|
134 | echo % qrefresh in subdir | |
135 |
|
135 | |||
136 | cd b |
|
136 | cd b | |
137 | echo a > a |
|
137 | echo a > a | |
138 | hg add a |
|
138 | hg add a | |
139 | hg qrefresh |
|
139 | hg qrefresh | |
140 |
|
140 | |||
141 | echo % pop/push -a in subdir |
|
141 | echo % pop/push -a in subdir | |
142 |
|
142 | |||
143 | hg qpop -a |
|
143 | hg qpop -a | |
144 | hg --traceback qpush -a |
|
144 | hg --traceback qpush -a | |
145 |
|
145 | |||
146 | # setting columns & interactive tests truncating (issue1912) |
|
146 | # setting columns & interactive tests truncating (issue1912) | |
147 | echo % qseries |
|
147 | echo % qseries | |
148 | COLUMNS=4 hg qseries --config ui.interactive=true |
|
148 | COLUMNS=4 hg qseries --config ui.interactive=true | |
149 | COLUMNS=20 hg qseries --config ui.interactive=true -vs |
|
149 | COLUMNS=20 hg qseries --config ui.interactive=true -vs | |
150 | hg qpop |
|
150 | hg qpop | |
151 | hg qseries -vs |
|
151 | hg qseries -vs | |
152 | hg qpush |
|
152 | hg qpush | |
153 |
|
153 | |||
154 | echo % qapplied |
|
154 | echo % qapplied | |
155 | hg qapplied |
|
155 | hg qapplied | |
156 |
|
156 | |||
157 | echo % qtop |
|
157 | echo % qtop | |
158 | hg qtop |
|
158 | hg qtop | |
159 |
|
159 | |||
160 | echo % prev |
|
160 | echo % prev | |
161 | hg qapp -1 |
|
161 | hg qapp -1 | |
162 |
|
162 | |||
163 | echo % next |
|
163 | echo % next | |
164 | hg qunapp -1 |
|
164 | hg qunapp -1 | |
165 |
|
165 | |||
166 | hg qpop |
|
166 | hg qpop | |
167 | echo % commit should fail |
|
167 | echo % commit should fail | |
168 | hg commit |
|
168 | hg commit | |
169 |
|
169 | |||
170 | echo % push should fail |
|
170 | echo % push should fail | |
171 | hg push ../../k |
|
171 | hg push ../../k | |
172 |
|
172 | |||
173 | echo % import should fail |
|
173 | echo % import should fail | |
174 | hg st . |
|
174 | hg st . | |
175 | echo foo >> ../a |
|
175 | echo foo >> ../a | |
176 | hg diff > ../../import.diff |
|
176 | hg diff > ../../import.diff | |
177 | hg revert --no-backup ../a |
|
177 | hg revert --no-backup ../a | |
178 | hg import ../../import.diff |
|
178 | hg import ../../import.diff | |
179 | hg st |
|
179 | hg st | |
180 | echo % import --no-commit should succeed |
|
180 | echo % import --no-commit should succeed | |
181 | hg import --no-commit ../../import.diff |
|
181 | hg import --no-commit ../../import.diff | |
182 | hg st |
|
182 | hg st | |
183 | hg revert --no-backup ../a |
|
183 | hg revert --no-backup ../a | |
184 |
|
184 | |||
185 | echo % qunapplied |
|
185 | echo % qunapplied | |
186 | hg qunapplied |
|
186 | hg qunapplied | |
187 |
|
187 | |||
188 | echo % qpush/qpop with index |
|
188 | echo % qpush/qpop with index | |
189 | hg qnew test1b.patch |
|
189 | hg qnew test1b.patch | |
190 | echo 1b > 1b |
|
190 | echo 1b > 1b | |
191 | hg add 1b |
|
191 | hg add 1b | |
192 | hg qrefresh |
|
192 | hg qrefresh | |
193 | hg qpush 2 |
|
193 | hg qpush 2 | |
194 | hg qpop 0 |
|
194 | hg qpop 0 | |
195 | hg qpush test.patch+1 |
|
195 | hg qpush test.patch+1 | |
196 | hg qpush test.patch+2 |
|
196 | hg qpush test.patch+2 | |
197 | hg qpop test2.patch-1 |
|
197 | hg qpop test2.patch-1 | |
198 | hg qpop test2.patch-2 |
|
198 | hg qpop test2.patch-2 | |
199 | hg qpush test1b.patch+1 |
|
199 | hg qpush test1b.patch+1 | |
200 |
|
200 | |||
201 | echo % pop, qapplied, qunapplied |
|
201 | echo % pop, qapplied, qunapplied | |
202 | hg qseries -v |
|
202 | hg qseries -v | |
203 | echo % qapplied -1 test.patch |
|
203 | echo % qapplied -1 test.patch | |
204 | hg qapplied -1 test.patch |
|
204 | hg qapplied -1 test.patch | |
205 | echo % qapplied -1 test1b.patch |
|
205 | echo % qapplied -1 test1b.patch | |
206 | hg qapplied -1 test1b.patch |
|
206 | hg qapplied -1 test1b.patch | |
207 | echo % qapplied -1 test2.patch |
|
207 | echo % qapplied -1 test2.patch | |
208 | hg qapplied -1 test2.patch |
|
208 | hg qapplied -1 test2.patch | |
209 | echo % qapplied -1 |
|
209 | echo % qapplied -1 | |
210 | hg qapplied -1 |
|
210 | hg qapplied -1 | |
211 | echo % qapplied |
|
211 | echo % qapplied | |
212 | hg qapplied |
|
212 | hg qapplied | |
213 | echo % qapplied test1b.patch |
|
213 | echo % qapplied test1b.patch | |
214 | hg qapplied test1b.patch |
|
214 | hg qapplied test1b.patch | |
215 | echo % qunapplied -1 |
|
215 | echo % qunapplied -1 | |
216 | hg qunapplied -1 |
|
216 | hg qunapplied -1 | |
217 | echo % qunapplied |
|
217 | echo % qunapplied | |
218 | hg qunapplied |
|
218 | hg qunapplied | |
219 | echo % popping |
|
219 | echo % popping | |
220 | hg qpop |
|
220 | hg qpop | |
221 | echo % qunapplied -1 |
|
221 | echo % qunapplied -1 | |
222 | hg qunapplied -1 |
|
222 | hg qunapplied -1 | |
223 | echo % qunapplied |
|
223 | echo % qunapplied | |
224 | hg qunapplied |
|
224 | hg qunapplied | |
225 | echo % qunapplied test2.patch |
|
225 | echo % qunapplied test2.patch | |
226 | hg qunapplied test2.patch |
|
226 | hg qunapplied test2.patch | |
227 | echo % qunapplied -1 test2.patch |
|
227 | echo % qunapplied -1 test2.patch | |
228 | hg qunapplied -1 test2.patch |
|
228 | hg qunapplied -1 test2.patch | |
229 | echo % popping -a |
|
229 | echo % popping -a | |
230 | hg qpop -a |
|
230 | hg qpop -a | |
231 | echo % qapplied |
|
231 | echo % qapplied | |
232 | hg qapplied |
|
232 | hg qapplied | |
233 | echo % qapplied -1 |
|
233 | echo % qapplied -1 | |
234 | hg qapplied -1 |
|
234 | hg qapplied -1 | |
235 | hg qpush |
|
235 | hg qpush | |
236 |
|
236 | |||
237 | echo % push should succeed |
|
237 | echo % push should succeed | |
238 | hg qpop -a |
|
238 | hg qpop -a | |
239 | hg push ../../k |
|
239 | hg push ../../k | |
240 |
|
240 | |||
241 | echo % qpush/qpop error codes |
|
241 | echo % qpush/qpop error codes | |
242 | errorcode() |
|
242 | errorcode() | |
243 | { |
|
243 | { | |
244 | hg "$@" && echo " $@ succeeds" || echo " $@ fails" |
|
244 | hg "$@" && echo " $@ succeeds" || echo " $@ fails" | |
245 | } |
|
245 | } | |
246 |
|
246 | |||
247 | # we want to start with some patches applied |
|
247 | # we want to start with some patches applied | |
248 | hg qpush -a |
|
248 | hg qpush -a | |
249 | echo " % pops all patches and succeeds" |
|
249 | echo " % pops all patches and succeeds" | |
250 | errorcode qpop -a |
|
250 | errorcode qpop -a | |
251 | echo " % does nothing and succeeds" |
|
251 | echo " % does nothing and succeeds" | |
252 | errorcode qpop -a |
|
252 | errorcode qpop -a | |
253 | echo " % fails - nothing else to pop" |
|
253 | echo " % fails - nothing else to pop" | |
254 | errorcode qpop |
|
254 | errorcode qpop | |
255 | echo " % pushes a patch and succeeds" |
|
255 | echo " % pushes a patch and succeeds" | |
256 | errorcode qpush |
|
256 | errorcode qpush | |
257 | echo " % pops a patch and succeeds" |
|
257 | echo " % pops a patch and succeeds" | |
258 | errorcode qpop |
|
258 | errorcode qpop | |
259 | echo " % pushes up to test1b.patch and succeeds" |
|
259 | echo " % pushes up to test1b.patch and succeeds" | |
260 | errorcode qpush test1b.patch |
|
260 | errorcode qpush test1b.patch | |
261 | echo " % does nothing and succeeds" |
|
261 | echo " % does nothing and succeeds" | |
262 | errorcode qpush test1b.patch |
|
262 | errorcode qpush test1b.patch | |
263 | echo " % does nothing and succeeds" |
|
263 | echo " % does nothing and succeeds" | |
264 | errorcode qpop test1b.patch |
|
264 | errorcode qpop test1b.patch | |
265 | echo " % fails - can't push to this patch" |
|
265 | echo " % fails - can't push to this patch" | |
266 | errorcode qpush test.patch |
|
266 | errorcode qpush test.patch | |
267 | echo " % fails - can't pop to this patch" |
|
267 | echo " % fails - can't pop to this patch" | |
268 | errorcode qpop test2.patch |
|
268 | errorcode qpop test2.patch | |
269 | echo " % pops up to test.patch and succeeds" |
|
269 | echo " % pops up to test.patch and succeeds" | |
270 | errorcode qpop test.patch |
|
270 | errorcode qpop test.patch | |
271 | echo " % pushes all patches and succeeds" |
|
271 | echo " % pushes all patches and succeeds" | |
272 | errorcode qpush -a |
|
272 | errorcode qpush -a | |
273 | echo " % does nothing and succeeds" |
|
273 | echo " % does nothing and succeeds" | |
274 | errorcode qpush -a |
|
274 | errorcode qpush -a | |
275 | echo " % fails - nothing else to push" |
|
275 | echo " % fails - nothing else to push" | |
276 | errorcode qpush |
|
276 | errorcode qpush | |
277 | echo " % does nothing and succeeds" |
|
277 | echo " % does nothing and succeeds" | |
278 | errorcode qpush test2.patch |
|
278 | errorcode qpush test2.patch | |
279 |
|
279 | |||
280 |
|
280 | |||
281 | echo % strip |
|
281 | echo % strip | |
282 | cd ../../b |
|
282 | cd ../../b | |
283 | echo x>x |
|
283 | echo x>x | |
284 | hg ci -Ama |
|
284 | hg ci -Ama | |
285 | hg strip tip 2>&1 | sed 's/\(saving bundle to \).*/\1/' |
|
285 | hg strip tip 2>&1 | sed 's/\(saving bundle to \).*/\1/' | |
286 | hg unbundle .hg/strip-backup/* |
|
286 | hg unbundle .hg/strip-backup/* | |
287 |
|
287 | |||
288 | echo % strip with local changes, should complain |
|
288 | echo % strip with local changes, should complain | |
289 | hg up |
|
289 | hg up | |
290 | echo y>y |
|
290 | echo y>y | |
291 | hg add y |
|
291 | hg add y | |
292 | hg strip tip | sed 's/\(saving bundle to \).*/\1/' |
|
292 | hg strip tip | sed 's/\(saving bundle to \).*/\1/' | |
293 | echo % --force strip with local changes |
|
293 | echo % --force strip with local changes | |
294 | hg strip -f tip 2>&1 | sed 's/\(saving bundle to \).*/\1/' |
|
294 | hg strip -f tip 2>&1 | sed 's/\(saving bundle to \).*/\1/' | |
295 |
|
295 | |||
296 | echo '% cd b; hg qrefresh' |
|
296 | echo '% cd b; hg qrefresh' | |
297 | hg init refresh |
|
297 | hg init refresh | |
298 | cd refresh |
|
298 | cd refresh | |
299 | echo a > a |
|
299 | echo a > a | |
300 | hg ci -Ama |
|
300 | hg ci -Ama | |
301 | hg qnew -mfoo foo |
|
301 | hg qnew -mfoo foo | |
302 | echo a >> a |
|
302 | echo a >> a | |
303 | hg qrefresh |
|
303 | hg qrefresh | |
304 | mkdir b |
|
304 | mkdir b | |
305 | cd b |
|
305 | cd b | |
306 | echo f > f |
|
306 | echo f > f | |
307 | hg add f |
|
307 | hg add f | |
308 | hg qrefresh |
|
308 | hg qrefresh | |
309 | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ |
|
309 | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ | |
310 | -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" ../.hg/patches/foo |
|
310 | -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" ../.hg/patches/foo | |
311 | echo % hg qrefresh . |
|
311 | echo % hg qrefresh . | |
312 | hg qrefresh . |
|
312 | hg qrefresh . | |
313 | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ |
|
313 | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ | |
314 | -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" ../.hg/patches/foo |
|
314 | -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" ../.hg/patches/foo | |
315 | hg status |
|
315 | hg status | |
316 |
|
316 | |||
317 | echo % qpush failure |
|
317 | echo % qpush failure | |
318 | cd .. |
|
318 | cd .. | |
319 | hg qrefresh |
|
319 | hg qrefresh | |
320 | hg qnew -mbar bar |
|
320 | hg qnew -mbar bar | |
321 | echo foo > foo |
|
321 | echo foo > foo | |
322 | echo bar > bar |
|
322 | echo bar > bar | |
323 | hg add foo bar |
|
323 | hg add foo bar | |
324 | hg qrefresh |
|
324 | hg qrefresh | |
325 | hg qpop -a |
|
325 | hg qpop -a | |
326 | echo bar > foo |
|
326 | echo bar > foo | |
327 | hg qpush -a |
|
327 | hg qpush -a | |
328 | hg st |
|
328 | hg st | |
329 |
|
329 | |||
330 | echo % mq tags |
|
330 | echo % mq tags | |
331 | hg log --template '{rev} {tags}\n' -r qparent:qtip |
|
331 | hg log --template '{rev} {tags}\n' -r qparent:qtip | |
332 |
|
332 | |||
333 | echo % bad node in status |
|
333 | echo % bad node in status | |
334 | hg qpop |
|
334 | hg qpop | |
335 | hg strip -qn tip |
|
335 | hg strip -qn tip | |
336 | hg tip 2>&1 | sed -e 's/unknown node .*/unknown node/' |
|
336 | hg tip 2>&1 | sed -e 's/unknown node .*/unknown node/' | |
337 | hg branches 2>&1 | sed -e 's/unknown node .*/unknown node/' |
|
337 | hg branches 2>&1 | sed -e 's/unknown node .*/unknown node/' | |
338 | hg qpop 2>&1 | sed -e 's/unknown node .*/unknown node/' |
|
338 | hg qpop 2>&1 | sed -e 's/unknown node .*/unknown node/' | |
339 |
|
339 | |||
340 | cat >>$HGRCPATH <<EOF |
|
340 | cat >>$HGRCPATH <<EOF | |
341 | [diff] |
|
341 | [diff] | |
342 | git = True |
|
342 | git = True | |
343 | EOF |
|
343 | EOF | |
344 | cd .. |
|
344 | cd .. | |
345 | hg init git |
|
345 | hg init git | |
346 | cd git |
|
346 | cd git | |
347 | hg qinit |
|
347 | hg qinit | |
348 |
|
348 | |||
349 | hg qnew -m'new file' new |
|
349 | hg qnew -m'new file' new | |
350 | echo foo > new |
|
350 | echo foo > new | |
351 | chmod +x new |
|
351 | chmod +x new | |
352 | hg add new |
|
352 | hg add new | |
353 | hg qrefresh |
|
353 | hg qrefresh | |
354 | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ |
|
354 | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ | |
355 | -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" .hg/patches/new |
|
355 | -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" .hg/patches/new | |
356 |
|
356 | |||
357 | hg qnew -m'copy file' copy |
|
357 | hg qnew -m'copy file' copy | |
358 | hg cp new copy |
|
358 | hg cp new copy | |
359 | hg qrefresh |
|
359 | hg qrefresh | |
360 | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ |
|
360 | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ | |
361 | -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" .hg/patches/copy |
|
361 | -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" .hg/patches/copy | |
362 |
|
362 | |||
363 | hg qpop |
|
363 | hg qpop | |
364 | hg qpush |
|
364 | hg qpush | |
365 | hg qdiff |
|
365 | hg qdiff | |
366 | cat >>$HGRCPATH <<EOF |
|
366 | cat >>$HGRCPATH <<EOF | |
367 | [diff] |
|
367 | [diff] | |
368 | git = False |
|
368 | git = False | |
369 | EOF |
|
369 | EOF | |
370 | hg qdiff --git |
|
370 | hg qdiff --git | |
|
371 | cd .. | |||
371 |
|
372 | |||
372 | cd .. |
|
373 | echo % test file addition in slow path | |
373 | hg init slow |
|
374 | hg init slow | |
374 | cd slow |
|
375 | cd slow | |
375 | hg qinit |
|
376 | hg qinit | |
376 | echo foo > foo |
|
377 | echo foo > foo | |
377 | hg add foo |
|
378 | hg add foo | |
378 | hg ci -m 'add foo' |
|
379 | hg ci -m 'add foo' | |
379 | hg qnew bar |
|
380 | hg qnew bar | |
380 | echo bar > bar |
|
381 | echo bar > bar | |
381 | hg add bar |
|
382 | hg add bar | |
382 | hg mv foo baz |
|
383 | hg mv foo baz | |
383 | hg qrefresh --git |
|
384 | hg qrefresh --git | |
384 | hg up -C 0 |
|
385 | hg up -C 0 | |
385 | echo >> foo |
|
386 | echo >> foo | |
386 | hg ci -m 'change foo' |
|
387 | hg ci -m 'change foo' | |
387 | hg up -C 1 |
|
388 | hg up -C 1 | |
388 | hg qrefresh --git 2>&1 | grep -v 'saving bundle' |
|
389 | hg qrefresh --git 2>&1 | grep -v 'saving bundle' | |
389 | cat .hg/patches/bar |
|
390 | cat .hg/patches/bar | |
390 | hg log -v --template '{rev} {file_copies}\n' -r . |
|
391 | hg log -v --template '{rev} {file_copies}\n' -r . | |
391 | hg qrefresh --git |
|
392 | hg qrefresh --git | |
392 | cat .hg/patches/bar |
|
393 | cat .hg/patches/bar | |
393 | hg log -v --template '{rev} {file_copies}\n' -r . |
|
394 | hg log -v --template '{rev} {file_copies}\n' -r . | |
394 | hg qrefresh |
|
395 | hg qrefresh | |
395 | grep 'diff --git' .hg/patches/bar |
|
396 | grep 'diff --git' .hg/patches/bar | |
396 |
|
397 | |||
397 | echo |
|
398 | echo % test file move chains in the slow path | |
398 | hg up -C 1 |
|
399 | hg up -C 1 | |
399 | echo >> foo |
|
400 | echo >> foo | |
400 | hg ci -m 'change foo again' |
|
401 | hg ci -m 'change foo again' | |
401 | hg up -C 2 |
|
402 | hg up -C 2 | |
402 | hg mv bar quux |
|
403 | hg mv bar quux | |
403 | hg mv baz bleh |
|
404 | hg mv baz bleh | |
404 | hg qrefresh --git 2>&1 | grep -v 'saving bundle' |
|
405 | hg qrefresh --git 2>&1 | grep -v 'saving bundle' | |
405 | cat .hg/patches/bar |
|
406 | cat .hg/patches/bar | |
406 | hg log -v --template '{rev} {file_copies}\n' -r . |
|
407 | hg log -v --template '{rev} {file_copies}\n' -r . | |
407 | hg mv quux fred |
|
408 | hg mv quux fred | |
408 | hg mv bleh barney |
|
409 | hg mv bleh barney | |
409 | hg qrefresh --git |
|
410 | hg qrefresh --git | |
410 | cat .hg/patches/bar |
|
411 | cat .hg/patches/bar | |
411 | hg log -v --template '{rev} {file_copies}\n' -r . |
|
412 | hg log -v --template '{rev} {file_copies}\n' -r . | |
412 |
|
413 | |||
413 | echo % refresh omitting an added file |
|
414 | echo % refresh omitting an added file | |
414 | hg qnew baz |
|
415 | hg qnew baz | |
415 | echo newfile > newfile |
|
416 | echo newfile > newfile | |
416 | hg add newfile |
|
417 | hg add newfile | |
417 | hg qrefresh |
|
418 | hg qrefresh | |
418 | hg st -A newfile |
|
419 | hg st -A newfile | |
419 | hg qrefresh -X newfile |
|
420 | hg qrefresh -X newfile | |
420 | hg st -A newfile |
|
421 | hg st -A newfile | |
421 | hg revert newfile |
|
422 | hg revert newfile | |
422 | rm newfile |
|
423 | rm newfile | |
423 | hg qpop |
|
424 | hg qpop | |
424 | hg qdel baz |
|
425 | hg qdel baz | |
425 |
|
426 | |||
426 | echo % create a git patch |
|
427 | echo % create a git patch | |
427 | echo a > alexander |
|
428 | echo a > alexander | |
428 | hg add alexander |
|
429 | hg add alexander | |
429 | hg qnew -f --git addalexander |
|
430 | hg qnew -f --git addalexander | |
430 | grep diff .hg/patches/addalexander |
|
431 | grep diff .hg/patches/addalexander | |
431 |
|
432 | |||
432 | echo % create a git binary patch |
|
433 | echo % create a git binary patch | |
433 | cat > writebin.py <<EOF |
|
434 | cat > writebin.py <<EOF | |
434 | import sys |
|
435 | import sys | |
435 | path = sys.argv[1] |
|
436 | path = sys.argv[1] | |
436 | open(path, 'wb').write('BIN\x00ARY') |
|
437 | open(path, 'wb').write('BIN\x00ARY') | |
437 | EOF |
|
438 | EOF | |
438 | python writebin.py bucephalus |
|
439 | python writebin.py bucephalus | |
439 |
|
440 | |||
440 | python "$TESTDIR/md5sum.py" bucephalus |
|
441 | python "$TESTDIR/md5sum.py" bucephalus | |
441 | hg add bucephalus |
|
442 | hg add bucephalus | |
442 | hg qnew -f --git addbucephalus |
|
443 | hg qnew -f --git addbucephalus | |
443 | grep diff .hg/patches/addbucephalus |
|
444 | grep diff .hg/patches/addbucephalus | |
444 |
|
445 | |||
445 | echo % check binary patches can be popped and pushed |
|
446 | echo % check binary patches can be popped and pushed | |
446 | hg qpop |
|
447 | hg qpop | |
447 | test -f bucephalus && echo % bucephalus should not be there |
|
448 | test -f bucephalus && echo % bucephalus should not be there | |
448 | hg qpush |
|
449 | hg qpush | |
449 | test -f bucephalus || echo % bucephalus should be there |
|
450 | test -f bucephalus || echo % bucephalus should be there | |
450 | python "$TESTDIR/md5sum.py" bucephalus |
|
451 | python "$TESTDIR/md5sum.py" bucephalus | |
451 |
|
452 | |||
452 |
|
453 | |||
453 | echo '% strip again' |
|
454 | echo '% strip again' | |
454 | cd .. |
|
455 | cd .. | |
455 | hg init strip |
|
456 | hg init strip | |
456 | cd strip |
|
457 | cd strip | |
457 | touch foo |
|
458 | touch foo | |
458 | hg add foo |
|
459 | hg add foo | |
459 | hg ci -m 'add foo' |
|
460 | hg ci -m 'add foo' | |
460 | echo >> foo |
|
461 | echo >> foo | |
461 | hg ci -m 'change foo 1' |
|
462 | hg ci -m 'change foo 1' | |
462 | hg up -C 0 |
|
463 | hg up -C 0 | |
463 | echo 1 >> foo |
|
464 | echo 1 >> foo | |
464 | hg ci -m 'change foo 2' |
|
465 | hg ci -m 'change foo 2' | |
465 | HGMERGE=true hg merge |
|
466 | HGMERGE=true hg merge | |
466 | hg ci -m merge |
|
467 | hg ci -m merge | |
467 | hg log |
|
468 | hg log | |
468 | hg strip 1 2>&1 | sed 's/\(saving bundle to \).*/\1/' |
|
469 | hg strip 1 2>&1 | sed 's/\(saving bundle to \).*/\1/' | |
469 | checkundo strip |
|
470 | checkundo strip | |
470 | hg log |
|
471 | hg log | |
471 | cd .. |
|
472 | cd .. | |
472 |
|
473 | |||
473 | echo '% qclone' |
|
474 | echo '% qclone' | |
474 | qlog() |
|
475 | qlog() | |
475 | { |
|
476 | { | |
476 | echo 'main repo:' |
|
477 | echo 'main repo:' | |
477 | hg log --template ' rev {rev}: {desc}\n' |
|
478 | hg log --template ' rev {rev}: {desc}\n' | |
478 | echo 'patch repo:' |
|
479 | echo 'patch repo:' | |
479 | hg -R .hg/patches log --template ' rev {rev}: {desc}\n' |
|
480 | hg -R .hg/patches log --template ' rev {rev}: {desc}\n' | |
480 | } |
|
481 | } | |
481 | hg init qclonesource |
|
482 | hg init qclonesource | |
482 | cd qclonesource |
|
483 | cd qclonesource | |
483 | echo foo > foo |
|
484 | echo foo > foo | |
484 | hg add foo |
|
485 | hg add foo | |
485 | hg ci -m 'add foo' |
|
486 | hg ci -m 'add foo' | |
486 | hg qinit |
|
487 | hg qinit | |
487 | hg qnew patch1 |
|
488 | hg qnew patch1 | |
488 | echo bar >> foo |
|
489 | echo bar >> foo | |
489 | hg qrefresh -m 'change foo' |
|
490 | hg qrefresh -m 'change foo' | |
490 | cd .. |
|
491 | cd .. | |
491 |
|
492 | |||
492 | # repo with unversioned patch dir |
|
493 | # repo with unversioned patch dir | |
493 | hg qclone qclonesource failure |
|
494 | hg qclone qclonesource failure | |
494 |
|
495 | |||
495 | cd qclonesource |
|
496 | cd qclonesource | |
496 | hg qinit -c |
|
497 | hg qinit -c | |
497 | hg qci -m checkpoint |
|
498 | hg qci -m checkpoint | |
498 | qlog |
|
499 | qlog | |
499 | cd .. |
|
500 | cd .. | |
500 |
|
501 | |||
501 | # repo with patches applied |
|
502 | # repo with patches applied | |
502 | hg qclone qclonesource qclonedest |
|
503 | hg qclone qclonesource qclonedest | |
503 | cd qclonedest |
|
504 | cd qclonedest | |
504 | qlog |
|
505 | qlog | |
505 | cd .. |
|
506 | cd .. | |
506 |
|
507 | |||
507 | # repo with patches unapplied |
|
508 | # repo with patches unapplied | |
508 | cd qclonesource |
|
509 | cd qclonesource | |
509 | hg qpop -a |
|
510 | hg qpop -a | |
510 | qlog |
|
511 | qlog | |
511 | cd .. |
|
512 | cd .. | |
512 | hg qclone qclonesource qclonedest2 |
|
513 | hg qclone qclonesource qclonedest2 | |
513 | cd qclonedest2 |
|
514 | cd qclonedest2 | |
514 | qlog |
|
515 | qlog | |
515 | cd .. |
|
516 | cd .. | |
516 |
|
517 | |||
517 | echo % 'test applying on an empty file (issue 1033)' |
|
518 | echo % 'test applying on an empty file (issue 1033)' | |
518 | hg init empty |
|
519 | hg init empty | |
519 | cd empty |
|
520 | cd empty | |
520 | touch a |
|
521 | touch a | |
521 | hg ci -Am addempty |
|
522 | hg ci -Am addempty | |
522 | echo a > a |
|
523 | echo a > a | |
523 | hg qnew -f -e changea |
|
524 | hg qnew -f -e changea | |
524 | hg qpop |
|
525 | hg qpop | |
525 | hg qpush |
|
526 | hg qpush | |
526 | cd .. |
|
527 | cd .. | |
527 |
|
528 | |||
528 | echo % test qpush with --force, issue1087 |
|
529 | echo % test qpush with --force, issue1087 | |
529 | hg init forcepush |
|
530 | hg init forcepush | |
530 | cd forcepush |
|
531 | cd forcepush | |
531 | echo hello > hello.txt |
|
532 | echo hello > hello.txt | |
532 | echo bye > bye.txt |
|
533 | echo bye > bye.txt | |
533 | hg ci -Ama |
|
534 | hg ci -Ama | |
534 | hg qnew -d '0 0' empty |
|
535 | hg qnew -d '0 0' empty | |
535 | hg qpop |
|
536 | hg qpop | |
536 | echo world >> hello.txt |
|
537 | echo world >> hello.txt | |
537 |
|
538 | |||
538 | echo % qpush should fail, local changes |
|
539 | echo % qpush should fail, local changes | |
539 | hg qpush |
|
540 | hg qpush | |
540 |
|
541 | |||
541 | echo % apply force, should not discard changes with empty patch |
|
542 | echo % apply force, should not discard changes with empty patch | |
542 | hg qpush -f 2>&1 | sed 's,^.*/patch,patch,g' |
|
543 | hg qpush -f 2>&1 | sed 's,^.*/patch,patch,g' | |
543 | hg diff --config diff.nodates=True |
|
544 | hg diff --config diff.nodates=True | |
544 | hg qdiff --config diff.nodates=True |
|
545 | hg qdiff --config diff.nodates=True | |
545 | hg log -l1 -p |
|
546 | hg log -l1 -p | |
546 | hg qref -d '0 0' |
|
547 | hg qref -d '0 0' | |
547 | hg qpop |
|
548 | hg qpop | |
548 | echo universe >> hello.txt |
|
549 | echo universe >> hello.txt | |
549 | echo universe >> bye.txt |
|
550 | echo universe >> bye.txt | |
550 |
|
551 | |||
551 | echo % qpush should fail, local changes |
|
552 | echo % qpush should fail, local changes | |
552 | hg qpush |
|
553 | hg qpush | |
553 |
|
554 | |||
554 | echo % apply force, should discard changes in hello, but not bye |
|
555 | echo % apply force, should discard changes in hello, but not bye | |
555 | hg qpush -f |
|
556 | hg qpush -f | |
556 | hg st |
|
557 | hg st | |
557 | hg diff --config diff.nodates=True |
|
558 | hg diff --config diff.nodates=True | |
558 | hg qdiff --config diff.nodates=True |
|
559 | hg qdiff --config diff.nodates=True | |
559 |
|
560 | |||
560 | echo % test popping revisions not in working dir ancestry |
|
561 | echo % test popping revisions not in working dir ancestry | |
561 | hg qseries -v |
|
562 | hg qseries -v | |
562 | hg up qparent |
|
563 | hg up qparent | |
563 | hg qpop |
|
564 | hg qpop | |
564 |
|
565 | |||
565 | cd .. |
|
566 | cd .. | |
566 | hg init deletion-order |
|
567 | hg init deletion-order | |
567 | cd deletion-order |
|
568 | cd deletion-order | |
568 |
|
569 | |||
569 | touch a |
|
570 | touch a | |
570 | hg ci -Aqm0 |
|
571 | hg ci -Aqm0 | |
571 |
|
572 | |||
572 | hg qnew rename-dir |
|
573 | hg qnew rename-dir | |
573 | hg rm a |
|
574 | hg rm a | |
574 | hg qrefresh |
|
575 | hg qrefresh | |
575 |
|
576 | |||
576 | mkdir a b |
|
577 | mkdir a b | |
577 | touch a/a b/b |
|
578 | touch a/a b/b | |
578 | hg add -q a b |
|
579 | hg add -q a b | |
579 | hg qrefresh |
|
580 | hg qrefresh | |
580 |
|
581 | |||
581 | echo % test popping must remove files added in subdirectories first |
|
582 | echo % test popping must remove files added in subdirectories first | |
582 | hg qpop |
|
583 | hg qpop | |
583 | cd .. |
|
584 | cd .. |
@@ -1,617 +1,618 b'' | |||||
1 | % help |
|
1 | % help | |
2 | mq extension - manage a stack of patches |
|
2 | mq extension - manage a stack of patches | |
3 |
|
3 | |||
4 | This extension lets you work with a stack of patches in a Mercurial |
|
4 | This extension lets you work with a stack of patches in a Mercurial | |
5 | repository. It manages two stacks of patches - all known patches, and applied |
|
5 | repository. It manages two stacks of patches - all known patches, and applied | |
6 | patches (subset of known patches). |
|
6 | patches (subset of known patches). | |
7 |
|
7 | |||
8 | Known patches are represented as patch files in the .hg/patches directory. |
|
8 | Known patches are represented as patch files in the .hg/patches directory. | |
9 | Applied patches are both patch files and changesets. |
|
9 | Applied patches are both patch files and changesets. | |
10 |
|
10 | |||
11 | Common tasks (use "hg help command" for more details): |
|
11 | Common tasks (use "hg help command" for more details): | |
12 |
|
12 | |||
13 | prepare repository to work with patches qinit |
|
13 | prepare repository to work with patches qinit | |
14 | create new patch qnew |
|
14 | create new patch qnew | |
15 | import existing patch qimport |
|
15 | import existing patch qimport | |
16 |
|
16 | |||
17 | print patch series qseries |
|
17 | print patch series qseries | |
18 | print applied patches qapplied |
|
18 | print applied patches qapplied | |
19 |
|
19 | |||
20 | add known patch to applied stack qpush |
|
20 | add known patch to applied stack qpush | |
21 | remove patch from applied stack qpop |
|
21 | remove patch from applied stack qpop | |
22 | refresh contents of top applied patch qrefresh |
|
22 | refresh contents of top applied patch qrefresh | |
23 |
|
23 | |||
24 | list of commands: |
|
24 | list of commands: | |
25 |
|
25 | |||
26 | qapplied print the patches already applied |
|
26 | qapplied print the patches already applied | |
27 | qclone clone main and patch repository at same time |
|
27 | qclone clone main and patch repository at same time | |
28 | qcommit commit changes in the queue repository |
|
28 | qcommit commit changes in the queue repository | |
29 | qdelete remove patches from queue |
|
29 | qdelete remove patches from queue | |
30 | qdiff diff of the current patch and subsequent modifications |
|
30 | qdiff diff of the current patch and subsequent modifications | |
31 | qfinish move applied patches into repository history |
|
31 | qfinish move applied patches into repository history | |
32 | qfold fold the named patches into the current patch |
|
32 | qfold fold the named patches into the current patch | |
33 | qgoto push or pop patches until named patch is at top of stack |
|
33 | qgoto push or pop patches until named patch is at top of stack | |
34 | qguard set or print guards for a patch |
|
34 | qguard set or print guards for a patch | |
35 | qheader print the header of the topmost or specified patch |
|
35 | qheader print the header of the topmost or specified patch | |
36 | qimport import a patch |
|
36 | qimport import a patch | |
37 | qinit init a new queue repository |
|
37 | qinit init a new queue repository | |
38 | qnew create a new patch |
|
38 | qnew create a new patch | |
39 | qnext print the name of the next patch |
|
39 | qnext print the name of the next patch | |
40 | qpop pop the current patch off the stack |
|
40 | qpop pop the current patch off the stack | |
41 | qprev print the name of the previous patch |
|
41 | qprev print the name of the previous patch | |
42 | qpush push the next patch onto the stack |
|
42 | qpush push the next patch onto the stack | |
43 | qrefresh update the current patch |
|
43 | qrefresh update the current patch | |
44 | qrename rename a patch |
|
44 | qrename rename a patch | |
45 | qrestore restore the queue state saved by a revision |
|
45 | qrestore restore the queue state saved by a revision | |
46 | qsave save current queue state |
|
46 | qsave save current queue state | |
47 | qselect set or print guarded patches to push |
|
47 | qselect set or print guarded patches to push | |
48 | qseries print the entire series file |
|
48 | qseries print the entire series file | |
49 | qtop print the name of the current patch |
|
49 | qtop print the name of the current patch | |
50 | qunapplied print the patches not yet applied |
|
50 | qunapplied print the patches not yet applied | |
51 | strip strip a revision and all its descendants from the repository |
|
51 | strip strip a revision and all its descendants from the repository | |
52 |
|
52 | |||
53 | use "hg -v help mq" to show aliases and global options |
|
53 | use "hg -v help mq" to show aliases and global options | |
54 | adding a |
|
54 | adding a | |
55 | updating to branch default |
|
55 | updating to branch default | |
56 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
56 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
57 | adding b/z |
|
57 | adding b/z | |
58 | % qinit |
|
58 | % qinit | |
59 | % -R qinit |
|
59 | % -R qinit | |
60 | % qinit -c |
|
60 | % qinit -c | |
61 | A .hgignore |
|
61 | A .hgignore | |
62 | A series |
|
62 | A series | |
63 | % qinit; qinit -c |
|
63 | % qinit; qinit -c | |
64 | .hgignore: |
|
64 | .hgignore: | |
65 | ^\.hg |
|
65 | ^\.hg | |
66 | ^\.mq |
|
66 | ^\.mq | |
67 | syntax: glob |
|
67 | syntax: glob | |
68 | status |
|
68 | status | |
69 | guards |
|
69 | guards | |
70 | series: |
|
70 | series: | |
71 | abort: repository already exists! |
|
71 | abort: repository already exists! | |
72 | % qinit; <stuff>; qinit -c |
|
72 | % qinit; <stuff>; qinit -c | |
73 | adding .hg/patches/A |
|
73 | adding .hg/patches/A | |
74 | adding .hg/patches/B |
|
74 | adding .hg/patches/B | |
75 | A .hgignore |
|
75 | A .hgignore | |
76 | A A |
|
76 | A A | |
77 | A B |
|
77 | A B | |
78 | A series |
|
78 | A series | |
79 | .hgignore: |
|
79 | .hgignore: | |
80 | status |
|
80 | status | |
81 | bleh |
|
81 | bleh | |
82 | series: |
|
82 | series: | |
83 | A |
|
83 | A | |
84 | B |
|
84 | B | |
85 | % qrefresh |
|
85 | % qrefresh | |
86 | foo bar |
|
86 | foo bar | |
87 |
|
87 | |||
88 | diff -r xa |
|
88 | diff -r xa | |
89 | --- a/a |
|
89 | --- a/a | |
90 | +++ b/a |
|
90 | +++ b/a | |
91 | @@ -1,1 +1,2 @@ |
|
91 | @@ -1,1 +1,2 @@ | |
92 | a |
|
92 | a | |
93 | +a |
|
93 | +a | |
94 | % empty qrefresh |
|
94 | % empty qrefresh | |
95 | revision: |
|
95 | revision: | |
96 | patch: |
|
96 | patch: | |
97 | foo bar |
|
97 | foo bar | |
98 |
|
98 | |||
99 | working dir diff: |
|
99 | working dir diff: | |
100 | --- a/a |
|
100 | --- a/a | |
101 | +++ b/a |
|
101 | +++ b/a | |
102 | @@ -1,1 +1,2 @@ |
|
102 | @@ -1,1 +1,2 @@ | |
103 | a |
|
103 | a | |
104 | +a |
|
104 | +a | |
105 | % qpop |
|
105 | % qpop | |
106 | popping test.patch |
|
106 | popping test.patch | |
107 | patch queue now empty |
|
107 | patch queue now empty | |
108 | % qpush with dump of tag cache |
|
108 | % qpush with dump of tag cache | |
109 | .hg/tags.cache (pre qpush): |
|
109 | .hg/tags.cache (pre qpush): | |
110 | 1 |
|
110 | 1 | |
111 |
|
111 | |||
112 | applying test.patch |
|
112 | applying test.patch | |
113 | now at: test.patch |
|
113 | now at: test.patch | |
114 | .hg/tags.cache (post qpush): |
|
114 | .hg/tags.cache (post qpush): | |
115 | 2 |
|
115 | 2 | |
116 |
|
116 | |||
117 | % pop/push outside repo |
|
117 | % pop/push outside repo | |
118 | popping test.patch |
|
118 | popping test.patch | |
119 | patch queue now empty |
|
119 | patch queue now empty | |
120 | applying test.patch |
|
120 | applying test.patch | |
121 | now at: test.patch |
|
121 | now at: test.patch | |
122 | % qrefresh in subdir |
|
122 | % qrefresh in subdir | |
123 | % pop/push -a in subdir |
|
123 | % pop/push -a in subdir | |
124 | popping test2.patch |
|
124 | popping test2.patch | |
125 | popping test.patch |
|
125 | popping test.patch | |
126 | patch queue now empty |
|
126 | patch queue now empty | |
127 | applying test.patch |
|
127 | applying test.patch | |
128 | applying test2.patch |
|
128 | applying test2.patch | |
129 | now at: test2.patch |
|
129 | now at: test2.patch | |
130 | % qseries |
|
130 | % qseries | |
131 | test.patch |
|
131 | test.patch | |
132 | test2.patch |
|
132 | test2.patch | |
133 | 0 A test.patch: f... |
|
133 | 0 A test.patch: f... | |
134 | 1 A test2.patch: |
|
134 | 1 A test2.patch: | |
135 | popping test2.patch |
|
135 | popping test2.patch | |
136 | now at: test.patch |
|
136 | now at: test.patch | |
137 | 0 A test.patch: foo bar |
|
137 | 0 A test.patch: foo bar | |
138 | 1 U test2.patch: |
|
138 | 1 U test2.patch: | |
139 | applying test2.patch |
|
139 | applying test2.patch | |
140 | now at: test2.patch |
|
140 | now at: test2.patch | |
141 | % qapplied |
|
141 | % qapplied | |
142 | test.patch |
|
142 | test.patch | |
143 | test2.patch |
|
143 | test2.patch | |
144 | % qtop |
|
144 | % qtop | |
145 | test2.patch |
|
145 | test2.patch | |
146 | % prev |
|
146 | % prev | |
147 | test.patch |
|
147 | test.patch | |
148 | % next |
|
148 | % next | |
149 | all patches applied |
|
149 | all patches applied | |
150 | popping test2.patch |
|
150 | popping test2.patch | |
151 | now at: test.patch |
|
151 | now at: test.patch | |
152 | % commit should fail |
|
152 | % commit should fail | |
153 | abort: cannot commit over an applied mq patch |
|
153 | abort: cannot commit over an applied mq patch | |
154 | % push should fail |
|
154 | % push should fail | |
155 | pushing to ../../k |
|
155 | pushing to ../../k | |
156 | abort: source has mq patches applied |
|
156 | abort: source has mq patches applied | |
157 | % import should fail |
|
157 | % import should fail | |
158 | abort: cannot import over an applied patch |
|
158 | abort: cannot import over an applied patch | |
159 | % import --no-commit should succeed |
|
159 | % import --no-commit should succeed | |
160 | applying ../../import.diff |
|
160 | applying ../../import.diff | |
161 | M a |
|
161 | M a | |
162 | % qunapplied |
|
162 | % qunapplied | |
163 | test2.patch |
|
163 | test2.patch | |
164 | % qpush/qpop with index |
|
164 | % qpush/qpop with index | |
165 | applying test2.patch |
|
165 | applying test2.patch | |
166 | now at: test2.patch |
|
166 | now at: test2.patch | |
167 | popping test2.patch |
|
167 | popping test2.patch | |
168 | popping test1b.patch |
|
168 | popping test1b.patch | |
169 | now at: test.patch |
|
169 | now at: test.patch | |
170 | applying test1b.patch |
|
170 | applying test1b.patch | |
171 | now at: test1b.patch |
|
171 | now at: test1b.patch | |
172 | applying test2.patch |
|
172 | applying test2.patch | |
173 | now at: test2.patch |
|
173 | now at: test2.patch | |
174 | popping test2.patch |
|
174 | popping test2.patch | |
175 | now at: test1b.patch |
|
175 | now at: test1b.patch | |
176 | popping test1b.patch |
|
176 | popping test1b.patch | |
177 | now at: test.patch |
|
177 | now at: test.patch | |
178 | applying test1b.patch |
|
178 | applying test1b.patch | |
179 | applying test2.patch |
|
179 | applying test2.patch | |
180 | now at: test2.patch |
|
180 | now at: test2.patch | |
181 | % pop, qapplied, qunapplied |
|
181 | % pop, qapplied, qunapplied | |
182 | 0 A test.patch |
|
182 | 0 A test.patch | |
183 | 1 A test1b.patch |
|
183 | 1 A test1b.patch | |
184 | 2 A test2.patch |
|
184 | 2 A test2.patch | |
185 | % qapplied -1 test.patch |
|
185 | % qapplied -1 test.patch | |
186 | only one patch applied |
|
186 | only one patch applied | |
187 | % qapplied -1 test1b.patch |
|
187 | % qapplied -1 test1b.patch | |
188 | test.patch |
|
188 | test.patch | |
189 | % qapplied -1 test2.patch |
|
189 | % qapplied -1 test2.patch | |
190 | test1b.patch |
|
190 | test1b.patch | |
191 | % qapplied -1 |
|
191 | % qapplied -1 | |
192 | test1b.patch |
|
192 | test1b.patch | |
193 | % qapplied |
|
193 | % qapplied | |
194 | test.patch |
|
194 | test.patch | |
195 | test1b.patch |
|
195 | test1b.patch | |
196 | test2.patch |
|
196 | test2.patch | |
197 | % qapplied test1b.patch |
|
197 | % qapplied test1b.patch | |
198 | test.patch |
|
198 | test.patch | |
199 | test1b.patch |
|
199 | test1b.patch | |
200 | % qunapplied -1 |
|
200 | % qunapplied -1 | |
201 | all patches applied |
|
201 | all patches applied | |
202 | % qunapplied |
|
202 | % qunapplied | |
203 | % popping |
|
203 | % popping | |
204 | popping test2.patch |
|
204 | popping test2.patch | |
205 | now at: test1b.patch |
|
205 | now at: test1b.patch | |
206 | % qunapplied -1 |
|
206 | % qunapplied -1 | |
207 | test2.patch |
|
207 | test2.patch | |
208 | % qunapplied |
|
208 | % qunapplied | |
209 | test2.patch |
|
209 | test2.patch | |
210 | % qunapplied test2.patch |
|
210 | % qunapplied test2.patch | |
211 | % qunapplied -1 test2.patch |
|
211 | % qunapplied -1 test2.patch | |
212 | all patches applied |
|
212 | all patches applied | |
213 | % popping -a |
|
213 | % popping -a | |
214 | popping test1b.patch |
|
214 | popping test1b.patch | |
215 | popping test.patch |
|
215 | popping test.patch | |
216 | patch queue now empty |
|
216 | patch queue now empty | |
217 | % qapplied |
|
217 | % qapplied | |
218 | % qapplied -1 |
|
218 | % qapplied -1 | |
219 | no patches applied |
|
219 | no patches applied | |
220 | applying test.patch |
|
220 | applying test.patch | |
221 | now at: test.patch |
|
221 | now at: test.patch | |
222 | % push should succeed |
|
222 | % push should succeed | |
223 | popping test.patch |
|
223 | popping test.patch | |
224 | patch queue now empty |
|
224 | patch queue now empty | |
225 | pushing to ../../k |
|
225 | pushing to ../../k | |
226 | searching for changes |
|
226 | searching for changes | |
227 | adding changesets |
|
227 | adding changesets | |
228 | adding manifests |
|
228 | adding manifests | |
229 | adding file changes |
|
229 | adding file changes | |
230 | added 1 changesets with 1 changes to 1 files |
|
230 | added 1 changesets with 1 changes to 1 files | |
231 | % qpush/qpop error codes |
|
231 | % qpush/qpop error codes | |
232 | applying test.patch |
|
232 | applying test.patch | |
233 | applying test1b.patch |
|
233 | applying test1b.patch | |
234 | applying test2.patch |
|
234 | applying test2.patch | |
235 | now at: test2.patch |
|
235 | now at: test2.patch | |
236 | % pops all patches and succeeds |
|
236 | % pops all patches and succeeds | |
237 | popping test2.patch |
|
237 | popping test2.patch | |
238 | popping test1b.patch |
|
238 | popping test1b.patch | |
239 | popping test.patch |
|
239 | popping test.patch | |
240 | patch queue now empty |
|
240 | patch queue now empty | |
241 | qpop -a succeeds |
|
241 | qpop -a succeeds | |
242 | % does nothing and succeeds |
|
242 | % does nothing and succeeds | |
243 | no patches applied |
|
243 | no patches applied | |
244 | qpop -a succeeds |
|
244 | qpop -a succeeds | |
245 | % fails - nothing else to pop |
|
245 | % fails - nothing else to pop | |
246 | no patches applied |
|
246 | no patches applied | |
247 | qpop fails |
|
247 | qpop fails | |
248 | % pushes a patch and succeeds |
|
248 | % pushes a patch and succeeds | |
249 | applying test.patch |
|
249 | applying test.patch | |
250 | now at: test.patch |
|
250 | now at: test.patch | |
251 | qpush succeeds |
|
251 | qpush succeeds | |
252 | % pops a patch and succeeds |
|
252 | % pops a patch and succeeds | |
253 | popping test.patch |
|
253 | popping test.patch | |
254 | patch queue now empty |
|
254 | patch queue now empty | |
255 | qpop succeeds |
|
255 | qpop succeeds | |
256 | % pushes up to test1b.patch and succeeds |
|
256 | % pushes up to test1b.patch and succeeds | |
257 | applying test.patch |
|
257 | applying test.patch | |
258 | applying test1b.patch |
|
258 | applying test1b.patch | |
259 | now at: test1b.patch |
|
259 | now at: test1b.patch | |
260 | qpush test1b.patch succeeds |
|
260 | qpush test1b.patch succeeds | |
261 | % does nothing and succeeds |
|
261 | % does nothing and succeeds | |
262 | qpush: test1b.patch is already at the top |
|
262 | qpush: test1b.patch is already at the top | |
263 | qpush test1b.patch succeeds |
|
263 | qpush test1b.patch succeeds | |
264 | % does nothing and succeeds |
|
264 | % does nothing and succeeds | |
265 | qpop: test1b.patch is already at the top |
|
265 | qpop: test1b.patch is already at the top | |
266 | qpop test1b.patch succeeds |
|
266 | qpop test1b.patch succeeds | |
267 | % fails - can't push to this patch |
|
267 | % fails - can't push to this patch | |
268 | abort: cannot push to a previous patch: test.patch |
|
268 | abort: cannot push to a previous patch: test.patch | |
269 | qpush test.patch fails |
|
269 | qpush test.patch fails | |
270 | % fails - can't pop to this patch |
|
270 | % fails - can't pop to this patch | |
271 | abort: patch test2.patch is not applied |
|
271 | abort: patch test2.patch is not applied | |
272 | qpop test2.patch fails |
|
272 | qpop test2.patch fails | |
273 | % pops up to test.patch and succeeds |
|
273 | % pops up to test.patch and succeeds | |
274 | popping test1b.patch |
|
274 | popping test1b.patch | |
275 | now at: test.patch |
|
275 | now at: test.patch | |
276 | qpop test.patch succeeds |
|
276 | qpop test.patch succeeds | |
277 | % pushes all patches and succeeds |
|
277 | % pushes all patches and succeeds | |
278 | applying test1b.patch |
|
278 | applying test1b.patch | |
279 | applying test2.patch |
|
279 | applying test2.patch | |
280 | now at: test2.patch |
|
280 | now at: test2.patch | |
281 | qpush -a succeeds |
|
281 | qpush -a succeeds | |
282 | % does nothing and succeeds |
|
282 | % does nothing and succeeds | |
283 | all patches are currently applied |
|
283 | all patches are currently applied | |
284 | qpush -a succeeds |
|
284 | qpush -a succeeds | |
285 | % fails - nothing else to push |
|
285 | % fails - nothing else to push | |
286 | patch series already fully applied |
|
286 | patch series already fully applied | |
287 | qpush fails |
|
287 | qpush fails | |
288 | % does nothing and succeeds |
|
288 | % does nothing and succeeds | |
289 | qpush: test2.patch is already at the top |
|
289 | qpush: test2.patch is already at the top | |
290 | qpush test2.patch succeeds |
|
290 | qpush test2.patch succeeds | |
291 | % strip |
|
291 | % strip | |
292 | adding x |
|
292 | adding x | |
293 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
293 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
294 | saving bundle to |
|
294 | saving bundle to | |
295 | adding changesets |
|
295 | adding changesets | |
296 | adding manifests |
|
296 | adding manifests | |
297 | adding file changes |
|
297 | adding file changes | |
298 | added 1 changesets with 1 changes to 1 files |
|
298 | added 1 changesets with 1 changes to 1 files | |
299 | (run 'hg update' to get a working copy) |
|
299 | (run 'hg update' to get a working copy) | |
300 | % strip with local changes, should complain |
|
300 | % strip with local changes, should complain | |
301 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
301 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
302 | abort: local changes found |
|
302 | abort: local changes found | |
303 | % --force strip with local changes |
|
303 | % --force strip with local changes | |
304 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
304 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
305 | saving bundle to |
|
305 | saving bundle to | |
306 | % cd b; hg qrefresh |
|
306 | % cd b; hg qrefresh | |
307 | adding a |
|
307 | adding a | |
308 | foo |
|
308 | foo | |
309 |
|
309 | |||
310 | diff -r cb9a9f314b8b a |
|
310 | diff -r cb9a9f314b8b a | |
311 | --- a/a |
|
311 | --- a/a | |
312 | +++ b/a |
|
312 | +++ b/a | |
313 | @@ -1,1 +1,2 @@ |
|
313 | @@ -1,1 +1,2 @@ | |
314 | a |
|
314 | a | |
315 | +a |
|
315 | +a | |
316 | diff -r cb9a9f314b8b b/f |
|
316 | diff -r cb9a9f314b8b b/f | |
317 | --- /dev/null |
|
317 | --- /dev/null | |
318 | +++ b/b/f |
|
318 | +++ b/b/f | |
319 | @@ -0,0 +1,1 @@ |
|
319 | @@ -0,0 +1,1 @@ | |
320 | +f |
|
320 | +f | |
321 | % hg qrefresh . |
|
321 | % hg qrefresh . | |
322 | foo |
|
322 | foo | |
323 |
|
323 | |||
324 | diff -r cb9a9f314b8b b/f |
|
324 | diff -r cb9a9f314b8b b/f | |
325 | --- /dev/null |
|
325 | --- /dev/null | |
326 | +++ b/b/f |
|
326 | +++ b/b/f | |
327 | @@ -0,0 +1,1 @@ |
|
327 | @@ -0,0 +1,1 @@ | |
328 | +f |
|
328 | +f | |
329 | M a |
|
329 | M a | |
330 | % qpush failure |
|
330 | % qpush failure | |
331 | popping bar |
|
331 | popping bar | |
332 | popping foo |
|
332 | popping foo | |
333 | patch queue now empty |
|
333 | patch queue now empty | |
334 | applying foo |
|
334 | applying foo | |
335 | applying bar |
|
335 | applying bar | |
336 | file foo already exists |
|
336 | file foo already exists | |
337 | 1 out of 1 hunks FAILED -- saving rejects to file foo.rej |
|
337 | 1 out of 1 hunks FAILED -- saving rejects to file foo.rej | |
338 | patch failed, unable to continue (try -v) |
|
338 | patch failed, unable to continue (try -v) | |
339 | patch failed, rejects left in working dir |
|
339 | patch failed, rejects left in working dir | |
340 | errors during apply, please fix and refresh bar |
|
340 | errors during apply, please fix and refresh bar | |
341 | ? foo |
|
341 | ? foo | |
342 | ? foo.rej |
|
342 | ? foo.rej | |
343 | % mq tags |
|
343 | % mq tags | |
344 | 0 qparent |
|
344 | 0 qparent | |
345 | 1 qbase foo |
|
345 | 1 qbase foo | |
346 | 2 qtip bar tip |
|
346 | 2 qtip bar tip | |
347 | % bad node in status |
|
347 | % bad node in status | |
348 | popping bar |
|
348 | popping bar | |
349 | now at: foo |
|
349 | now at: foo | |
350 | changeset: 0:cb9a9f314b8b |
|
350 | changeset: 0:cb9a9f314b8b | |
351 | mq status file refers to unknown node |
|
351 | mq status file refers to unknown node | |
352 | tag: tip |
|
352 | tag: tip | |
353 | user: test |
|
353 | user: test | |
354 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
354 | date: Thu Jan 01 00:00:00 1970 +0000 | |
355 | summary: a |
|
355 | summary: a | |
356 |
|
356 | |||
357 | mq status file refers to unknown node |
|
357 | mq status file refers to unknown node | |
358 | default 0:cb9a9f314b8b |
|
358 | default 0:cb9a9f314b8b | |
359 | abort: trying to pop unknown node |
|
359 | abort: trying to pop unknown node | |
360 | new file |
|
360 | new file | |
361 |
|
361 | |||
362 | diff --git a/new b/new |
|
362 | diff --git a/new b/new | |
363 | new file mode 100755 |
|
363 | new file mode 100755 | |
364 | --- /dev/null |
|
364 | --- /dev/null | |
365 | +++ b/new |
|
365 | +++ b/new | |
366 | @@ -0,0 +1,1 @@ |
|
366 | @@ -0,0 +1,1 @@ | |
367 | +foo |
|
367 | +foo | |
368 | copy file |
|
368 | copy file | |
369 |
|
369 | |||
370 | diff --git a/new b/copy |
|
370 | diff --git a/new b/copy | |
371 | copy from new |
|
371 | copy from new | |
372 | copy to copy |
|
372 | copy to copy | |
373 | popping copy |
|
373 | popping copy | |
374 | now at: new |
|
374 | now at: new | |
375 | applying copy |
|
375 | applying copy | |
376 | now at: copy |
|
376 | now at: copy | |
377 | diff --git a/new b/copy |
|
377 | diff --git a/new b/copy | |
378 | copy from new |
|
378 | copy from new | |
379 | copy to copy |
|
379 | copy to copy | |
380 | diff --git a/new b/copy |
|
380 | diff --git a/new b/copy | |
381 | copy from new |
|
381 | copy from new | |
382 | copy to copy |
|
382 | copy to copy | |
|
383 | % test file addition in slow path | |||
383 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
384 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
384 | created new head |
|
385 | created new head | |
385 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
386 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
386 | popping bar |
|
387 | popping bar | |
387 | adding branch |
|
388 | adding branch | |
388 | adding changesets |
|
389 | adding changesets | |
389 | adding manifests |
|
390 | adding manifests | |
390 | adding file changes |
|
391 | adding file changes | |
391 | added 1 changesets with 1 changes to 1 files |
|
392 | added 1 changesets with 1 changes to 1 files | |
392 | patch queue now empty |
|
393 | patch queue now empty | |
393 | (working directory not at a head) |
|
394 | (working directory not at a head) | |
394 | applying bar |
|
395 | applying bar | |
395 | now at: bar |
|
396 | now at: bar | |
396 | diff --git a/bar b/bar |
|
397 | diff --git a/bar b/bar | |
397 | new file mode 100644 |
|
398 | new file mode 100644 | |
398 | --- /dev/null |
|
399 | --- /dev/null | |
399 | +++ b/bar |
|
400 | +++ b/bar | |
400 | @@ -0,0 +1,1 @@ |
|
401 | @@ -0,0 +1,1 @@ | |
401 | +bar |
|
402 | +bar | |
402 | diff --git a/foo b/baz |
|
403 | diff --git a/foo b/baz | |
403 | rename from foo |
|
404 | rename from foo | |
404 | rename to baz |
|
405 | rename to baz | |
405 | 2 baz (foo) |
|
406 | 2 baz (foo) | |
406 | diff --git a/bar b/bar |
|
407 | diff --git a/bar b/bar | |
407 | new file mode 100644 |
|
408 | new file mode 100644 | |
408 | --- /dev/null |
|
409 | --- /dev/null | |
409 | +++ b/bar |
|
410 | +++ b/bar | |
410 | @@ -0,0 +1,1 @@ |
|
411 | @@ -0,0 +1,1 @@ | |
411 | +bar |
|
412 | +bar | |
412 | diff --git a/foo b/baz |
|
413 | diff --git a/foo b/baz | |
413 | rename from foo |
|
414 | rename from foo | |
414 | rename to baz |
|
415 | rename to baz | |
415 | 2 baz (foo) |
|
416 | 2 baz (foo) | |
416 | diff --git a/bar b/bar |
|
417 | diff --git a/bar b/bar | |
417 | diff --git a/foo b/baz |
|
418 | diff --git a/foo b/baz | |
418 |
|
419 | % test file move chains in the slow path | ||
419 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
420 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
420 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
421 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
421 | popping bar |
|
422 | popping bar | |
422 | adding branch |
|
423 | adding branch | |
423 | adding changesets |
|
424 | adding changesets | |
424 | adding manifests |
|
425 | adding manifests | |
425 | adding file changes |
|
426 | adding file changes | |
426 | added 1 changesets with 1 changes to 1 files |
|
427 | added 1 changesets with 1 changes to 1 files | |
427 | patch queue now empty |
|
428 | patch queue now empty | |
428 | (working directory not at a head) |
|
429 | (working directory not at a head) | |
429 | applying bar |
|
430 | applying bar | |
430 | now at: bar |
|
431 | now at: bar | |
431 | diff --git a/foo b/bleh |
|
432 | diff --git a/foo b/bleh | |
432 | rename from foo |
|
433 | rename from foo | |
433 | rename to bleh |
|
434 | rename to bleh | |
434 | diff --git a/quux b/quux |
|
435 | diff --git a/quux b/quux | |
435 | new file mode 100644 |
|
436 | new file mode 100644 | |
436 | --- /dev/null |
|
437 | --- /dev/null | |
437 | +++ b/quux |
|
438 | +++ b/quux | |
438 | @@ -0,0 +1,1 @@ |
|
439 | @@ -0,0 +1,1 @@ | |
439 | +bar |
|
440 | +bar | |
440 | 3 bleh (foo) |
|
441 | 3 bleh (foo) | |
441 | diff --git a/foo b/barney |
|
442 | diff --git a/foo b/barney | |
442 | rename from foo |
|
443 | rename from foo | |
443 | rename to barney |
|
444 | rename to barney | |
444 | diff --git a/fred b/fred |
|
445 | diff --git a/fred b/fred | |
445 | new file mode 100644 |
|
446 | new file mode 100644 | |
446 | --- /dev/null |
|
447 | --- /dev/null | |
447 | +++ b/fred |
|
448 | +++ b/fred | |
448 | @@ -0,0 +1,1 @@ |
|
449 | @@ -0,0 +1,1 @@ | |
449 | +bar |
|
450 | +bar | |
450 | 3 barney (foo) |
|
451 | 3 barney (foo) | |
451 | % refresh omitting an added file |
|
452 | % refresh omitting an added file | |
452 | C newfile |
|
453 | C newfile | |
453 | A newfile |
|
454 | A newfile | |
454 | popping baz |
|
455 | popping baz | |
455 | now at: bar |
|
456 | now at: bar | |
456 | % create a git patch |
|
457 | % create a git patch | |
457 | diff --git a/alexander b/alexander |
|
458 | diff --git a/alexander b/alexander | |
458 | % create a git binary patch |
|
459 | % create a git binary patch | |
459 | 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus |
|
460 | 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus | |
460 | diff --git a/bucephalus b/bucephalus |
|
461 | diff --git a/bucephalus b/bucephalus | |
461 | % check binary patches can be popped and pushed |
|
462 | % check binary patches can be popped and pushed | |
462 | popping addbucephalus |
|
463 | popping addbucephalus | |
463 | now at: addalexander |
|
464 | now at: addalexander | |
464 | applying addbucephalus |
|
465 | applying addbucephalus | |
465 | now at: addbucephalus |
|
466 | now at: addbucephalus | |
466 | 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus |
|
467 | 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus | |
467 | % strip again |
|
468 | % strip again | |
468 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
469 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
469 | created new head |
|
470 | created new head | |
470 | merging foo |
|
471 | merging foo | |
471 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
472 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
472 | (branch merge, don't forget to commit) |
|
473 | (branch merge, don't forget to commit) | |
473 | changeset: 3:99615015637b |
|
474 | changeset: 3:99615015637b | |
474 | tag: tip |
|
475 | tag: tip | |
475 | parent: 2:20cbbe65cff7 |
|
476 | parent: 2:20cbbe65cff7 | |
476 | parent: 1:d2871fc282d4 |
|
477 | parent: 1:d2871fc282d4 | |
477 | user: test |
|
478 | user: test | |
478 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
479 | date: Thu Jan 01 00:00:00 1970 +0000 | |
479 | summary: merge |
|
480 | summary: merge | |
480 |
|
481 | |||
481 | changeset: 2:20cbbe65cff7 |
|
482 | changeset: 2:20cbbe65cff7 | |
482 | parent: 0:53245c60e682 |
|
483 | parent: 0:53245c60e682 | |
483 | user: test |
|
484 | user: test | |
484 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
485 | date: Thu Jan 01 00:00:00 1970 +0000 | |
485 | summary: change foo 2 |
|
486 | summary: change foo 2 | |
486 |
|
487 | |||
487 | changeset: 1:d2871fc282d4 |
|
488 | changeset: 1:d2871fc282d4 | |
488 | user: test |
|
489 | user: test | |
489 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
490 | date: Thu Jan 01 00:00:00 1970 +0000 | |
490 | summary: change foo 1 |
|
491 | summary: change foo 1 | |
491 |
|
492 | |||
492 | changeset: 0:53245c60e682 |
|
493 | changeset: 0:53245c60e682 | |
493 | user: test |
|
494 | user: test | |
494 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
495 | date: Thu Jan 01 00:00:00 1970 +0000 | |
495 | summary: add foo |
|
496 | summary: add foo | |
496 |
|
497 | |||
497 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
498 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
498 | saving bundle to |
|
499 | saving bundle to | |
499 | saving bundle to |
|
500 | saving bundle to | |
500 | adding branch |
|
501 | adding branch | |
501 | adding changesets |
|
502 | adding changesets | |
502 | adding manifests |
|
503 | adding manifests | |
503 | adding file changes |
|
504 | adding file changes | |
504 | added 1 changesets with 1 changes to 1 files |
|
505 | added 1 changesets with 1 changes to 1 files | |
505 | changeset: 1:20cbbe65cff7 |
|
506 | changeset: 1:20cbbe65cff7 | |
506 | tag: tip |
|
507 | tag: tip | |
507 | user: test |
|
508 | user: test | |
508 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
509 | date: Thu Jan 01 00:00:00 1970 +0000 | |
509 | summary: change foo 2 |
|
510 | summary: change foo 2 | |
510 |
|
511 | |||
511 | changeset: 0:53245c60e682 |
|
512 | changeset: 0:53245c60e682 | |
512 | user: test |
|
513 | user: test | |
513 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
514 | date: Thu Jan 01 00:00:00 1970 +0000 | |
514 | summary: add foo |
|
515 | summary: add foo | |
515 |
|
516 | |||
516 | % qclone |
|
517 | % qclone | |
517 | abort: versioned patch repository not found (see qinit -c) |
|
518 | abort: versioned patch repository not found (see qinit -c) | |
518 | adding .hg/patches/patch1 |
|
519 | adding .hg/patches/patch1 | |
519 | main repo: |
|
520 | main repo: | |
520 | rev 1: change foo |
|
521 | rev 1: change foo | |
521 | rev 0: add foo |
|
522 | rev 0: add foo | |
522 | patch repo: |
|
523 | patch repo: | |
523 | rev 0: checkpoint |
|
524 | rev 0: checkpoint | |
524 | updating to branch default |
|
525 | updating to branch default | |
525 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
526 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
526 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
527 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
527 | main repo: |
|
528 | main repo: | |
528 | rev 0: add foo |
|
529 | rev 0: add foo | |
529 | patch repo: |
|
530 | patch repo: | |
530 | rev 0: checkpoint |
|
531 | rev 0: checkpoint | |
531 | popping patch1 |
|
532 | popping patch1 | |
532 | patch queue now empty |
|
533 | patch queue now empty | |
533 | main repo: |
|
534 | main repo: | |
534 | rev 0: add foo |
|
535 | rev 0: add foo | |
535 | patch repo: |
|
536 | patch repo: | |
536 | rev 0: checkpoint |
|
537 | rev 0: checkpoint | |
537 | updating to branch default |
|
538 | updating to branch default | |
538 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
539 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
539 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
540 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
540 | main repo: |
|
541 | main repo: | |
541 | rev 0: add foo |
|
542 | rev 0: add foo | |
542 | patch repo: |
|
543 | patch repo: | |
543 | rev 0: checkpoint |
|
544 | rev 0: checkpoint | |
544 | % test applying on an empty file (issue 1033) |
|
545 | % test applying on an empty file (issue 1033) | |
545 | adding a |
|
546 | adding a | |
546 | popping changea |
|
547 | popping changea | |
547 | patch queue now empty |
|
548 | patch queue now empty | |
548 | applying changea |
|
549 | applying changea | |
549 | now at: changea |
|
550 | now at: changea | |
550 | % test qpush with --force, issue1087 |
|
551 | % test qpush with --force, issue1087 | |
551 | adding bye.txt |
|
552 | adding bye.txt | |
552 | adding hello.txt |
|
553 | adding hello.txt | |
553 | popping empty |
|
554 | popping empty | |
554 | patch queue now empty |
|
555 | patch queue now empty | |
555 | % qpush should fail, local changes |
|
556 | % qpush should fail, local changes | |
556 | abort: local changes found, refresh first |
|
557 | abort: local changes found, refresh first | |
557 | % apply force, should not discard changes with empty patch |
|
558 | % apply force, should not discard changes with empty patch | |
558 | applying empty |
|
559 | applying empty | |
559 | patch empty is empty |
|
560 | patch empty is empty | |
560 | now at: empty |
|
561 | now at: empty | |
561 | diff -r bf5fc3f07a0a hello.txt |
|
562 | diff -r bf5fc3f07a0a hello.txt | |
562 | --- a/hello.txt |
|
563 | --- a/hello.txt | |
563 | +++ b/hello.txt |
|
564 | +++ b/hello.txt | |
564 | @@ -1,1 +1,2 @@ |
|
565 | @@ -1,1 +1,2 @@ | |
565 | hello |
|
566 | hello | |
566 | +world |
|
567 | +world | |
567 | diff -r 9ecee4f634e3 hello.txt |
|
568 | diff -r 9ecee4f634e3 hello.txt | |
568 | --- a/hello.txt |
|
569 | --- a/hello.txt | |
569 | +++ b/hello.txt |
|
570 | +++ b/hello.txt | |
570 | @@ -1,1 +1,2 @@ |
|
571 | @@ -1,1 +1,2 @@ | |
571 | hello |
|
572 | hello | |
572 | +world |
|
573 | +world | |
573 | changeset: 1:bf5fc3f07a0a |
|
574 | changeset: 1:bf5fc3f07a0a | |
574 | tag: qtip |
|
575 | tag: qtip | |
575 | tag: tip |
|
576 | tag: tip | |
576 | tag: empty |
|
577 | tag: empty | |
577 | tag: qbase |
|
578 | tag: qbase | |
578 | user: test |
|
579 | user: test | |
579 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
580 | date: Thu Jan 01 00:00:00 1970 +0000 | |
580 | summary: imported patch empty |
|
581 | summary: imported patch empty | |
581 |
|
582 | |||
582 |
|
583 | |||
583 | popping empty |
|
584 | popping empty | |
584 | patch queue now empty |
|
585 | patch queue now empty | |
585 | % qpush should fail, local changes |
|
586 | % qpush should fail, local changes | |
586 | abort: local changes found, refresh first |
|
587 | abort: local changes found, refresh first | |
587 | % apply force, should discard changes in hello, but not bye |
|
588 | % apply force, should discard changes in hello, but not bye | |
588 | applying empty |
|
589 | applying empty | |
589 | now at: empty |
|
590 | now at: empty | |
590 | M bye.txt |
|
591 | M bye.txt | |
591 | diff -r ba252371dbc1 bye.txt |
|
592 | diff -r ba252371dbc1 bye.txt | |
592 | --- a/bye.txt |
|
593 | --- a/bye.txt | |
593 | +++ b/bye.txt |
|
594 | +++ b/bye.txt | |
594 | @@ -1,1 +1,2 @@ |
|
595 | @@ -1,1 +1,2 @@ | |
595 | bye |
|
596 | bye | |
596 | +universe |
|
597 | +universe | |
597 | diff -r 9ecee4f634e3 bye.txt |
|
598 | diff -r 9ecee4f634e3 bye.txt | |
598 | --- a/bye.txt |
|
599 | --- a/bye.txt | |
599 | +++ b/bye.txt |
|
600 | +++ b/bye.txt | |
600 | @@ -1,1 +1,2 @@ |
|
601 | @@ -1,1 +1,2 @@ | |
601 | bye |
|
602 | bye | |
602 | +universe |
|
603 | +universe | |
603 | diff -r 9ecee4f634e3 hello.txt |
|
604 | diff -r 9ecee4f634e3 hello.txt | |
604 | --- a/hello.txt |
|
605 | --- a/hello.txt | |
605 | +++ b/hello.txt |
|
606 | +++ b/hello.txt | |
606 | @@ -1,1 +1,3 @@ |
|
607 | @@ -1,1 +1,3 @@ | |
607 | hello |
|
608 | hello | |
608 | +world |
|
609 | +world | |
609 | +universe |
|
610 | +universe | |
610 | % test popping revisions not in working dir ancestry |
|
611 | % test popping revisions not in working dir ancestry | |
611 | 0 A empty |
|
612 | 0 A empty | |
612 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
613 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
613 | popping empty |
|
614 | popping empty | |
614 | patch queue now empty |
|
615 | patch queue now empty | |
615 | % test popping must remove files added in subdirectories first |
|
616 | % test popping must remove files added in subdirectories first | |
616 | popping rename-dir |
|
617 | popping rename-dir | |
617 | patch queue now empty |
|
618 | patch queue now empty |
General Comments 0
You need to be logged in to leave comments.
Login now