Show More
@@ -1,1485 +1,1485 b'' | |||||
1 | $ "$TESTDIR/hghave" execbit || exit 80 |
|
1 | $ "$TESTDIR/hghave" execbit || exit 80 | |
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 "[mq]" >> $HGRCPATH |
|
13 | $ echo "[mq]" >> $HGRCPATH | |
14 | $ echo "plain=true" >> $HGRCPATH |
|
14 | $ echo "plain=true" >> $HGRCPATH | |
15 |
|
15 | |||
16 |
|
16 | |||
17 | help |
|
17 | help | |
18 |
|
18 | |||
19 | $ hg help mq |
|
19 | $ hg help mq | |
20 | mq extension - manage a stack of patches |
|
20 | mq extension - manage a stack of patches | |
21 |
|
21 | |||
22 | This extension lets you work with a stack of patches in a Mercurial |
|
22 | This extension lets you work with a stack of patches in a Mercurial | |
23 | repository. It manages two stacks of patches - all known patches, and applied |
|
23 | repository. It manages two stacks of patches - all known patches, and applied | |
24 | patches (subset of known patches). |
|
24 | patches (subset of known patches). | |
25 |
|
25 | |||
26 | Known patches are represented as patch files in the .hg/patches directory. |
|
26 | Known patches are represented as patch files in the .hg/patches directory. | |
27 | Applied patches are both patch files and changesets. |
|
27 | Applied patches are both patch files and changesets. | |
28 |
|
28 | |||
29 | Common tasks (use "hg help command" for more details): |
|
29 | Common tasks (use "hg help command" for more details): | |
30 |
|
30 | |||
31 | create new patch qnew |
|
31 | create new patch qnew | |
32 | import existing patch qimport |
|
32 | import existing patch qimport | |
33 |
|
33 | |||
34 | print patch series qseries |
|
34 | print patch series qseries | |
35 | print applied patches qapplied |
|
35 | print applied patches qapplied | |
36 |
|
36 | |||
37 | add known patch to applied stack qpush |
|
37 | add known patch to applied stack qpush | |
38 | remove patch from applied stack qpop |
|
38 | remove patch from applied stack qpop | |
39 | refresh contents of top applied patch qrefresh |
|
39 | refresh contents of top applied patch qrefresh | |
40 |
|
40 | |||
41 | By default, mq will automatically use git patches when required to avoid |
|
41 | By default, mq will automatically use git patches when required to avoid | |
42 | losing file mode changes, copy records, binary files or empty files creations |
|
42 | losing file mode changes, copy records, binary files or empty files creations | |
43 | or deletions. This behaviour can be configured with: |
|
43 | or deletions. This behaviour can be configured with: | |
44 |
|
44 | |||
45 | [mq] |
|
45 | [mq] | |
46 | git = auto/keep/yes/no |
|
46 | git = auto/keep/yes/no | |
47 |
|
47 | |||
48 | If set to 'keep', mq will obey the [diff] section configuration while |
|
48 | If set to 'keep', mq will obey the [diff] section configuration while | |
49 | preserving existing git patches upon qrefresh. If set to 'yes' or 'no', mq |
|
49 | preserving existing git patches upon qrefresh. If set to 'yes' or 'no', mq | |
50 | will override the [diff] section and always generate git or regular patches, |
|
50 | will override the [diff] section and always generate git or regular patches, | |
51 | possibly losing data in the second case. |
|
51 | possibly losing data in the second case. | |
52 |
|
52 | |||
53 | It may be desirable for mq changesets to be kept in the secret phase (see "hg |
|
53 | It may be desirable for mq changesets to be kept in the secret phase (see "hg | |
54 | help phases"), which can be enabled with the following setting: |
|
54 | help phases"), which can be enabled with the following setting: | |
55 |
|
55 | |||
56 | [mq] |
|
56 | [mq] | |
57 | secret = True |
|
57 | secret = True | |
58 |
|
58 | |||
59 | You will by default be managing a patch queue named "patches". You can create |
|
59 | You will by default be managing a patch queue named "patches". You can create | |
60 | other, independent patch queues with the "hg qqueue" command. |
|
60 | other, independent patch queues with the "hg qqueue" command. | |
61 |
|
61 | |||
62 | list of commands: |
|
62 | list of commands: | |
63 |
|
63 | |||
64 | qapplied print the patches already applied |
|
64 | qapplied print the patches already applied | |
65 | qclone clone main and patch repository at same time |
|
65 | qclone clone main and patch repository at same time | |
66 | qdelete remove patches from queue |
|
66 | qdelete remove patches from queue | |
67 | qdiff diff of the current patch and subsequent modifications |
|
67 | qdiff diff of the current patch and subsequent modifications | |
68 | qfinish move applied patches into repository history |
|
68 | qfinish move applied patches into repository history | |
69 | qfold fold the named patches into the current patch |
|
69 | qfold fold the named patches into the current patch | |
70 | qgoto push or pop patches until named patch is at top of stack |
|
70 | qgoto push or pop patches until named patch is at top of stack | |
71 | qguard set or print guards for a patch |
|
71 | qguard set or print guards for a patch | |
72 | qheader print the header of the topmost or specified patch |
|
72 | qheader print the header of the topmost or specified patch | |
73 | qimport import a patch |
|
73 | qimport import a patch | |
74 | qnew create a new patch |
|
74 | qnew create a new patch | |
75 | qnext print the name of the next patch |
|
75 | qnext print the name of the next patch | |
76 | qpop pop the current patch off the stack |
|
76 | qpop pop the current patch off the stack | |
77 | qprev print the name of the previous patch |
|
77 | qprev print the name of the previous patch | |
78 | qpush push the next patch onto the stack |
|
78 | qpush push the next patch onto the stack | |
79 | qqueue manage multiple patch queues |
|
79 | qqueue manage multiple patch queues | |
80 | qrefresh update the current patch |
|
80 | qrefresh update the current patch | |
81 | qrename rename a patch |
|
81 | qrename rename a patch | |
82 | qselect set or print guarded patches to push |
|
82 | qselect set or print guarded patches to push | |
83 | qseries print the entire series file |
|
83 | qseries print the entire series file | |
84 | qtop print the name of the current patch |
|
84 | qtop print the name of the current patch | |
85 | qunapplied print the patches not yet applied |
|
85 | qunapplied print the patches not yet applied | |
86 | strip strip changesets and all their descendants from the repository |
|
86 | strip strip changesets and all their descendants from the repository | |
87 |
|
87 | |||
88 | use "hg -v help mq" to show builtin aliases and global options |
|
88 | use "hg -v help mq" to show builtin aliases and global options | |
89 |
|
89 | |||
90 | $ hg init a |
|
90 | $ hg init a | |
91 | $ cd a |
|
91 | $ cd a | |
92 | $ echo a > a |
|
92 | $ echo a > a | |
93 | $ hg ci -Ama |
|
93 | $ hg ci -Ama | |
94 | adding a |
|
94 | adding a | |
95 |
|
95 | |||
96 | $ hg clone . ../k |
|
96 | $ hg clone . ../k | |
97 | updating to branch default |
|
97 | updating to branch default | |
98 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
98 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
99 |
|
99 | |||
100 | $ mkdir b |
|
100 | $ mkdir b | |
101 | $ echo z > b/z |
|
101 | $ echo z > b/z | |
102 | $ hg ci -Ama |
|
102 | $ hg ci -Ama | |
103 | adding b/z |
|
103 | adding b/z | |
104 |
|
104 | |||
105 |
|
105 | |||
106 | qinit |
|
106 | qinit | |
107 |
|
107 | |||
108 | $ hg qinit |
|
108 | $ hg qinit | |
109 |
|
109 | |||
110 | $ cd .. |
|
110 | $ cd .. | |
111 | $ hg init b |
|
111 | $ hg init b | |
112 |
|
112 | |||
113 |
|
113 | |||
114 | -R qinit |
|
114 | -R qinit | |
115 |
|
115 | |||
116 | $ hg -R b qinit |
|
116 | $ hg -R b qinit | |
117 |
|
117 | |||
118 | $ hg init c |
|
118 | $ hg init c | |
119 |
|
119 | |||
120 |
|
120 | |||
121 | qinit -c |
|
121 | qinit -c | |
122 |
|
122 | |||
123 | $ hg --cwd c qinit -c |
|
123 | $ hg --cwd c qinit -c | |
124 | $ hg -R c/.hg/patches st |
|
124 | $ hg -R c/.hg/patches st | |
125 | A .hgignore |
|
125 | A .hgignore | |
126 | A series |
|
126 | A series | |
127 |
|
127 | |||
128 |
|
128 | |||
129 | qinit; qinit -c |
|
129 | qinit; qinit -c | |
130 |
|
130 | |||
131 | $ hg init d |
|
131 | $ hg init d | |
132 | $ cd d |
|
132 | $ cd d | |
133 | $ hg qinit |
|
133 | $ hg qinit | |
134 | $ hg qinit -c |
|
134 | $ hg qinit -c | |
135 |
|
135 | |||
136 | qinit -c should create both files if they don't exist |
|
136 | qinit -c should create both files if they don't exist | |
137 |
|
137 | |||
138 | $ cat .hg/patches/.hgignore |
|
138 | $ cat .hg/patches/.hgignore | |
139 | ^\.hg |
|
139 | ^\.hg | |
140 | ^\.mq |
|
140 | ^\.mq | |
141 | syntax: glob |
|
141 | syntax: glob | |
142 | status |
|
142 | status | |
143 | guards |
|
143 | guards | |
144 | $ cat .hg/patches/series |
|
144 | $ cat .hg/patches/series | |
145 | $ hg qinit -c |
|
145 | $ hg qinit -c | |
146 | abort: repository $TESTTMP/d/.hg/patches already exists! (glob) |
|
146 | abort: repository $TESTTMP/d/.hg/patches already exists! (glob) | |
147 | [255] |
|
147 | [255] | |
148 | $ cd .. |
|
148 | $ cd .. | |
149 |
|
149 | |||
150 | $ echo '% qinit; <stuff>; qinit -c' |
|
150 | $ echo '% qinit; <stuff>; qinit -c' | |
151 | % qinit; <stuff>; qinit -c |
|
151 | % qinit; <stuff>; qinit -c | |
152 | $ hg init e |
|
152 | $ hg init e | |
153 | $ cd e |
|
153 | $ cd e | |
154 | $ hg qnew A |
|
154 | $ hg qnew A | |
155 | $ checkundo qnew |
|
155 | $ checkundo qnew | |
156 | $ echo foo > foo |
|
156 | $ echo foo > foo | |
157 | $ hg phase -r qbase |
|
157 | $ hg phase -r qbase | |
158 | 0: draft |
|
158 | 0: draft | |
159 | $ hg add foo |
|
159 | $ hg add foo | |
160 | $ hg qrefresh |
|
160 | $ hg qrefresh | |
161 | $ hg phase -r qbase |
|
161 | $ hg phase -r qbase | |
162 | 0: draft |
|
162 | 0: draft | |
163 | $ hg qnew B |
|
163 | $ hg qnew B | |
164 | $ echo >> foo |
|
164 | $ echo >> foo | |
165 | $ hg qrefresh |
|
165 | $ hg qrefresh | |
166 | $ echo status >> .hg/patches/.hgignore |
|
166 | $ echo status >> .hg/patches/.hgignore | |
167 | $ echo bleh >> .hg/patches/.hgignore |
|
167 | $ echo bleh >> .hg/patches/.hgignore | |
168 | $ hg qinit -c |
|
168 | $ hg qinit -c | |
169 | adding .hg/patches/A (glob) |
|
169 | adding .hg/patches/A (glob) | |
170 | adding .hg/patches/B (glob) |
|
170 | adding .hg/patches/B (glob) | |
171 | $ hg -R .hg/patches status |
|
171 | $ hg -R .hg/patches status | |
172 | A .hgignore |
|
172 | A .hgignore | |
173 | A A |
|
173 | A A | |
174 | A B |
|
174 | A B | |
175 | A series |
|
175 | A series | |
176 |
|
176 | |||
177 | qinit -c shouldn't touch these files if they already exist |
|
177 | qinit -c shouldn't touch these files if they already exist | |
178 |
|
178 | |||
179 | $ cat .hg/patches/.hgignore |
|
179 | $ cat .hg/patches/.hgignore | |
180 | status |
|
180 | status | |
181 | bleh |
|
181 | bleh | |
182 | $ cat .hg/patches/series |
|
182 | $ cat .hg/patches/series | |
183 | A |
|
183 | A | |
184 | B |
|
184 | B | |
185 |
|
185 | |||
186 | add an untracked file |
|
186 | add an untracked file | |
187 |
|
187 | |||
188 | $ echo >> .hg/patches/flaf |
|
188 | $ echo >> .hg/patches/flaf | |
189 |
|
189 | |||
190 | status --mq with color (issue2096) |
|
190 | status --mq with color (issue2096) | |
191 |
|
191 | |||
192 | $ hg status --mq --config extensions.color= --config color.mode=ansi --color=always |
|
192 | $ hg status --mq --config extensions.color= --config color.mode=ansi --color=always | |
193 | \x1b[0;32;1mA .hgignore\x1b[0m (esc) |
|
193 | \x1b[0;32;1mA .hgignore\x1b[0m (esc) | |
194 | \x1b[0;32;1mA A\x1b[0m (esc) |
|
194 | \x1b[0;32;1mA A\x1b[0m (esc) | |
195 | \x1b[0;32;1mA B\x1b[0m (esc) |
|
195 | \x1b[0;32;1mA B\x1b[0m (esc) | |
196 | \x1b[0;32;1mA series\x1b[0m (esc) |
|
196 | \x1b[0;32;1mA series\x1b[0m (esc) | |
197 | \x1b[0;35;1;4m? flaf\x1b[0m (esc) |
|
197 | \x1b[0;35;1;4m? flaf\x1b[0m (esc) | |
198 |
|
198 | |||
199 | try the --mq option on a command provided by an extension |
|
199 | try the --mq option on a command provided by an extension | |
200 |
|
200 | |||
201 | $ hg purge --mq --verbose --config extensions.purge= |
|
201 | $ hg purge --mq --verbose --config extensions.purge= | |
202 | Removing file flaf |
|
202 | Removing file flaf | |
203 |
|
203 | |||
204 | $ cd .. |
|
204 | $ cd .. | |
205 |
|
205 | |||
206 | init --mq without repo |
|
206 | init --mq without repo | |
207 |
|
207 | |||
208 | $ mkdir f |
|
208 | $ mkdir f | |
209 | $ cd f |
|
209 | $ cd f | |
210 | $ hg init --mq |
|
210 | $ hg init --mq | |
211 | abort: there is no Mercurial repository here (.hg not found) |
|
211 | abort: there is no Mercurial repository here (.hg not found) | |
212 | [255] |
|
212 | [255] | |
213 | $ cd .. |
|
213 | $ cd .. | |
214 |
|
214 | |||
215 | init --mq with repo path |
|
215 | init --mq with repo path | |
216 |
|
216 | |||
217 | $ hg init g |
|
217 | $ hg init g | |
218 | $ hg init --mq g |
|
218 | $ hg init --mq g | |
219 | $ test -d g/.hg/patches/.hg |
|
219 | $ test -d g/.hg/patches/.hg | |
220 |
|
220 | |||
221 | init --mq with nonexistent directory |
|
221 | init --mq with nonexistent directory | |
222 |
|
222 | |||
223 | $ hg init --mq nonexistentdir |
|
223 | $ hg init --mq nonexistentdir | |
224 | abort: repository nonexistentdir not found! |
|
224 | abort: repository nonexistentdir not found! | |
225 | [255] |
|
225 | [255] | |
226 |
|
226 | |||
227 |
|
227 | |||
228 | init --mq with bundle (non "local") |
|
228 | init --mq with bundle (non "local") | |
229 |
|
229 | |||
230 | $ hg -R a bundle --all a.bundle >/dev/null |
|
230 | $ hg -R a bundle --all a.bundle >/dev/null | |
231 | $ hg init --mq a.bundle |
|
231 | $ hg init --mq a.bundle | |
232 | abort: only a local queue repository may be initialized |
|
232 | abort: only a local queue repository may be initialized | |
233 | [255] |
|
233 | [255] | |
234 |
|
234 | |||
235 | $ cd a |
|
235 | $ cd a | |
236 |
|
236 | |||
237 | $ hg qnew -m 'foo bar' test.patch |
|
237 | $ hg qnew -m 'foo bar' test.patch | |
238 |
|
238 | |||
239 | $ echo '# comment' > .hg/patches/series.tmp |
|
239 | $ echo '# comment' > .hg/patches/series.tmp | |
240 | $ echo >> .hg/patches/series.tmp # empty line |
|
240 | $ echo >> .hg/patches/series.tmp # empty line | |
241 | $ cat .hg/patches/series >> .hg/patches/series.tmp |
|
241 | $ cat .hg/patches/series >> .hg/patches/series.tmp | |
242 | $ mv .hg/patches/series.tmp .hg/patches/series |
|
242 | $ mv .hg/patches/series.tmp .hg/patches/series | |
243 |
|
243 | |||
244 |
|
244 | |||
245 | qrefresh |
|
245 | qrefresh | |
246 |
|
246 | |||
247 | $ echo a >> a |
|
247 | $ echo a >> a | |
248 | $ hg qrefresh |
|
248 | $ hg qrefresh | |
249 | $ cat .hg/patches/test.patch |
|
249 | $ cat .hg/patches/test.patch | |
250 | foo bar |
|
250 | foo bar | |
251 |
|
251 | |||
252 | diff -r [a-f0-9]* a (re) |
|
252 | diff -r [a-f0-9]* a (re) | |
253 | --- a/a\t(?P<date>.*) (re) |
|
253 | --- a/a\t(?P<date>.*) (re) | |
254 | \+\+\+ b/a\t(?P<date2>.*) (re) |
|
254 | \+\+\+ b/a\t(?P<date2>.*) (re) | |
255 | @@ -1,1 +1,2 @@ |
|
255 | @@ -1,1 +1,2 @@ | |
256 | a |
|
256 | a | |
257 | +a |
|
257 | +a | |
258 |
|
258 | |||
259 | empty qrefresh |
|
259 | empty qrefresh | |
260 |
|
260 | |||
261 | $ hg qrefresh -X a |
|
261 | $ hg qrefresh -X a | |
262 |
|
262 | |||
263 | revision: |
|
263 | revision: | |
264 |
|
264 | |||
265 | $ hg diff -r -2 -r -1 |
|
265 | $ hg diff -r -2 -r -1 | |
266 |
|
266 | |||
267 | patch: |
|
267 | patch: | |
268 |
|
268 | |||
269 | $ cat .hg/patches/test.patch |
|
269 | $ cat .hg/patches/test.patch | |
270 | foo bar |
|
270 | foo bar | |
271 |
|
271 | |||
272 |
|
272 | |||
273 | working dir diff: |
|
273 | working dir diff: | |
274 |
|
274 | |||
275 | $ hg diff --nodates -q |
|
275 | $ hg diff --nodates -q | |
276 | --- a/a |
|
276 | --- a/a | |
277 | +++ b/a |
|
277 | +++ b/a | |
278 | @@ -1,1 +1,2 @@ |
|
278 | @@ -1,1 +1,2 @@ | |
279 | a |
|
279 | a | |
280 | +a |
|
280 | +a | |
281 |
|
281 | |||
282 | restore things |
|
282 | restore things | |
283 |
|
283 | |||
284 | $ hg qrefresh |
|
284 | $ hg qrefresh | |
285 | $ checkundo qrefresh |
|
285 | $ checkundo qrefresh | |
286 |
|
286 | |||
287 |
|
287 | |||
288 | qpop |
|
288 | qpop | |
289 |
|
289 | |||
290 | $ hg qpop |
|
290 | $ hg qpop | |
291 | popping test.patch |
|
291 | popping test.patch | |
292 | patch queue now empty |
|
292 | patch queue now empty | |
293 | $ checkundo qpop |
|
293 | $ checkundo qpop | |
294 |
|
294 | |||
295 |
|
295 | |||
296 | qpush with dump of tag cache |
|
296 | qpush with dump of tag cache | |
297 | Dump the tag cache to ensure that it has exactly one head after qpush. |
|
297 | Dump the tag cache to ensure that it has exactly one head after qpush. | |
298 |
|
298 | |||
299 | $ rm -f .hg/cache/tags |
|
299 | $ rm -f .hg/cache/tags | |
300 | $ hg tags > /dev/null |
|
300 | $ hg tags > /dev/null | |
301 |
|
301 | |||
302 | .hg/cache/tags (pre qpush): |
|
302 | .hg/cache/tags (pre qpush): | |
303 |
|
303 | |||
304 | $ cat .hg/cache/tags |
|
304 | $ cat .hg/cache/tags | |
305 | 1 [\da-f]{40} (re) |
|
305 | 1 [\da-f]{40} (re) | |
306 |
|
306 | |||
307 | $ hg qpush |
|
307 | $ hg qpush | |
308 | applying test.patch |
|
308 | applying test.patch | |
309 | now at: test.patch |
|
309 | now at: test.patch | |
310 | $ hg phase -r qbase |
|
310 | $ hg phase -r qbase | |
311 | 2: draft |
|
311 | 2: draft | |
312 | $ hg tags > /dev/null |
|
312 | $ hg tags > /dev/null | |
313 |
|
313 | |||
314 | .hg/cache/tags (post qpush): |
|
314 | .hg/cache/tags (post qpush): | |
315 |
|
315 | |||
316 | $ cat .hg/cache/tags |
|
316 | $ cat .hg/cache/tags | |
317 | 2 [\da-f]{40} (re) |
|
317 | 2 [\da-f]{40} (re) | |
318 |
|
318 | |||
319 | $ checkundo qpush |
|
319 | $ checkundo qpush | |
320 | $ cd .. |
|
320 | $ cd .. | |
321 |
|
321 | |||
322 |
|
322 | |||
323 | pop/push outside repo |
|
323 | pop/push outside repo | |
324 | $ hg -R a qpop |
|
324 | $ hg -R a qpop | |
325 | popping test.patch |
|
325 | popping test.patch | |
326 | patch queue now empty |
|
326 | patch queue now empty | |
327 | $ hg -R a qpush |
|
327 | $ hg -R a qpush | |
328 | applying test.patch |
|
328 | applying test.patch | |
329 | now at: test.patch |
|
329 | now at: test.patch | |
330 |
|
330 | |||
331 | $ cd a |
|
331 | $ cd a | |
332 | $ hg qnew test2.patch |
|
332 | $ hg qnew test2.patch | |
333 |
|
333 | |||
334 | qrefresh in subdir |
|
334 | qrefresh in subdir | |
335 |
|
335 | |||
336 | $ cd b |
|
336 | $ cd b | |
337 | $ echo a > a |
|
337 | $ echo a > a | |
338 | $ hg add a |
|
338 | $ hg add a | |
339 | $ hg qrefresh |
|
339 | $ hg qrefresh | |
340 |
|
340 | |||
341 | pop/push -a in subdir |
|
341 | pop/push -a in subdir | |
342 |
|
342 | |||
343 | $ hg qpop -a |
|
343 | $ hg qpop -a | |
344 | popping test2.patch |
|
344 | popping test2.patch | |
345 | popping test.patch |
|
345 | popping test.patch | |
346 | patch queue now empty |
|
346 | patch queue now empty | |
347 | $ hg --traceback qpush -a |
|
347 | $ hg --traceback qpush -a | |
348 | applying test.patch |
|
348 | applying test.patch | |
349 | applying test2.patch |
|
349 | applying test2.patch | |
350 | now at: test2.patch |
|
350 | now at: test2.patch | |
351 |
|
351 | |||
352 |
|
352 | |||
353 | setting columns & formatted tests truncating (issue1912) |
|
353 | setting columns & formatted tests truncating (issue1912) | |
354 |
|
354 | |||
355 | $ COLUMNS=4 hg qseries --config ui.formatted=true |
|
355 | $ COLUMNS=4 hg qseries --config ui.formatted=true | |
356 | test.patch |
|
356 | test.patch | |
357 | test2.patch |
|
357 | test2.patch | |
358 | $ COLUMNS=20 hg qseries --config ui.formatted=true -vs |
|
358 | $ COLUMNS=20 hg qseries --config ui.formatted=true -vs | |
359 | 0 A test.patch: f... |
|
359 | 0 A test.patch: f... | |
360 | 1 A test2.patch: |
|
360 | 1 A test2.patch: | |
361 | $ hg qpop |
|
361 | $ hg qpop | |
362 | popping test2.patch |
|
362 | popping test2.patch | |
363 | now at: test.patch |
|
363 | now at: test.patch | |
364 | $ hg qseries -vs |
|
364 | $ hg qseries -vs | |
365 | 0 A test.patch: foo bar |
|
365 | 0 A test.patch: foo bar | |
366 | 1 U test2.patch: |
|
366 | 1 U test2.patch: | |
367 | $ hg sum | grep mq |
|
367 | $ hg sum | grep mq | |
368 | mq: 1 applied, 1 unapplied |
|
368 | mq: 1 applied, 1 unapplied | |
369 | $ hg qpush |
|
369 | $ hg qpush | |
370 | applying test2.patch |
|
370 | applying test2.patch | |
371 | now at: test2.patch |
|
371 | now at: test2.patch | |
372 | $ hg sum | grep mq |
|
372 | $ hg sum | grep mq | |
373 | mq: 2 applied |
|
373 | mq: 2 applied | |
374 | $ hg qapplied |
|
374 | $ hg qapplied | |
375 | test.patch |
|
375 | test.patch | |
376 | test2.patch |
|
376 | test2.patch | |
377 | $ hg qtop |
|
377 | $ hg qtop | |
378 | test2.patch |
|
378 | test2.patch | |
379 |
|
379 | |||
380 |
|
380 | |||
381 | prev |
|
381 | prev | |
382 |
|
382 | |||
383 | $ hg qapp -1 |
|
383 | $ hg qapp -1 | |
384 | test.patch |
|
384 | test.patch | |
385 |
|
385 | |||
386 | next |
|
386 | next | |
387 |
|
387 | |||
388 | $ hg qunapp -1 |
|
388 | $ hg qunapp -1 | |
389 | all patches applied |
|
389 | all patches applied | |
390 | [1] |
|
390 | [1] | |
391 |
|
391 | |||
392 | $ hg qpop |
|
392 | $ hg qpop | |
393 | popping test2.patch |
|
393 | popping test2.patch | |
394 | now at: test.patch |
|
394 | now at: test.patch | |
395 |
|
395 | |||
396 | commit should fail |
|
396 | commit should fail | |
397 |
|
397 | |||
398 | $ hg commit |
|
398 | $ hg commit | |
399 | abort: cannot commit over an applied mq patch |
|
399 | abort: cannot commit over an applied mq patch | |
400 | [255] |
|
400 | [255] | |
401 |
|
401 | |||
402 | push should fail if draft |
|
402 | push should fail if draft | |
403 |
|
403 | |||
404 | $ hg push ../../k |
|
404 | $ hg push ../../k | |
405 | pushing to ../../k |
|
405 | pushing to ../../k | |
406 | abort: source has mq patches applied |
|
406 | abort: source has mq patches applied | |
407 | [255] |
|
407 | [255] | |
408 |
|
408 | |||
409 |
|
409 | |||
410 | import should fail |
|
410 | import should fail | |
411 |
|
411 | |||
412 | $ hg st . |
|
412 | $ hg st . | |
413 | $ echo foo >> ../a |
|
413 | $ echo foo >> ../a | |
414 | $ hg diff > ../../import.diff |
|
414 | $ hg diff > ../../import.diff | |
415 | $ hg revert --no-backup ../a |
|
415 | $ hg revert --no-backup ../a | |
416 | $ hg import ../../import.diff |
|
416 | $ hg import ../../import.diff | |
417 | abort: cannot import over an applied patch |
|
417 | abort: cannot import over an applied patch | |
418 | [255] |
|
418 | [255] | |
419 | $ hg st |
|
419 | $ hg st | |
420 |
|
420 | |||
421 | import --no-commit should succeed |
|
421 | import --no-commit should succeed | |
422 |
|
422 | |||
423 | $ hg import --no-commit ../../import.diff |
|
423 | $ hg import --no-commit ../../import.diff | |
424 | applying ../../import.diff |
|
424 | applying ../../import.diff | |
425 | $ hg st |
|
425 | $ hg st | |
426 | M a |
|
426 | M a | |
427 | $ hg revert --no-backup ../a |
|
427 | $ hg revert --no-backup ../a | |
428 |
|
428 | |||
429 |
|
429 | |||
430 | qunapplied |
|
430 | qunapplied | |
431 |
|
431 | |||
432 | $ hg qunapplied |
|
432 | $ hg qunapplied | |
433 | test2.patch |
|
433 | test2.patch | |
434 |
|
434 | |||
435 |
|
435 | |||
436 | qpush/qpop with index |
|
436 | qpush/qpop with index | |
437 |
|
437 | |||
438 | $ hg qnew test1b.patch |
|
438 | $ hg qnew test1b.patch | |
439 | $ echo 1b > 1b |
|
439 | $ echo 1b > 1b | |
440 | $ hg add 1b |
|
440 | $ hg add 1b | |
441 | $ hg qrefresh |
|
441 | $ hg qrefresh | |
442 | $ hg qpush 2 |
|
442 | $ hg qpush 2 | |
443 | applying test2.patch |
|
443 | applying test2.patch | |
444 | now at: test2.patch |
|
444 | now at: test2.patch | |
445 | $ hg qpop 0 |
|
445 | $ hg qpop 0 | |
446 | popping test2.patch |
|
446 | popping test2.patch | |
447 | popping test1b.patch |
|
447 | popping test1b.patch | |
448 | now at: test.patch |
|
448 | now at: test.patch | |
449 | $ hg qpush test.patch+1 |
|
449 | $ hg qpush test.patch+1 | |
450 | applying test1b.patch |
|
450 | applying test1b.patch | |
451 | now at: test1b.patch |
|
451 | now at: test1b.patch | |
452 | $ hg qpush test.patch+2 |
|
452 | $ hg qpush test.patch+2 | |
453 | applying test2.patch |
|
453 | applying test2.patch | |
454 | now at: test2.patch |
|
454 | now at: test2.patch | |
455 | $ hg qpop test2.patch-1 |
|
455 | $ hg qpop test2.patch-1 | |
456 | popping test2.patch |
|
456 | popping test2.patch | |
457 | now at: test1b.patch |
|
457 | now at: test1b.patch | |
458 | $ hg qpop test2.patch-2 |
|
458 | $ hg qpop test2.patch-2 | |
459 | popping test1b.patch |
|
459 | popping test1b.patch | |
460 | now at: test.patch |
|
460 | now at: test.patch | |
461 | $ hg qpush test1b.patch+1 |
|
461 | $ hg qpush test1b.patch+1 | |
462 | applying test1b.patch |
|
462 | applying test1b.patch | |
463 | applying test2.patch |
|
463 | applying test2.patch | |
464 | now at: test2.patch |
|
464 | now at: test2.patch | |
465 |
|
465 | |||
466 |
|
466 | |||
467 | qpush --move |
|
467 | qpush --move | |
468 |
|
468 | |||
469 | $ hg qpop -a |
|
469 | $ hg qpop -a | |
470 | popping test2.patch |
|
470 | popping test2.patch | |
471 | popping test1b.patch |
|
471 | popping test1b.patch | |
472 | popping test.patch |
|
472 | popping test.patch | |
473 | patch queue now empty |
|
473 | patch queue now empty | |
474 | $ hg qguard test1b.patch -- -negguard |
|
474 | $ hg qguard test1b.patch -- -negguard | |
475 | $ hg qguard test2.patch -- +posguard |
|
475 | $ hg qguard test2.patch -- +posguard | |
476 | $ hg qpush --move test2.patch # can't move guarded patch |
|
476 | $ hg qpush --move test2.patch # can't move guarded patch | |
477 | cannot push 'test2.patch' - guarded by '+posguard' |
|
477 | cannot push 'test2.patch' - guarded by '+posguard' | |
478 | [1] |
|
478 | [1] | |
479 | $ hg qselect posguard |
|
479 | $ hg qselect posguard | |
480 | number of unguarded, unapplied patches has changed from 2 to 3 |
|
480 | number of unguarded, unapplied patches has changed from 2 to 3 | |
481 | $ hg qpush --move test2.patch # move to front |
|
481 | $ hg qpush --move test2.patch # move to front | |
482 | applying test2.patch |
|
482 | applying test2.patch | |
483 | now at: test2.patch |
|
483 | now at: test2.patch | |
484 | $ hg qpush --move test1b.patch # negative guard unselected |
|
484 | $ hg qpush --move test1b.patch # negative guard unselected | |
485 | applying test1b.patch |
|
485 | applying test1b.patch | |
486 | now at: test1b.patch |
|
486 | now at: test1b.patch | |
487 | $ hg qpush --move test.patch # noop move |
|
487 | $ hg qpush --move test.patch # noop move | |
488 | applying test.patch |
|
488 | applying test.patch | |
489 | now at: test.patch |
|
489 | now at: test.patch | |
490 | $ hg qseries -v |
|
490 | $ hg qseries -v | |
491 | 0 A test2.patch |
|
491 | 0 A test2.patch | |
492 | 1 A test1b.patch |
|
492 | 1 A test1b.patch | |
493 | 2 A test.patch |
|
493 | 2 A test.patch | |
494 | $ hg qpop -a |
|
494 | $ hg qpop -a | |
495 | popping test.patch |
|
495 | popping test.patch | |
496 | popping test1b.patch |
|
496 | popping test1b.patch | |
497 | popping test2.patch |
|
497 | popping test2.patch | |
498 | patch queue now empty |
|
498 | patch queue now empty | |
499 |
|
499 | |||
500 | cleaning up |
|
500 | cleaning up | |
501 |
|
501 | |||
502 | $ hg qselect --none |
|
502 | $ hg qselect --none | |
503 | guards deactivated |
|
503 | guards deactivated | |
504 | number of unguarded, unapplied patches has changed from 3 to 2 |
|
504 | number of unguarded, unapplied patches has changed from 3 to 2 | |
505 | $ hg qguard --none test1b.patch |
|
505 | $ hg qguard --none test1b.patch | |
506 | $ hg qguard --none test2.patch |
|
506 | $ hg qguard --none test2.patch | |
507 | $ hg qpush --move test.patch |
|
507 | $ hg qpush --move test.patch | |
508 | applying test.patch |
|
508 | applying test.patch | |
509 | now at: test.patch |
|
509 | now at: test.patch | |
510 | $ hg qpush --move test1b.patch |
|
510 | $ hg qpush --move test1b.patch | |
511 | applying test1b.patch |
|
511 | applying test1b.patch | |
512 | now at: test1b.patch |
|
512 | now at: test1b.patch | |
513 | $ hg qpush --move bogus # nonexistent patch |
|
513 | $ hg qpush --move bogus # nonexistent patch | |
514 | abort: patch bogus not in series |
|
514 | abort: patch bogus not in series | |
515 | [255] |
|
515 | [255] | |
516 | $ hg qpush --move # no patch |
|
516 | $ hg qpush --move # no patch | |
517 | abort: please specify the patch to move |
|
517 | abort: please specify the patch to move | |
518 | [255] |
|
518 | [255] | |
519 | $ hg qpush --move test.patch # already applied |
|
519 | $ hg qpush --move test.patch # already applied | |
520 | abort: cannot push to a previous patch: test.patch |
|
520 | abort: cannot push to a previous patch: test.patch | |
521 | [255] |
|
521 | [255] | |
522 | $ hg qpush |
|
522 | $ hg qpush | |
523 | applying test2.patch |
|
523 | applying test2.patch | |
524 | now at: test2.patch |
|
524 | now at: test2.patch | |
525 |
|
525 | |||
526 |
|
526 | |||
527 | series after move |
|
527 | series after move | |
528 |
|
528 | |||
529 | $ cat `hg root`/.hg/patches/series |
|
529 | $ cat `hg root`/.hg/patches/series | |
530 | test.patch |
|
530 | test.patch | |
531 | test1b.patch |
|
531 | test1b.patch | |
532 | test2.patch |
|
532 | test2.patch | |
533 | # comment |
|
533 | # comment | |
534 |
|
534 | |||
535 |
|
535 | |||
536 |
|
536 | |||
537 | pop, qapplied, qunapplied |
|
537 | pop, qapplied, qunapplied | |
538 |
|
538 | |||
539 | $ hg qseries -v |
|
539 | $ hg qseries -v | |
540 | 0 A test.patch |
|
540 | 0 A test.patch | |
541 | 1 A test1b.patch |
|
541 | 1 A test1b.patch | |
542 | 2 A test2.patch |
|
542 | 2 A test2.patch | |
543 |
|
543 | |||
544 | qapplied -1 test.patch |
|
544 | qapplied -1 test.patch | |
545 |
|
545 | |||
546 | $ hg qapplied -1 test.patch |
|
546 | $ hg qapplied -1 test.patch | |
547 | only one patch applied |
|
547 | only one patch applied | |
548 | [1] |
|
548 | [1] | |
549 |
|
549 | |||
550 | qapplied -1 test1b.patch |
|
550 | qapplied -1 test1b.patch | |
551 |
|
551 | |||
552 | $ hg qapplied -1 test1b.patch |
|
552 | $ hg qapplied -1 test1b.patch | |
553 | test.patch |
|
553 | test.patch | |
554 |
|
554 | |||
555 | qapplied -1 test2.patch |
|
555 | qapplied -1 test2.patch | |
556 |
|
556 | |||
557 | $ hg qapplied -1 test2.patch |
|
557 | $ hg qapplied -1 test2.patch | |
558 | test1b.patch |
|
558 | test1b.patch | |
559 |
|
559 | |||
560 | qapplied -1 |
|
560 | qapplied -1 | |
561 |
|
561 | |||
562 | $ hg qapplied -1 |
|
562 | $ hg qapplied -1 | |
563 | test1b.patch |
|
563 | test1b.patch | |
564 |
|
564 | |||
565 | qapplied |
|
565 | qapplied | |
566 |
|
566 | |||
567 | $ hg qapplied |
|
567 | $ hg qapplied | |
568 | test.patch |
|
568 | test.patch | |
569 | test1b.patch |
|
569 | test1b.patch | |
570 | test2.patch |
|
570 | test2.patch | |
571 |
|
571 | |||
572 | qapplied test1b.patch |
|
572 | qapplied test1b.patch | |
573 |
|
573 | |||
574 | $ hg qapplied test1b.patch |
|
574 | $ hg qapplied test1b.patch | |
575 | test.patch |
|
575 | test.patch | |
576 | test1b.patch |
|
576 | test1b.patch | |
577 |
|
577 | |||
578 | qunapplied -1 |
|
578 | qunapplied -1 | |
579 |
|
579 | |||
580 | $ hg qunapplied -1 |
|
580 | $ hg qunapplied -1 | |
581 | all patches applied |
|
581 | all patches applied | |
582 | [1] |
|
582 | [1] | |
583 |
|
583 | |||
584 | qunapplied |
|
584 | qunapplied | |
585 |
|
585 | |||
586 | $ hg qunapplied |
|
586 | $ hg qunapplied | |
587 |
|
587 | |||
588 | popping |
|
588 | popping | |
589 |
|
589 | |||
590 | $ hg qpop |
|
590 | $ hg qpop | |
591 | popping test2.patch |
|
591 | popping test2.patch | |
592 | now at: test1b.patch |
|
592 | now at: test1b.patch | |
593 |
|
593 | |||
594 | qunapplied -1 |
|
594 | qunapplied -1 | |
595 |
|
595 | |||
596 | $ hg qunapplied -1 |
|
596 | $ hg qunapplied -1 | |
597 | test2.patch |
|
597 | test2.patch | |
598 |
|
598 | |||
599 | qunapplied |
|
599 | qunapplied | |
600 |
|
600 | |||
601 | $ hg qunapplied |
|
601 | $ hg qunapplied | |
602 | test2.patch |
|
602 | test2.patch | |
603 |
|
603 | |||
604 | qunapplied test2.patch |
|
604 | qunapplied test2.patch | |
605 |
|
605 | |||
606 | $ hg qunapplied test2.patch |
|
606 | $ hg qunapplied test2.patch | |
607 |
|
607 | |||
608 | qunapplied -1 test2.patch |
|
608 | qunapplied -1 test2.patch | |
609 |
|
609 | |||
610 | $ hg qunapplied -1 test2.patch |
|
610 | $ hg qunapplied -1 test2.patch | |
611 | all patches applied |
|
611 | all patches applied | |
612 | [1] |
|
612 | [1] | |
613 |
|
613 | |||
614 | popping -a |
|
614 | popping -a | |
615 |
|
615 | |||
616 | $ hg qpop -a |
|
616 | $ hg qpop -a | |
617 | popping test1b.patch |
|
617 | popping test1b.patch | |
618 | popping test.patch |
|
618 | popping test.patch | |
619 | patch queue now empty |
|
619 | patch queue now empty | |
620 |
|
620 | |||
621 | qapplied |
|
621 | qapplied | |
622 |
|
622 | |||
623 | $ hg qapplied |
|
623 | $ hg qapplied | |
624 |
|
624 | |||
625 | qapplied -1 |
|
625 | qapplied -1 | |
626 |
|
626 | |||
627 | $ hg qapplied -1 |
|
627 | $ hg qapplied -1 | |
628 | no patches applied |
|
628 | no patches applied | |
629 | [1] |
|
629 | [1] | |
630 | $ hg qpush |
|
630 | $ hg qpush | |
631 | applying test.patch |
|
631 | applying test.patch | |
632 | now at: test.patch |
|
632 | now at: test.patch | |
633 |
|
633 | |||
634 |
|
634 | |||
635 | push should succeed |
|
635 | push should succeed | |
636 |
|
636 | |||
637 | $ hg qpop -a |
|
637 | $ hg qpop -a | |
638 | popping test.patch |
|
638 | popping test.patch | |
639 | patch queue now empty |
|
639 | patch queue now empty | |
640 | $ hg push ../../k |
|
640 | $ hg push ../../k | |
641 | pushing to ../../k |
|
641 | pushing to ../../k | |
642 | searching for changes |
|
642 | searching for changes | |
643 | adding changesets |
|
643 | adding changesets | |
644 | adding manifests |
|
644 | adding manifests | |
645 | adding file changes |
|
645 | adding file changes | |
646 | added 1 changesets with 1 changes to 1 files |
|
646 | added 1 changesets with 1 changes to 1 files | |
647 |
|
647 | |||
648 |
|
648 | |||
649 | we want to start with some patches applied |
|
649 | we want to start with some patches applied | |
650 |
|
650 | |||
651 | $ hg qpush -a |
|
651 | $ hg qpush -a | |
652 | applying test.patch |
|
652 | applying test.patch | |
653 | applying test1b.patch |
|
653 | applying test1b.patch | |
654 | applying test2.patch |
|
654 | applying test2.patch | |
655 | now at: test2.patch |
|
655 | now at: test2.patch | |
656 |
|
656 | |||
657 | % pops all patches and succeeds |
|
657 | % pops all patches and succeeds | |
658 |
|
658 | |||
659 | $ hg qpop -a |
|
659 | $ hg qpop -a | |
660 | popping test2.patch |
|
660 | popping test2.patch | |
661 | popping test1b.patch |
|
661 | popping test1b.patch | |
662 | popping test.patch |
|
662 | popping test.patch | |
663 | patch queue now empty |
|
663 | patch queue now empty | |
664 |
|
664 | |||
665 | % does nothing and succeeds |
|
665 | % does nothing and succeeds | |
666 |
|
666 | |||
667 | $ hg qpop -a |
|
667 | $ hg qpop -a | |
668 | no patches applied |
|
668 | no patches applied | |
669 |
|
669 | |||
670 | % fails - nothing else to pop |
|
670 | % fails - nothing else to pop | |
671 |
|
671 | |||
672 | $ hg qpop |
|
672 | $ hg qpop | |
673 | no patches applied |
|
673 | no patches applied | |
674 | [1] |
|
674 | [1] | |
675 |
|
675 | |||
676 | % pushes a patch and succeeds |
|
676 | % pushes a patch and succeeds | |
677 |
|
677 | |||
678 | $ hg qpush |
|
678 | $ hg qpush | |
679 | applying test.patch |
|
679 | applying test.patch | |
680 | now at: test.patch |
|
680 | now at: test.patch | |
681 |
|
681 | |||
682 | % pops a patch and succeeds |
|
682 | % pops a patch and succeeds | |
683 |
|
683 | |||
684 | $ hg qpop |
|
684 | $ hg qpop | |
685 | popping test.patch |
|
685 | popping test.patch | |
686 | patch queue now empty |
|
686 | patch queue now empty | |
687 |
|
687 | |||
688 | % pushes up to test1b.patch and succeeds |
|
688 | % pushes up to test1b.patch and succeeds | |
689 |
|
689 | |||
690 | $ hg qpush test1b.patch |
|
690 | $ hg qpush test1b.patch | |
691 | applying test.patch |
|
691 | applying test.patch | |
692 | applying test1b.patch |
|
692 | applying test1b.patch | |
693 | now at: test1b.patch |
|
693 | now at: test1b.patch | |
694 |
|
694 | |||
695 | % does nothing and succeeds |
|
695 | % does nothing and succeeds | |
696 |
|
696 | |||
697 | $ hg qpush test1b.patch |
|
697 | $ hg qpush test1b.patch | |
698 | qpush: test1b.patch is already at the top |
|
698 | qpush: test1b.patch is already at the top | |
699 |
|
699 | |||
700 | % does nothing and succeeds |
|
700 | % does nothing and succeeds | |
701 |
|
701 | |||
702 | $ hg qpop test1b.patch |
|
702 | $ hg qpop test1b.patch | |
703 | qpop: test1b.patch is already at the top |
|
703 | qpop: test1b.patch is already at the top | |
704 |
|
704 | |||
705 | % fails - can't push to this patch |
|
705 | % fails - can't push to this patch | |
706 |
|
706 | |||
707 | $ hg qpush test.patch |
|
707 | $ hg qpush test.patch | |
708 | abort: cannot push to a previous patch: test.patch |
|
708 | abort: cannot push to a previous patch: test.patch | |
709 | [255] |
|
709 | [255] | |
710 |
|
710 | |||
711 | % fails - can't pop to this patch |
|
711 | % fails - can't pop to this patch | |
712 |
|
712 | |||
713 | $ hg qpop test2.patch |
|
713 | $ hg qpop test2.patch | |
714 | abort: patch test2.patch is not applied |
|
714 | abort: patch test2.patch is not applied | |
715 | [255] |
|
715 | [255] | |
716 |
|
716 | |||
717 | % pops up to test.patch and succeeds |
|
717 | % pops up to test.patch and succeeds | |
718 |
|
718 | |||
719 | $ hg qpop test.patch |
|
719 | $ hg qpop test.patch | |
720 | popping test1b.patch |
|
720 | popping test1b.patch | |
721 | now at: test.patch |
|
721 | now at: test.patch | |
722 |
|
722 | |||
723 | % pushes all patches and succeeds |
|
723 | % pushes all patches and succeeds | |
724 |
|
724 | |||
725 | $ hg qpush -a |
|
725 | $ hg qpush -a | |
726 | applying test1b.patch |
|
726 | applying test1b.patch | |
727 | applying test2.patch |
|
727 | applying test2.patch | |
728 | now at: test2.patch |
|
728 | now at: test2.patch | |
729 |
|
729 | |||
730 | % does nothing and succeeds |
|
730 | % does nothing and succeeds | |
731 |
|
731 | |||
732 | $ hg qpush -a |
|
732 | $ hg qpush -a | |
733 | all patches are currently applied |
|
733 | all patches are currently applied | |
734 |
|
734 | |||
735 | % fails - nothing else to push |
|
735 | % fails - nothing else to push | |
736 |
|
736 | |||
737 | $ hg qpush |
|
737 | $ hg qpush | |
738 | patch series already fully applied |
|
738 | patch series already fully applied | |
739 | [1] |
|
739 | [1] | |
740 |
|
740 | |||
741 | % does nothing and succeeds |
|
741 | % does nothing and succeeds | |
742 |
|
742 | |||
743 | $ hg qpush test2.patch |
|
743 | $ hg qpush test2.patch | |
744 | qpush: test2.patch is already at the top |
|
744 | qpush: test2.patch is already at the top | |
745 |
|
745 | |||
746 | strip |
|
746 | strip | |
747 |
|
747 | |||
748 | $ cd ../../b |
|
748 | $ cd ../../b | |
749 | $ echo x>x |
|
749 | $ echo x>x | |
750 | $ hg ci -Ama |
|
750 | $ hg ci -Ama | |
751 | adding x |
|
751 | adding x | |
752 | $ hg strip tip |
|
752 | $ hg strip tip | |
753 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
753 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
754 | saved backup bundle to $TESTTMP/b/.hg/strip-backup/*-backup.hg (glob) |
|
754 | saved backup bundle to $TESTTMP/b/.hg/strip-backup/*-backup.hg (glob) | |
755 | $ hg unbundle .hg/strip-backup/* |
|
755 | $ hg unbundle .hg/strip-backup/* | |
756 | adding changesets |
|
756 | adding changesets | |
757 | adding manifests |
|
757 | adding manifests | |
758 | adding file changes |
|
758 | adding file changes | |
759 | added 1 changesets with 1 changes to 1 files |
|
759 | added 1 changesets with 1 changes to 1 files | |
760 | (run 'hg update' to get a working copy) |
|
760 | (run 'hg update' to get a working copy) | |
761 |
|
761 | |||
762 |
|
762 | |||
763 | strip with local changes, should complain |
|
763 | strip with local changes, should complain | |
764 |
|
764 | |||
765 | $ hg up |
|
765 | $ hg up | |
766 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
766 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
767 | $ echo y>y |
|
767 | $ echo y>y | |
768 | $ hg add y |
|
768 | $ hg add y | |
769 | $ hg strip tip |
|
769 | $ hg strip tip | |
770 | abort: local changes found |
|
770 | abort: local changes found | |
771 | [255] |
|
771 | [255] | |
772 |
|
772 | |||
773 | --force strip with local changes |
|
773 | --force strip with local changes | |
774 |
|
774 | |||
775 | $ hg strip -f tip |
|
775 | $ hg strip -f tip | |
776 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
776 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
777 | saved backup bundle to $TESTTMP/b/.hg/strip-backup/*-backup.hg (glob) |
|
777 | saved backup bundle to $TESTTMP/b/.hg/strip-backup/*-backup.hg (glob) | |
778 |
|
778 | |||
779 |
|
779 | |||
780 | cd b; hg qrefresh |
|
780 | cd b; hg qrefresh | |
781 |
|
781 | |||
782 | $ hg init refresh |
|
782 | $ hg init refresh | |
783 | $ cd refresh |
|
783 | $ cd refresh | |
784 | $ echo a > a |
|
784 | $ echo a > a | |
785 | $ hg ci -Ama |
|
785 | $ hg ci -Ama | |
786 | adding a |
|
786 | adding a | |
787 | $ hg qnew -mfoo foo |
|
787 | $ hg qnew -mfoo foo | |
788 | $ echo a >> a |
|
788 | $ echo a >> a | |
789 | $ hg qrefresh |
|
789 | $ hg qrefresh | |
790 | $ mkdir b |
|
790 | $ mkdir b | |
791 | $ cd b |
|
791 | $ cd b | |
792 | $ echo f > f |
|
792 | $ echo f > f | |
793 | $ hg add f |
|
793 | $ hg add f | |
794 | $ hg qrefresh |
|
794 | $ hg qrefresh | |
795 | $ cat ../.hg/patches/foo |
|
795 | $ cat ../.hg/patches/foo | |
796 | foo |
|
796 | foo | |
797 |
|
797 | |||
798 | diff -r cb9a9f314b8b a |
|
798 | diff -r cb9a9f314b8b a | |
799 | --- a/a\t(?P<date>.*) (re) |
|
799 | --- a/a\t(?P<date>.*) (re) | |
800 | \+\+\+ b/a\t(?P<date>.*) (re) |
|
800 | \+\+\+ b/a\t(?P<date>.*) (re) | |
801 | @@ -1,1 +1,2 @@ |
|
801 | @@ -1,1 +1,2 @@ | |
802 | a |
|
802 | a | |
803 | +a |
|
803 | +a | |
804 | diff -r cb9a9f314b8b b/f |
|
804 | diff -r cb9a9f314b8b b/f | |
805 | --- /dev/null\t(?P<date>.*) (re) |
|
805 | --- /dev/null\t(?P<date>.*) (re) | |
806 | \+\+\+ b/b/f\t(?P<date>.*) (re) |
|
806 | \+\+\+ b/b/f\t(?P<date>.*) (re) | |
807 | @@ -0,0 +1,1 @@ |
|
807 | @@ -0,0 +1,1 @@ | |
808 | +f |
|
808 | +f | |
809 |
|
809 | |||
810 | hg qrefresh . |
|
810 | hg qrefresh . | |
811 |
|
811 | |||
812 | $ hg qrefresh . |
|
812 | $ hg qrefresh . | |
813 | $ cat ../.hg/patches/foo |
|
813 | $ cat ../.hg/patches/foo | |
814 | foo |
|
814 | foo | |
815 |
|
815 | |||
816 | diff -r cb9a9f314b8b b/f |
|
816 | diff -r cb9a9f314b8b b/f | |
817 | --- /dev/null\t(?P<date>.*) (re) |
|
817 | --- /dev/null\t(?P<date>.*) (re) | |
818 | \+\+\+ b/b/f\t(?P<date>.*) (re) |
|
818 | \+\+\+ b/b/f\t(?P<date>.*) (re) | |
819 | @@ -0,0 +1,1 @@ |
|
819 | @@ -0,0 +1,1 @@ | |
820 | +f |
|
820 | +f | |
821 | $ hg status |
|
821 | $ hg status | |
822 | M a |
|
822 | M a | |
823 |
|
823 | |||
824 |
|
824 | |||
825 | qpush failure |
|
825 | qpush failure | |
826 |
|
826 | |||
827 | $ cd .. |
|
827 | $ cd .. | |
828 | $ hg qrefresh |
|
828 | $ hg qrefresh | |
829 | $ hg qnew -mbar bar |
|
829 | $ hg qnew -mbar bar | |
830 | $ echo foo > foo |
|
830 | $ echo foo > foo | |
831 | $ echo bar > bar |
|
831 | $ echo bar > bar | |
832 | $ hg add foo bar |
|
832 | $ hg add foo bar | |
833 | $ hg qrefresh |
|
833 | $ hg qrefresh | |
834 | $ hg qpop -a |
|
834 | $ hg qpop -a | |
835 | popping bar |
|
835 | popping bar | |
836 | popping foo |
|
836 | popping foo | |
837 | patch queue now empty |
|
837 | patch queue now empty | |
838 | $ echo bar > foo |
|
838 | $ echo bar > foo | |
839 | $ hg qpush -a |
|
839 | $ hg qpush -a | |
840 | applying foo |
|
840 | applying foo | |
841 | applying bar |
|
841 | applying bar | |
842 | file foo already exists |
|
842 | file foo already exists | |
843 | 1 out of 1 hunks FAILED -- saving rejects to file foo.rej |
|
843 | 1 out of 1 hunks FAILED -- saving rejects to file foo.rej | |
844 | patch failed, unable to continue (try -v) |
|
844 | patch failed, unable to continue (try -v) | |
845 | patch failed, rejects left in working dir |
|
845 | patch failed, rejects left in working dir | |
846 | errors during apply, please fix and refresh bar |
|
846 | errors during apply, please fix and refresh bar | |
847 | [2] |
|
847 | [2] | |
848 | $ hg st |
|
848 | $ hg st | |
849 | ? foo |
|
849 | ? foo | |
850 | ? foo.rej |
|
850 | ? foo.rej | |
851 |
|
851 | |||
852 |
|
852 | |||
853 | mq tags |
|
853 | mq tags | |
854 |
|
854 | |||
855 | $ hg log --template '{rev} {tags}\n' -r qparent:qtip |
|
855 | $ hg log --template '{rev} {tags}\n' -r qparent:qtip | |
856 | 0 qparent |
|
856 | 0 qparent | |
857 | 1 foo qbase |
|
857 | 1 foo qbase | |
858 | 2 bar qtip tip |
|
858 | 2 bar qtip tip | |
859 |
|
859 | |||
860 | mq revset |
|
860 | mq revset | |
861 |
|
861 | |||
862 | $ hg log -r 'mq()' --template '{rev}\n' |
|
862 | $ hg log -r 'mq()' --template '{rev}\n' | |
863 | 1 |
|
863 | 1 | |
864 | 2 |
|
864 | 2 | |
865 | $ hg help revsets | grep -i mq |
|
865 | $ hg help revsets | grep -i mq | |
866 | "mq()" |
|
866 | "mq()" | |
867 | Changesets managed by MQ. |
|
867 | Changesets managed by MQ. | |
868 |
|
868 | |||
869 | bad node in status |
|
869 | bad node in status | |
870 |
|
870 | |||
871 | $ hg qpop |
|
871 | $ hg qpop | |
872 | popping bar |
|
872 | popping bar | |
873 | now at: foo |
|
873 | now at: foo | |
874 | $ hg strip -qn tip |
|
874 | $ hg strip -qn tip | |
875 | $ hg tip |
|
875 | $ hg tip | |
876 | changeset: 0:cb9a9f314b8b |
|
876 | changeset: 0:cb9a9f314b8b | |
877 | tag: tip |
|
877 | tag: tip | |
878 | user: test |
|
878 | user: test | |
879 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
879 | date: Thu Jan 01 00:00:00 1970 +0000 | |
880 | summary: a |
|
880 | summary: a | |
881 |
|
881 | |||
882 | $ hg branches |
|
882 | $ hg branches | |
883 | default 0:cb9a9f314b8b |
|
883 | default 0:cb9a9f314b8b | |
884 | $ hg qpop |
|
884 | $ hg qpop | |
885 | no patches applied |
|
885 | no patches applied | |
886 | [1] |
|
886 | [1] | |
887 |
|
887 | |||
888 | $ cat >>$HGRCPATH <<EOF |
|
888 | $ cat >>$HGRCPATH <<EOF | |
889 | > [diff] |
|
889 | > [diff] | |
890 | > git = True |
|
890 | > git = True | |
891 | > EOF |
|
891 | > EOF | |
892 | $ cd .. |
|
892 | $ cd .. | |
893 | $ hg init git |
|
893 | $ hg init git | |
894 | $ cd git |
|
894 | $ cd git | |
895 | $ hg qinit |
|
895 | $ hg qinit | |
896 |
|
896 | |||
897 | $ hg qnew -m'new file' new |
|
897 | $ hg qnew -m'new file' new | |
898 | $ echo foo > new |
|
898 | $ echo foo > new | |
899 | $ chmod +x new |
|
899 | $ chmod +x new | |
900 | $ hg add new |
|
900 | $ hg add new | |
901 | $ hg qrefresh |
|
901 | $ hg qrefresh | |
902 | $ cat .hg/patches/new |
|
902 | $ cat .hg/patches/new | |
903 | new file |
|
903 | new file | |
904 |
|
904 | |||
905 | diff --git a/new b/new |
|
905 | diff --git a/new b/new | |
906 | new file mode 100755 |
|
906 | new file mode 100755 | |
907 | --- /dev/null |
|
907 | --- /dev/null | |
908 | +++ b/new |
|
908 | +++ b/new | |
909 | @@ -0,0 +1,1 @@ |
|
909 | @@ -0,0 +1,1 @@ | |
910 | +foo |
|
910 | +foo | |
911 |
|
911 | |||
912 | $ hg qnew -m'copy file' copy |
|
912 | $ hg qnew -m'copy file' copy | |
913 | $ hg cp new copy |
|
913 | $ hg cp new copy | |
914 | $ hg qrefresh |
|
914 | $ hg qrefresh | |
915 | $ cat .hg/patches/copy |
|
915 | $ cat .hg/patches/copy | |
916 | copy file |
|
916 | copy file | |
917 |
|
917 | |||
918 | diff --git a/new b/copy |
|
918 | diff --git a/new b/copy | |
919 | copy from new |
|
919 | copy from new | |
920 | copy to copy |
|
920 | copy to copy | |
921 |
|
921 | |||
922 | $ hg qpop |
|
922 | $ hg qpop | |
923 | popping copy |
|
923 | popping copy | |
924 | now at: new |
|
924 | now at: new | |
925 | $ hg qpush |
|
925 | $ hg qpush | |
926 | applying copy |
|
926 | applying copy | |
927 | now at: copy |
|
927 | now at: copy | |
928 | $ hg qdiff |
|
928 | $ hg qdiff | |
929 | diff --git a/new b/copy |
|
929 | diff --git a/new b/copy | |
930 | copy from new |
|
930 | copy from new | |
931 | copy to copy |
|
931 | copy to copy | |
932 | $ cat >>$HGRCPATH <<EOF |
|
932 | $ cat >>$HGRCPATH <<EOF | |
933 | > [diff] |
|
933 | > [diff] | |
934 | > git = False |
|
934 | > git = False | |
935 | > EOF |
|
935 | > EOF | |
936 | $ hg qdiff --git |
|
936 | $ hg qdiff --git | |
937 | diff --git a/new b/copy |
|
937 | diff --git a/new b/copy | |
938 | copy from new |
|
938 | copy from new | |
939 | copy to copy |
|
939 | copy to copy | |
940 | $ cd .. |
|
940 | $ cd .. | |
941 |
|
941 | |||
942 | empty lines in status |
|
942 | empty lines in status | |
943 |
|
943 | |||
944 | $ hg init emptystatus |
|
944 | $ hg init emptystatus | |
945 | $ cd emptystatus |
|
945 | $ cd emptystatus | |
946 | $ hg qinit |
|
946 | $ hg qinit | |
947 | $ printf '\n\n' > .hg/patches/status |
|
947 | $ printf '\n\n' > .hg/patches/status | |
948 | $ hg qser |
|
948 | $ hg qser | |
949 | $ cd .. |
|
949 | $ cd .. | |
950 |
|
950 | |||
951 | bad line in status (without ":") |
|
951 | bad line in status (without ":") | |
952 |
|
952 | |||
953 | $ hg init badstatus |
|
953 | $ hg init badstatus | |
954 | $ cd badstatus |
|
954 | $ cd badstatus | |
955 | $ hg qinit |
|
955 | $ hg qinit | |
956 | $ printf 'babar has no colon in this line\n' > .hg/patches/status |
|
956 | $ printf 'babar has no colon in this line\n' > .hg/patches/status | |
957 | $ hg qser |
|
957 | $ hg qser | |
958 | malformated mq status line: ['babar has no colon in this line'] |
|
958 | malformated mq status line: ['babar has no colon in this line'] | |
959 | $ cd .. |
|
959 | $ cd .. | |
960 |
|
960 | |||
961 |
|
961 | |||
962 | test file addition in slow path |
|
962 | test file addition in slow path | |
963 |
|
963 | |||
964 | $ hg init slow |
|
964 | $ hg init slow | |
965 | $ cd slow |
|
965 | $ cd slow | |
966 | $ hg qinit |
|
966 | $ hg qinit | |
967 | $ echo foo > foo |
|
967 | $ echo foo > foo | |
968 | $ hg add foo |
|
968 | $ hg add foo | |
969 | $ hg ci -m 'add foo' |
|
969 | $ hg ci -m 'add foo' | |
970 | $ hg qnew bar |
|
970 | $ hg qnew bar | |
971 | $ echo bar > bar |
|
971 | $ echo bar > bar | |
972 | $ hg add bar |
|
972 | $ hg add bar | |
973 | $ hg mv foo baz |
|
973 | $ hg mv foo baz | |
974 | $ hg qrefresh --git |
|
974 | $ hg qrefresh --git | |
975 | $ hg up -C 0 |
|
975 | $ hg up -C 0 | |
976 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
976 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
977 | $ echo >> foo |
|
977 | $ echo >> foo | |
978 | $ hg ci -m 'change foo' |
|
978 | $ hg ci -m 'change foo' | |
979 | created new head |
|
979 | created new head | |
980 | $ hg up -C 1 |
|
980 | $ hg up -C 1 | |
981 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
981 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
982 | $ hg qrefresh --git |
|
982 | $ hg qrefresh --git | |
983 | $ cat .hg/patches/bar |
|
983 | $ cat .hg/patches/bar | |
984 | diff --git a/bar b/bar |
|
984 | diff --git a/bar b/bar | |
985 | new file mode 100644 |
|
985 | new file mode 100644 | |
986 | --- /dev/null |
|
986 | --- /dev/null | |
987 | +++ b/bar |
|
987 | +++ b/bar | |
988 | @@ -0,0 +1,1 @@ |
|
988 | @@ -0,0 +1,1 @@ | |
989 | +bar |
|
989 | +bar | |
990 | diff --git a/foo b/baz |
|
990 | diff --git a/foo b/baz | |
991 | rename from foo |
|
991 | rename from foo | |
992 | rename to baz |
|
992 | rename to baz | |
993 | $ hg log -v --template '{rev} {file_copies}\n' -r . |
|
993 | $ hg log -v --template '{rev} {file_copies}\n' -r . | |
994 | 2 baz (foo) |
|
994 | 2 baz (foo) | |
995 | $ hg qrefresh --git |
|
995 | $ hg qrefresh --git | |
996 | $ cat .hg/patches/bar |
|
996 | $ cat .hg/patches/bar | |
997 | diff --git a/bar b/bar |
|
997 | diff --git a/bar b/bar | |
998 | new file mode 100644 |
|
998 | new file mode 100644 | |
999 | --- /dev/null |
|
999 | --- /dev/null | |
1000 | +++ b/bar |
|
1000 | +++ b/bar | |
1001 | @@ -0,0 +1,1 @@ |
|
1001 | @@ -0,0 +1,1 @@ | |
1002 | +bar |
|
1002 | +bar | |
1003 | diff --git a/foo b/baz |
|
1003 | diff --git a/foo b/baz | |
1004 | rename from foo |
|
1004 | rename from foo | |
1005 | rename to baz |
|
1005 | rename to baz | |
1006 | $ hg log -v --template '{rev} {file_copies}\n' -r . |
|
1006 | $ hg log -v --template '{rev} {file_copies}\n' -r . | |
1007 | 2 baz (foo) |
|
1007 | 2 baz (foo) | |
1008 | $ hg qrefresh |
|
1008 | $ hg qrefresh | |
1009 | $ grep 'diff --git' .hg/patches/bar |
|
1009 | $ grep 'diff --git' .hg/patches/bar | |
1010 | diff --git a/bar b/bar |
|
1010 | diff --git a/bar b/bar | |
1011 | diff --git a/foo b/baz |
|
1011 | diff --git a/foo b/baz | |
1012 |
|
1012 | |||
1013 |
|
1013 | |||
1014 | test file move chains in the slow path |
|
1014 | test file move chains in the slow path | |
1015 |
|
1015 | |||
1016 | $ hg up -C 1 |
|
1016 | $ hg up -C 1 | |
1017 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
1017 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
1018 | $ echo >> foo |
|
1018 | $ echo >> foo | |
1019 | $ hg ci -m 'change foo again' |
|
1019 | $ hg ci -m 'change foo again' | |
1020 | $ hg up -C 2 |
|
1020 | $ hg up -C 2 | |
1021 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1021 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1022 | $ hg mv bar quux |
|
1022 | $ hg mv bar quux | |
1023 | $ hg mv baz bleh |
|
1023 | $ hg mv baz bleh | |
1024 | $ hg qrefresh --git |
|
1024 | $ hg qrefresh --git | |
1025 | $ cat .hg/patches/bar |
|
1025 | $ cat .hg/patches/bar | |
1026 | diff --git a/foo b/bleh |
|
1026 | diff --git a/foo b/bleh | |
1027 | rename from foo |
|
1027 | rename from foo | |
1028 | rename to bleh |
|
1028 | rename to bleh | |
1029 | diff --git a/quux b/quux |
|
1029 | diff --git a/quux b/quux | |
1030 | new file mode 100644 |
|
1030 | new file mode 100644 | |
1031 | --- /dev/null |
|
1031 | --- /dev/null | |
1032 | +++ b/quux |
|
1032 | +++ b/quux | |
1033 | @@ -0,0 +1,1 @@ |
|
1033 | @@ -0,0 +1,1 @@ | |
1034 | +bar |
|
1034 | +bar | |
1035 | $ hg log -v --template '{rev} {file_copies}\n' -r . |
|
1035 | $ hg log -v --template '{rev} {file_copies}\n' -r . | |
1036 | 3 bleh (foo) |
|
1036 | 3 bleh (foo) | |
1037 | $ hg mv quux fred |
|
1037 | $ hg mv quux fred | |
1038 | $ hg mv bleh barney |
|
1038 | $ hg mv bleh barney | |
1039 | $ hg qrefresh --git |
|
1039 | $ hg qrefresh --git | |
1040 | $ cat .hg/patches/bar |
|
1040 | $ cat .hg/patches/bar | |
1041 | diff --git a/foo b/barney |
|
1041 | diff --git a/foo b/barney | |
1042 | rename from foo |
|
1042 | rename from foo | |
1043 | rename to barney |
|
1043 | rename to barney | |
1044 | diff --git a/fred b/fred |
|
1044 | diff --git a/fred b/fred | |
1045 | new file mode 100644 |
|
1045 | new file mode 100644 | |
1046 | --- /dev/null |
|
1046 | --- /dev/null | |
1047 | +++ b/fred |
|
1047 | +++ b/fred | |
1048 | @@ -0,0 +1,1 @@ |
|
1048 | @@ -0,0 +1,1 @@ | |
1049 | +bar |
|
1049 | +bar | |
1050 | $ hg log -v --template '{rev} {file_copies}\n' -r . |
|
1050 | $ hg log -v --template '{rev} {file_copies}\n' -r . | |
1051 | 3 barney (foo) |
|
1051 | 3 barney (foo) | |
1052 |
|
1052 | |||
1053 |
|
1053 | |||
1054 | refresh omitting an added file |
|
1054 | refresh omitting an added file | |
1055 |
|
1055 | |||
1056 | $ hg qnew baz |
|
1056 | $ hg qnew baz | |
1057 | $ echo newfile > newfile |
|
1057 | $ echo newfile > newfile | |
1058 | $ hg add newfile |
|
1058 | $ hg add newfile | |
1059 | $ hg qrefresh |
|
1059 | $ hg qrefresh | |
1060 | $ hg st -A newfile |
|
1060 | $ hg st -A newfile | |
1061 | C newfile |
|
1061 | C newfile | |
1062 | $ hg qrefresh -X newfile |
|
1062 | $ hg qrefresh -X newfile | |
1063 | $ hg st -A newfile |
|
1063 | $ hg st -A newfile | |
1064 | A newfile |
|
1064 | A newfile | |
1065 | $ hg revert newfile |
|
1065 | $ hg revert newfile | |
1066 | $ rm newfile |
|
1066 | $ rm newfile | |
1067 | $ hg qpop |
|
1067 | $ hg qpop | |
1068 | popping baz |
|
1068 | popping baz | |
1069 | now at: bar |
|
1069 | now at: bar | |
1070 | $ hg qdel baz |
|
1070 | $ hg qdel baz | |
1071 |
|
1071 | |||
1072 |
|
1072 | |||
1073 | create a git patch |
|
1073 | create a git patch | |
1074 |
|
1074 | |||
1075 | $ echo a > alexander |
|
1075 | $ echo a > alexander | |
1076 | $ hg add alexander |
|
1076 | $ hg add alexander | |
1077 | $ hg qnew -f --git addalexander |
|
1077 | $ hg qnew -f --git addalexander | |
1078 | $ grep diff .hg/patches/addalexander |
|
1078 | $ grep diff .hg/patches/addalexander | |
1079 | diff --git a/alexander b/alexander |
|
1079 | diff --git a/alexander b/alexander | |
1080 |
|
1080 | |||
1081 |
|
1081 | |||
1082 | create a git binary patch |
|
1082 | create a git binary patch | |
1083 |
|
1083 | |||
1084 | $ cat > writebin.py <<EOF |
|
1084 | $ cat > writebin.py <<EOF | |
1085 | > import sys |
|
1085 | > import sys | |
1086 | > path = sys.argv[1] |
|
1086 | > path = sys.argv[1] | |
1087 | > open(path, 'wb').write('BIN\x00ARY') |
|
1087 | > open(path, 'wb').write('BIN\x00ARY') | |
1088 | > EOF |
|
1088 | > EOF | |
1089 | $ python writebin.py bucephalus |
|
1089 | $ python writebin.py bucephalus | |
1090 |
|
1090 | |||
1091 | $ python "$TESTDIR/md5sum.py" bucephalus |
|
1091 | $ python "$TESTDIR/md5sum.py" bucephalus | |
1092 | 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus |
|
1092 | 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus | |
1093 | $ hg add bucephalus |
|
1093 | $ hg add bucephalus | |
1094 | $ hg qnew -f --git addbucephalus |
|
1094 | $ hg qnew -f --git addbucephalus | |
1095 | $ grep diff .hg/patches/addbucephalus |
|
1095 | $ grep diff .hg/patches/addbucephalus | |
1096 | diff --git a/bucephalus b/bucephalus |
|
1096 | diff --git a/bucephalus b/bucephalus | |
1097 |
|
1097 | |||
1098 |
|
1098 | |||
1099 | check binary patches can be popped and pushed |
|
1099 | check binary patches can be popped and pushed | |
1100 |
|
1100 | |||
1101 | $ hg qpop |
|
1101 | $ hg qpop | |
1102 | popping addbucephalus |
|
1102 | popping addbucephalus | |
1103 | now at: addalexander |
|
1103 | now at: addalexander | |
1104 | $ test -f bucephalus && echo % bucephalus should not be there |
|
1104 | $ test -f bucephalus && echo % bucephalus should not be there | |
1105 | [1] |
|
1105 | [1] | |
1106 | $ hg qpush |
|
1106 | $ hg qpush | |
1107 | applying addbucephalus |
|
1107 | applying addbucephalus | |
1108 | now at: addbucephalus |
|
1108 | now at: addbucephalus | |
1109 | $ test -f bucephalus |
|
1109 | $ test -f bucephalus | |
1110 | $ python "$TESTDIR/md5sum.py" bucephalus |
|
1110 | $ python "$TESTDIR/md5sum.py" bucephalus | |
1111 | 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus |
|
1111 | 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus | |
1112 |
|
1112 | |||
1113 |
|
1113 | |||
1114 |
|
1114 | |||
1115 | strip again |
|
1115 | strip again | |
1116 |
|
1116 | |||
1117 | $ cd .. |
|
1117 | $ cd .. | |
1118 | $ hg init strip |
|
1118 | $ hg init strip | |
1119 | $ cd strip |
|
1119 | $ cd strip | |
1120 | $ touch foo |
|
1120 | $ touch foo | |
1121 | $ hg add foo |
|
1121 | $ hg add foo | |
1122 | $ hg ci -m 'add foo' |
|
1122 | $ hg ci -m 'add foo' | |
1123 | $ echo >> foo |
|
1123 | $ echo >> foo | |
1124 | $ hg ci -m 'change foo 1' |
|
1124 | $ hg ci -m 'change foo 1' | |
1125 | $ hg up -C 0 |
|
1125 | $ hg up -C 0 | |
1126 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1126 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1127 | $ echo 1 >> foo |
|
1127 | $ echo 1 >> foo | |
1128 | $ hg ci -m 'change foo 2' |
|
1128 | $ hg ci -m 'change foo 2' | |
1129 | created new head |
|
1129 | created new head | |
1130 | $ HGMERGE=true hg merge |
|
1130 | $ HGMERGE=true hg merge | |
1131 | merging foo |
|
1131 | merging foo | |
1132 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
1132 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
1133 | (branch merge, don't forget to commit) |
|
1133 | (branch merge, don't forget to commit) | |
1134 | $ hg ci -m merge |
|
1134 | $ hg ci -m merge | |
1135 | $ hg log |
|
1135 | $ hg log | |
1136 | changeset: 3:99615015637b |
|
1136 | changeset: 3:99615015637b | |
1137 | tag: tip |
|
1137 | tag: tip | |
1138 | parent: 2:20cbbe65cff7 |
|
1138 | parent: 2:20cbbe65cff7 | |
1139 | parent: 1:d2871fc282d4 |
|
1139 | parent: 1:d2871fc282d4 | |
1140 | user: test |
|
1140 | user: test | |
1141 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1141 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1142 | summary: merge |
|
1142 | summary: merge | |
1143 |
|
1143 | |||
1144 | changeset: 2:20cbbe65cff7 |
|
1144 | changeset: 2:20cbbe65cff7 | |
1145 | parent: 0:53245c60e682 |
|
1145 | parent: 0:53245c60e682 | |
1146 | user: test |
|
1146 | user: test | |
1147 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1147 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1148 | summary: change foo 2 |
|
1148 | summary: change foo 2 | |
1149 |
|
1149 | |||
1150 | changeset: 1:d2871fc282d4 |
|
1150 | changeset: 1:d2871fc282d4 | |
1151 | user: test |
|
1151 | user: test | |
1152 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1152 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1153 | summary: change foo 1 |
|
1153 | summary: change foo 1 | |
1154 |
|
1154 | |||
1155 | changeset: 0:53245c60e682 |
|
1155 | changeset: 0:53245c60e682 | |
1156 | user: test |
|
1156 | user: test | |
1157 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1157 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1158 | summary: add foo |
|
1158 | summary: add foo | |
1159 |
|
1159 | |||
1160 | $ hg strip 1 |
|
1160 | $ hg strip 1 | |
1161 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1161 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1162 | saved backup bundle to $TESTTMP/b/strip/.hg/strip-backup/*-backup.hg (glob) |
|
1162 | saved backup bundle to $TESTTMP/b/strip/.hg/strip-backup/*-backup.hg (glob) | |
1163 | $ checkundo strip |
|
1163 | $ checkundo strip | |
1164 | $ hg log |
|
1164 | $ hg log | |
1165 | changeset: 1:20cbbe65cff7 |
|
1165 | changeset: 1:20cbbe65cff7 | |
1166 | tag: tip |
|
1166 | tag: tip | |
1167 | user: test |
|
1167 | user: test | |
1168 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1168 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1169 | summary: change foo 2 |
|
1169 | summary: change foo 2 | |
1170 |
|
1170 | |||
1171 | changeset: 0:53245c60e682 |
|
1171 | changeset: 0:53245c60e682 | |
1172 | user: test |
|
1172 | user: test | |
1173 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1173 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1174 | summary: add foo |
|
1174 | summary: add foo | |
1175 |
|
1175 | |||
1176 | $ cd .. |
|
1176 | $ cd .. | |
1177 |
|
1177 | |||
1178 |
|
1178 | |||
1179 | qclone |
|
1179 | qclone | |
1180 |
|
1180 | |||
1181 | $ qlog() |
|
1181 | $ qlog() | |
1182 | > { |
|
1182 | > { | |
1183 | > echo 'main repo:' |
|
1183 | > echo 'main repo:' | |
1184 | > hg log --template ' rev {rev}: {desc}\n' |
|
1184 | > hg log --template ' rev {rev}: {desc}\n' | |
1185 | > echo 'patch repo:' |
|
1185 | > echo 'patch repo:' | |
1186 | > hg -R .hg/patches log --template ' rev {rev}: {desc}\n' |
|
1186 | > hg -R .hg/patches log --template ' rev {rev}: {desc}\n' | |
1187 | > } |
|
1187 | > } | |
1188 | $ hg init qclonesource |
|
1188 | $ hg init qclonesource | |
1189 | $ cd qclonesource |
|
1189 | $ cd qclonesource | |
1190 | $ echo foo > foo |
|
1190 | $ echo foo > foo | |
1191 | $ hg add foo |
|
1191 | $ hg add foo | |
1192 | $ hg ci -m 'add foo' |
|
1192 | $ hg ci -m 'add foo' | |
1193 | $ hg qinit |
|
1193 | $ hg qinit | |
1194 | $ hg qnew patch1 |
|
1194 | $ hg qnew patch1 | |
1195 | $ echo bar >> foo |
|
1195 | $ echo bar >> foo | |
1196 | $ hg qrefresh -m 'change foo' |
|
1196 | $ hg qrefresh -m 'change foo' | |
1197 | $ cd .. |
|
1197 | $ cd .. | |
1198 |
|
1198 | |||
1199 |
|
1199 | |||
1200 | repo with unversioned patch dir |
|
1200 | repo with unversioned patch dir | |
1201 |
|
1201 | |||
1202 | $ hg qclone qclonesource failure |
|
1202 | $ hg qclone qclonesource failure | |
1203 | abort: versioned patch repository not found (see init --mq) |
|
1203 | abort: versioned patch repository not found (see init --mq) | |
1204 | [255] |
|
1204 | [255] | |
1205 |
|
1205 | |||
1206 | $ cd qclonesource |
|
1206 | $ cd qclonesource | |
1207 | $ hg qinit -c |
|
1207 | $ hg qinit -c | |
1208 | adding .hg/patches/patch1 (glob) |
|
1208 | adding .hg/patches/patch1 (glob) | |
1209 | $ hg qci -m checkpoint |
|
1209 | $ hg qci -m checkpoint | |
1210 | $ qlog |
|
1210 | $ qlog | |
1211 | main repo: |
|
1211 | main repo: | |
1212 | rev 1: change foo |
|
1212 | rev 1: change foo | |
1213 | rev 0: add foo |
|
1213 | rev 0: add foo | |
1214 | patch repo: |
|
1214 | patch repo: | |
1215 | rev 0: checkpoint |
|
1215 | rev 0: checkpoint | |
1216 | $ cd .. |
|
1216 | $ cd .. | |
1217 |
|
1217 | |||
1218 |
|
1218 | |||
1219 | repo with patches applied |
|
1219 | repo with patches applied | |
1220 |
|
1220 | |||
1221 | $ hg qclone qclonesource qclonedest |
|
1221 | $ hg qclone qclonesource qclonedest | |
1222 | updating to branch default |
|
1222 | updating to branch default | |
1223 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1223 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1224 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1224 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1225 | $ cd qclonedest |
|
1225 | $ cd qclonedest | |
1226 | $ qlog |
|
1226 | $ qlog | |
1227 | main repo: |
|
1227 | main repo: | |
1228 | rev 0: add foo |
|
1228 | rev 0: add foo | |
1229 | patch repo: |
|
1229 | patch repo: | |
1230 | rev 0: checkpoint |
|
1230 | rev 0: checkpoint | |
1231 | $ cd .. |
|
1231 | $ cd .. | |
1232 |
|
1232 | |||
1233 |
|
1233 | |||
1234 | repo with patches unapplied |
|
1234 | repo with patches unapplied | |
1235 |
|
1235 | |||
1236 | $ cd qclonesource |
|
1236 | $ cd qclonesource | |
1237 | $ hg qpop -a |
|
1237 | $ hg qpop -a | |
1238 | popping patch1 |
|
1238 | popping patch1 | |
1239 | patch queue now empty |
|
1239 | patch queue now empty | |
1240 | $ qlog |
|
1240 | $ qlog | |
1241 | main repo: |
|
1241 | main repo: | |
1242 | rev 0: add foo |
|
1242 | rev 0: add foo | |
1243 | patch repo: |
|
1243 | patch repo: | |
1244 | rev 0: checkpoint |
|
1244 | rev 0: checkpoint | |
1245 | $ cd .. |
|
1245 | $ cd .. | |
1246 | $ hg qclone qclonesource qclonedest2 |
|
1246 | $ hg qclone qclonesource qclonedest2 | |
1247 | updating to branch default |
|
1247 | updating to branch default | |
1248 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1248 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1249 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1249 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1250 | $ cd qclonedest2 |
|
1250 | $ cd qclonedest2 | |
1251 | $ qlog |
|
1251 | $ qlog | |
1252 | main repo: |
|
1252 | main repo: | |
1253 | rev 0: add foo |
|
1253 | rev 0: add foo | |
1254 | patch repo: |
|
1254 | patch repo: | |
1255 | rev 0: checkpoint |
|
1255 | rev 0: checkpoint | |
1256 | $ cd .. |
|
1256 | $ cd .. | |
1257 |
|
1257 | |||
1258 |
|
1258 | |||
1259 | Issue1033: test applying on an empty file |
|
1259 | Issue1033: test applying on an empty file | |
1260 |
|
1260 | |||
1261 | $ hg init empty |
|
1261 | $ hg init empty | |
1262 | $ cd empty |
|
1262 | $ cd empty | |
1263 | $ touch a |
|
1263 | $ touch a | |
1264 | $ hg ci -Am addempty |
|
1264 | $ hg ci -Am addempty | |
1265 | adding a |
|
1265 | adding a | |
1266 | $ echo a > a |
|
1266 | $ echo a > a | |
1267 | $ hg qnew -f -e changea |
|
1267 | $ hg qnew -f -e changea | |
1268 | $ hg qpop |
|
1268 | $ hg qpop | |
1269 | popping changea |
|
1269 | popping changea | |
1270 | patch queue now empty |
|
1270 | patch queue now empty | |
1271 | $ hg qpush |
|
1271 | $ hg qpush | |
1272 | applying changea |
|
1272 | applying changea | |
1273 | now at: changea |
|
1273 | now at: changea | |
1274 | $ cd .. |
|
1274 | $ cd .. | |
1275 |
|
1275 | |||
1276 | test qpush with --force, issue1087 |
|
1276 | test qpush with --force, issue1087 | |
1277 |
|
1277 | |||
1278 | $ hg init forcepush |
|
1278 | $ hg init forcepush | |
1279 | $ cd forcepush |
|
1279 | $ cd forcepush | |
1280 | $ echo hello > hello.txt |
|
1280 | $ echo hello > hello.txt | |
1281 | $ echo bye > bye.txt |
|
1281 | $ echo bye > bye.txt | |
1282 | $ hg ci -Ama |
|
1282 | $ hg ci -Ama | |
1283 | adding bye.txt |
|
1283 | adding bye.txt | |
1284 | adding hello.txt |
|
1284 | adding hello.txt | |
1285 | $ hg qnew -d '0 0' empty |
|
1285 | $ hg qnew -d '0 0' empty | |
1286 | $ hg qpop |
|
1286 | $ hg qpop | |
1287 | popping empty |
|
1287 | popping empty | |
1288 | patch queue now empty |
|
1288 | patch queue now empty | |
1289 | $ echo world >> hello.txt |
|
1289 | $ echo world >> hello.txt | |
1290 |
|
1290 | |||
1291 |
|
1291 | |||
1292 | qpush should fail, local changes |
|
1292 | qpush should fail, local changes | |
1293 |
|
1293 | |||
1294 | $ hg qpush |
|
1294 | $ hg qpush | |
1295 | abort: local changes found |
|
1295 | abort: local changes found | |
1296 | [255] |
|
1296 | [255] | |
1297 |
|
1297 | |||
1298 |
|
1298 | |||
1299 | apply force, should not discard changes with empty patch |
|
1299 | apply force, should not discard changes with empty patch | |
1300 |
|
1300 | |||
1301 | $ hg qpush -f |
|
1301 | $ hg qpush -f | |
1302 | applying empty |
|
1302 | applying empty | |
1303 | patch empty is empty |
|
1303 | patch empty is empty | |
1304 | now at: empty |
|
1304 | now at: empty | |
1305 | $ hg diff --config diff.nodates=True |
|
1305 | $ hg diff --config diff.nodates=True | |
1306 | diff -r d58265112590 hello.txt |
|
1306 | diff -r d58265112590 hello.txt | |
1307 | --- a/hello.txt |
|
1307 | --- a/hello.txt | |
1308 | +++ b/hello.txt |
|
1308 | +++ b/hello.txt | |
1309 | @@ -1,1 +1,2 @@ |
|
1309 | @@ -1,1 +1,2 @@ | |
1310 | hello |
|
1310 | hello | |
1311 | +world |
|
1311 | +world | |
1312 | $ hg qdiff --config diff.nodates=True |
|
1312 | $ hg qdiff --config diff.nodates=True | |
1313 | diff -r 9ecee4f634e3 hello.txt |
|
1313 | diff -r 9ecee4f634e3 hello.txt | |
1314 | --- a/hello.txt |
|
1314 | --- a/hello.txt | |
1315 | +++ b/hello.txt |
|
1315 | +++ b/hello.txt | |
1316 | @@ -1,1 +1,2 @@ |
|
1316 | @@ -1,1 +1,2 @@ | |
1317 | hello |
|
1317 | hello | |
1318 | +world |
|
1318 | +world | |
1319 | $ hg log -l1 -p |
|
1319 | $ hg log -l1 -p | |
1320 | changeset: 1:d58265112590 |
|
1320 | changeset: 1:d58265112590 | |
1321 | tag: empty |
|
1321 | tag: empty | |
1322 | tag: qbase |
|
1322 | tag: qbase | |
1323 | tag: qtip |
|
1323 | tag: qtip | |
1324 | tag: tip |
|
1324 | tag: tip | |
1325 | user: test |
|
1325 | user: test | |
1326 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1326 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1327 | summary: imported patch empty |
|
1327 | summary: imported patch empty | |
1328 |
|
1328 | |||
1329 |
|
1329 | |||
1330 | $ hg qref -d '0 0' |
|
1330 | $ hg qref -d '0 0' | |
1331 | $ hg qpop |
|
1331 | $ hg qpop | |
1332 | popping empty |
|
1332 | popping empty | |
1333 | patch queue now empty |
|
1333 | patch queue now empty | |
1334 | $ echo universe >> hello.txt |
|
1334 | $ echo universe >> hello.txt | |
1335 | $ echo universe >> bye.txt |
|
1335 | $ echo universe >> bye.txt | |
1336 |
|
1336 | |||
1337 |
|
1337 | |||
1338 | qpush should fail, local changes |
|
1338 | qpush should fail, local changes | |
1339 |
|
1339 | |||
1340 | $ hg qpush |
|
1340 | $ hg qpush | |
1341 | abort: local changes found |
|
1341 | abort: local changes found | |
1342 | [255] |
|
1342 | [255] | |
1343 |
|
1343 | |||
1344 |
|
1344 | |||
1345 | apply force, should discard changes in hello, but not bye |
|
1345 | apply force, should discard changes in hello, but not bye | |
1346 |
|
1346 | |||
1347 | $ hg qpush -f |
|
1347 | $ hg qpush -f | |
1348 | applying empty |
|
1348 | applying empty | |
1349 | now at: empty |
|
1349 | now at: empty | |
1350 | $ hg st |
|
1350 | $ hg st | |
1351 | M bye.txt |
|
1351 | M bye.txt | |
1352 | $ hg diff --config diff.nodates=True |
|
1352 | $ hg diff --config diff.nodates=True | |
1353 | diff -r ba252371dbc1 bye.txt |
|
1353 | diff -r ba252371dbc1 bye.txt | |
1354 | --- a/bye.txt |
|
1354 | --- a/bye.txt | |
1355 | +++ b/bye.txt |
|
1355 | +++ b/bye.txt | |
1356 | @@ -1,1 +1,2 @@ |
|
1356 | @@ -1,1 +1,2 @@ | |
1357 | bye |
|
1357 | bye | |
1358 | +universe |
|
1358 | +universe | |
1359 | $ hg qdiff --config diff.nodates=True |
|
1359 | $ hg qdiff --config diff.nodates=True | |
1360 | diff -r 9ecee4f634e3 bye.txt |
|
1360 | diff -r 9ecee4f634e3 bye.txt | |
1361 | --- a/bye.txt |
|
1361 | --- a/bye.txt | |
1362 | +++ b/bye.txt |
|
1362 | +++ b/bye.txt | |
1363 | @@ -1,1 +1,2 @@ |
|
1363 | @@ -1,1 +1,2 @@ | |
1364 | bye |
|
1364 | bye | |
1365 | +universe |
|
1365 | +universe | |
1366 | diff -r 9ecee4f634e3 hello.txt |
|
1366 | diff -r 9ecee4f634e3 hello.txt | |
1367 | --- a/hello.txt |
|
1367 | --- a/hello.txt | |
1368 | +++ b/hello.txt |
|
1368 | +++ b/hello.txt | |
1369 | @@ -1,1 +1,3 @@ |
|
1369 | @@ -1,1 +1,3 @@ | |
1370 | hello |
|
1370 | hello | |
1371 | +world |
|
1371 | +world | |
1372 | +universe |
|
1372 | +universe | |
1373 |
|
1373 | |||
1374 |
|
1374 | |||
1375 | test popping revisions not in working dir ancestry |
|
1375 | test popping revisions not in working dir ancestry | |
1376 |
|
1376 | |||
1377 | $ hg qseries -v |
|
1377 | $ hg qseries -v | |
1378 | 0 A empty |
|
1378 | 0 A empty | |
1379 | $ hg up qparent |
|
1379 | $ hg up qparent | |
1380 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1380 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1381 | $ hg qpop |
|
1381 | $ hg qpop | |
1382 | popping empty |
|
1382 | popping empty | |
1383 | patch queue now empty |
|
1383 | patch queue now empty | |
1384 |
|
1384 | |||
1385 | $ cd .. |
|
1385 | $ cd .. | |
1386 | $ hg init deletion-order |
|
1386 | $ hg init deletion-order | |
1387 | $ cd deletion-order |
|
1387 | $ cd deletion-order | |
1388 |
|
1388 | |||
1389 | $ touch a |
|
1389 | $ touch a | |
1390 | $ hg ci -Aqm0 |
|
1390 | $ hg ci -Aqm0 | |
1391 |
|
1391 | |||
1392 | $ hg qnew rename-dir |
|
1392 | $ hg qnew rename-dir | |
1393 | $ hg rm a |
|
1393 | $ hg rm a | |
1394 | $ hg qrefresh |
|
1394 | $ hg qrefresh | |
1395 |
|
1395 | |||
1396 | $ mkdir a b |
|
1396 | $ mkdir a b | |
1397 | $ touch a/a b/b |
|
1397 | $ touch a/a b/b | |
1398 | $ hg add -q a b |
|
1398 | $ hg add -q a b | |
1399 | $ hg qrefresh |
|
1399 | $ hg qrefresh | |
1400 |
|
1400 | |||
1401 |
|
1401 | |||
1402 | test popping must remove files added in subdirectories first |
|
1402 | test popping must remove files added in subdirectories first | |
1403 |
|
1403 | |||
1404 | $ hg qpop |
|
1404 | $ hg qpop | |
1405 | popping rename-dir |
|
1405 | popping rename-dir | |
1406 | patch queue now empty |
|
1406 | patch queue now empty | |
1407 | $ cd .. |
|
1407 | $ cd .. | |
1408 |
|
1408 | |||
1409 |
|
1409 | |||
1410 | test case preservation through patch pushing especially on case |
|
1410 | test case preservation through patch pushing especially on case | |
1411 | insensitive filesystem |
|
1411 | insensitive filesystem | |
1412 |
|
1412 | |||
1413 | $ hg init casepreserve |
|
1413 | $ hg init casepreserve | |
1414 | $ cd casepreserve |
|
1414 | $ cd casepreserve | |
1415 |
|
1415 | |||
1416 | $ hg qnew add-file1 |
|
1416 | $ hg qnew add-file1 | |
1417 | $ echo a > TeXtFiLe.TxT |
|
1417 | $ echo a > TeXtFiLe.TxT | |
1418 | $ hg add TeXtFiLe.TxT |
|
1418 | $ hg add TeXtFiLe.TxT | |
1419 | $ hg qrefresh |
|
1419 | $ hg qrefresh | |
1420 |
|
1420 | |||
1421 | $ hg qnew add-file2 |
|
1421 | $ hg qnew add-file2 | |
1422 | $ echo b > AnOtHeRFiLe.TxT |
|
1422 | $ echo b > AnOtHeRFiLe.TxT | |
1423 | $ hg add AnOtHeRFiLe.TxT |
|
1423 | $ hg add AnOtHeRFiLe.TxT | |
1424 | $ hg qrefresh |
|
1424 | $ hg qrefresh | |
1425 |
|
1425 | |||
1426 | $ hg qnew modify-file |
|
1426 | $ hg qnew modify-file | |
1427 | $ echo c >> AnOtHeRFiLe.TxT |
|
1427 | $ echo c >> AnOtHeRFiLe.TxT | |
1428 | $ hg qrefresh |
|
1428 | $ hg qrefresh | |
1429 |
|
1429 | |||
1430 | $ hg qapplied |
|
1430 | $ hg qapplied | |
1431 | add-file1 |
|
1431 | add-file1 | |
1432 | add-file2 |
|
1432 | add-file2 | |
1433 | modify-file |
|
1433 | modify-file | |
1434 | $ hg qpop -a |
|
1434 | $ hg qpop -a | |
1435 | popping modify-file |
|
1435 | popping modify-file | |
1436 | popping add-file2 |
|
1436 | popping add-file2 | |
1437 | popping add-file1 |
|
1437 | popping add-file1 | |
1438 | patch queue now empty |
|
1438 | patch queue now empty | |
1439 |
|
1439 | |||
1440 | this qpush causes problems below, if case preservation on case |
|
1440 | this qpush causes problems below, if case preservation on case | |
1441 | insensitive filesystem is not enough: |
|
1441 | insensitive filesystem is not enough: | |
1442 | (1) unexpected "adding ..." messages are shown |
|
1442 | (1) unexpected "adding ..." messages are shown | |
1443 | (2) patching fails in modification of (1) files |
|
1443 | (2) patching fails in modification of (1) files | |
1444 |
|
1444 | |||
1445 | $ hg qpush -a |
|
1445 | $ hg qpush -a | |
1446 | applying add-file1 |
|
1446 | applying add-file1 | |
1447 | applying add-file2 |
|
1447 | applying add-file2 | |
1448 | applying modify-file |
|
1448 | applying modify-file | |
1449 | now at: modify-file |
|
1449 | now at: modify-file | |
1450 |
|
1450 | |||
1451 | Proper phase default with mq: |
|
1451 | Proper phase default with mq: | |
1452 |
|
1452 | |||
1453 | 1. mq.secret=false |
|
1453 | 1. mq.secret=false | |
1454 |
|
1454 | |||
1455 | $ rm .hg/store/phaseroots |
|
1455 | $ rm .hg/store/phaseroots | |
1456 | $ hg phase 'qparent::' |
|
1456 | $ hg phase 'qparent::' | |
1457 | 0: draft |
|
1457 | 0: draft | |
1458 | 1: draft |
|
1458 | 1: draft | |
1459 | 2: draft |
|
1459 | 2: draft | |
1460 | $ echo '[mq]' >> $HGRCPATH |
|
1460 | $ echo '[mq]' >> $HGRCPATH | |
1461 | $ echo 'secret=true' >> $HGRCPATH |
|
1461 | $ echo 'secret=true' >> $HGRCPATH | |
1462 | $ rm -f .hg/store/phaseroots |
|
1462 | $ rm -f .hg/store/phaseroots | |
1463 | $ hg phase 'qparent::' |
|
1463 | $ hg phase 'qparent::' | |
1464 | 0: secret |
|
1464 | 0: secret | |
1465 | 1: secret |
|
1465 | 1: secret | |
1466 | 2: secret |
|
1466 | 2: secret | |
1467 |
|
1467 | |||
1468 | Test that qfinish change phase when mq.secret=true |
|
1468 | Test that qfinish change phase when mq.secret=true | |
1469 |
|
1469 | |||
1470 | $ hg qfinish qbase |
|
1470 | $ hg qfinish qbase | |
1471 | patch add-file1 finalized without changeset message |
|
1471 | patch add-file1 finalized without changeset message | |
1472 | $ hg phase 'all()' |
|
1472 | $ hg phase 'all()' | |
1473 | 0: draft |
|
1473 | 0: draft | |
1474 | 1: secret |
|
1474 | 1: secret | |
1475 | 2: secret |
|
1475 | 2: secret | |
1476 |
|
1476 | |||
1477 | Test that qfinish preserve phase when mq.secret=false |
|
1477 | Test that qfinish preserve phase when mq.secret=false | |
1478 |
|
1478 | |||
1479 |
$ sed -i |
|
1479 | $ sed -i.bak -e 's/secret=true/secret=false/' $HGRCPATH | |
1480 | $ hg qfinish qbase |
|
1480 | $ hg qfinish qbase | |
1481 | patch add-file2 finalized without changeset message |
|
1481 | patch add-file2 finalized without changeset message | |
1482 | $ hg phase 'all()' |
|
1482 | $ hg phase 'all()' | |
1483 | 0: draft |
|
1483 | 0: draft | |
1484 | 1: secret |
|
1484 | 1: secret | |
1485 | 2: secret |
|
1485 | 2: secret |
General Comments 0
You need to be logged in to leave comments.
Login now