Mercurial > hg
annotate tests/test-mq-qpush-fail.t @ 52293:77b38c86915d
ci: add a small script one can run to purge older pipeline
We have over ten thousands old pipeline that take a huge space and that I
suspect to be the source of some slowdown in merge request.
However it seems that the only way to clear them is manually and through the
API, so lets do it.
The script was run today.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 12 Nov 2024 12:45:23 +0100 |
parents | 63edc384d3b7 |
children |
rev | line source |
---|---|
12467
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
1 Test that qpush cleans things up if it doesn't complete |
4658
17f5d2069551
mq: test that qpush cleans things up when it fails
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
2 |
12467
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
3 $ echo "[extensions]" >> $HGRCPATH |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
4 $ echo "mq=" >> $HGRCPATH |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
5 $ hg init repo |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
6 $ cd repo |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
7 $ echo foo > foo |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
8 $ hg ci -Am 'add foo' |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
9 adding foo |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
10 $ touch untracked-file |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
11 $ echo 'syntax: glob' > .hgignore |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
12 $ echo '.hgignore' >> .hgignore |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
13 $ hg qinit |
8795
51c29aec0b75
mq: eliminate warning on qpush with empty series
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
14 |
12467
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
15 test qpush on empty series |
4658
17f5d2069551
mq: test that qpush cleans things up when it fails
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
16 |
12467
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
17 $ hg qpush |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
18 no patches in series |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
19 $ hg qnew patch1 |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
20 $ echo >> foo |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
21 $ hg qrefresh -m 'patch 1' |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
22 $ hg qnew patch2 |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
23 $ echo bar > bar |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
24 $ hg add bar |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
25 $ hg qrefresh -m 'patch 2' |
22545
6a2cfa61acb0
mq: upgrade non-plain patches to HG format when setting parent in patchheader
Mads Kiilerich <madski@unity3d.com>
parents:
22453
diff
changeset
|
26 $ hg qnew --config 'mq.plain=true' -U bad-patch |
12467
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
27 $ echo >> foo |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
28 $ hg qrefresh |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
29 $ hg qpop -a |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
30 popping bad-patch |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
31 popping patch2 |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
32 popping patch1 |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
33 patch queue now empty |
39707
5abc47d4ca6b
tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents:
37524
diff
changeset
|
34 $ "$PYTHON" -c 'import sys; getattr(sys.stdout, "buffer", sys.stdout).write(b"\xe9\n")' > message |
12467
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
35 $ cat .hg/patches/bad-patch >> message |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
36 $ mv message .hg/patches/bad-patch |
24992
7df090c9c9fe
localrepo: use changelog.hasnode instead of self.__contains__
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
24826
diff
changeset
|
37 $ cat > $TESTTMP/wrapplayback.py <<EOF |
7df090c9c9fe
localrepo: use changelog.hasnode instead of self.__contains__
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
24826
diff
changeset
|
38 > import os |
7df090c9c9fe
localrepo: use changelog.hasnode instead of self.__contains__
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
24826
diff
changeset
|
39 > from mercurial import extensions, transaction |
7df090c9c9fe
localrepo: use changelog.hasnode instead of self.__contains__
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
24826
diff
changeset
|
40 > def wrapplayback(orig, |
7df090c9c9fe
localrepo: use changelog.hasnode instead of self.__contains__
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
24826
diff
changeset
|
41 > journal, report, opener, vfsmap, entries, backupentries, |
33278
87bca10a06ed
transaction: avoid file stat ambiguity only for files in blacklist
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26943
diff
changeset
|
42 > unlink=True, checkambigfiles=None): |
87bca10a06ed
transaction: avoid file stat ambiguity only for files in blacklist
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26943
diff
changeset
|
43 > orig(journal, report, opener, vfsmap, entries, backupentries, unlink, |
87bca10a06ed
transaction: avoid file stat ambiguity only for files in blacklist
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26943
diff
changeset
|
44 > checkambigfiles) |
24992
7df090c9c9fe
localrepo: use changelog.hasnode instead of self.__contains__
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
24826
diff
changeset
|
45 > # Touching files truncated at "transaction.abort" causes |
7df090c9c9fe
localrepo: use changelog.hasnode instead of self.__contains__
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
24826
diff
changeset
|
46 > # forcible re-loading invalidated filecache properties |
7df090c9c9fe
localrepo: use changelog.hasnode instead of self.__contains__
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
24826
diff
changeset
|
47 > # (including repo.changelog) |
45869
63edc384d3b7
transaction: drop per-file extra data support
Joerg Sonnenberger <joerg@bec.de>
parents:
39707
diff
changeset
|
48 > for f, o in entries: |
24992
7df090c9c9fe
localrepo: use changelog.hasnode instead of self.__contains__
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
24826
diff
changeset
|
49 > if o or not unlink: |
7df090c9c9fe
localrepo: use changelog.hasnode instead of self.__contains__
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
24826
diff
changeset
|
50 > os.utime(opener.join(f), (0.0, 0.0)) |
7df090c9c9fe
localrepo: use changelog.hasnode instead of self.__contains__
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
24826
diff
changeset
|
51 > def extsetup(ui): |
7df090c9c9fe
localrepo: use changelog.hasnode instead of self.__contains__
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
24826
diff
changeset
|
52 > extensions.wrapfunction(transaction, '_playback', wrapplayback) |
7df090c9c9fe
localrepo: use changelog.hasnode instead of self.__contains__
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
24826
diff
changeset
|
53 > EOF |
7df090c9c9fe
localrepo: use changelog.hasnode instead of self.__contains__
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
24826
diff
changeset
|
54 $ hg qpush -a --config extensions.wrapplayback=$TESTTMP/wrapplayback.py && echo 'qpush succeeded?!' |
12467
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
55 applying patch1 |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
56 applying patch2 |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
57 applying bad-patch |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
58 transaction abort! |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
59 rollback completed |
26654
30657909b2ba
mq: use cmdutil.revert instead of hg.revert
Matt Mackall <mpm@selenic.com>
parents:
24992
diff
changeset
|
60 cleaning up working directory... |
30657909b2ba
mq: use cmdutil.revert instead of hg.revert
Matt Mackall <mpm@selenic.com>
parents:
24992
diff
changeset
|
61 reverting foo |
30657909b2ba
mq: use cmdutil.revert instead of hg.revert
Matt Mackall <mpm@selenic.com>
parents:
24992
diff
changeset
|
62 done |
12942
05fffd665170
tests: use (esc) for all non-ASCII test output
Mads Kiilerich <mads@kiilerich.com>
parents:
12467
diff
changeset
|
63 abort: decoding near '\xe9': 'ascii' codec can't decode byte 0xe9 in position 0: ordinal not in range(128)! (esc) |
12467
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
64 [255] |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
65 $ hg parents |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
66 changeset: 0:bbd179dfa0a7 |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
67 tag: tip |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
68 user: test |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
69 date: Thu Jan 01 00:00:00 1970 +0000 |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
70 summary: add foo |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
71 |
4658
17f5d2069551
mq: test that qpush cleans things up when it fails
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
72 |
13508
0396ca8015be
mq: fix qpush recursion in _findtags when status file is wrong (issue2664)
Matt Mackall <mpm@selenic.com>
parents:
13369
diff
changeset
|
73 test corrupt status file |
0396ca8015be
mq: fix qpush recursion in _findtags when status file is wrong (issue2664)
Matt Mackall <mpm@selenic.com>
parents:
13369
diff
changeset
|
74 $ hg qpush |
0396ca8015be
mq: fix qpush recursion in _findtags when status file is wrong (issue2664)
Matt Mackall <mpm@selenic.com>
parents:
13369
diff
changeset
|
75 applying patch1 |
0396ca8015be
mq: fix qpush recursion in _findtags when status file is wrong (issue2664)
Matt Mackall <mpm@selenic.com>
parents:
13369
diff
changeset
|
76 now at: patch1 |
0396ca8015be
mq: fix qpush recursion in _findtags when status file is wrong (issue2664)
Matt Mackall <mpm@selenic.com>
parents:
13369
diff
changeset
|
77 $ cp .hg/patches/status .hg/patches/status.orig |
0396ca8015be
mq: fix qpush recursion in _findtags when status file is wrong (issue2664)
Matt Mackall <mpm@selenic.com>
parents:
13369
diff
changeset
|
78 $ hg qpop |
0396ca8015be
mq: fix qpush recursion in _findtags when status file is wrong (issue2664)
Matt Mackall <mpm@selenic.com>
parents:
13369
diff
changeset
|
79 popping patch1 |
0396ca8015be
mq: fix qpush recursion in _findtags when status file is wrong (issue2664)
Matt Mackall <mpm@selenic.com>
parents:
13369
diff
changeset
|
80 patch queue now empty |
0396ca8015be
mq: fix qpush recursion in _findtags when status file is wrong (issue2664)
Matt Mackall <mpm@selenic.com>
parents:
13369
diff
changeset
|
81 $ cp .hg/patches/status.orig .hg/patches/status |
0396ca8015be
mq: fix qpush recursion in _findtags when status file is wrong (issue2664)
Matt Mackall <mpm@selenic.com>
parents:
13369
diff
changeset
|
82 $ hg qpush |
0396ca8015be
mq: fix qpush recursion in _findtags when status file is wrong (issue2664)
Matt Mackall <mpm@selenic.com>
parents:
13369
diff
changeset
|
83 abort: working directory revision is not qtip |
0396ca8015be
mq: fix qpush recursion in _findtags when status file is wrong (issue2664)
Matt Mackall <mpm@selenic.com>
parents:
13369
diff
changeset
|
84 [255] |
0396ca8015be
mq: fix qpush recursion in _findtags when status file is wrong (issue2664)
Matt Mackall <mpm@selenic.com>
parents:
13369
diff
changeset
|
85 $ rm .hg/patches/status .hg/patches/status.orig |
0396ca8015be
mq: fix qpush recursion in _findtags when status file is wrong (issue2664)
Matt Mackall <mpm@selenic.com>
parents:
13369
diff
changeset
|
86 |
0396ca8015be
mq: fix qpush recursion in _findtags when status file is wrong (issue2664)
Matt Mackall <mpm@selenic.com>
parents:
13369
diff
changeset
|
87 |
12467
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
88 bar should be gone; other unknown/ignored files should still be around |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
89 |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
90 $ hg status -A |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
91 ? untracked-file |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
92 I .hgignore |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
93 C foo |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
94 |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
95 preparing qpush of a missing patch |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
96 |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
97 $ hg qpop -a |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
98 no patches applied |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
99 $ hg qpush |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
100 applying patch1 |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
101 now at: patch1 |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
102 $ rm .hg/patches/patch2 |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
103 |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
104 now we expect the push to fail, but it should NOT complain about patch1 |
8875
801cacf46e62
mq: fix error message for qpush inexistent-patch (issue1702)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
8795
diff
changeset
|
105 |
12467
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
106 $ hg qpush |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
107 applying patch2 |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
108 unable to read patch2 |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
109 now at: patch1 |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
110 [1] |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
111 |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
112 preparing qpush of missing patch with no patch applied |
8875
801cacf46e62
mq: fix error message for qpush inexistent-patch (issue1702)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
8795
diff
changeset
|
113 |
12467
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
114 $ hg qpop -a |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
115 popping patch1 |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
116 patch queue now empty |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
117 $ rm .hg/patches/patch1 |
9590
07a62819b309
mq: fix traceback for qpush inexistant-patch with no patch applied
Benoit Allard <benoit@aeteurope.nl>
parents:
8875
diff
changeset
|
118 |
12467
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
119 qpush should fail the same way as below |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
120 |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
121 $ hg qpush |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
122 applying patch1 |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
123 unable to read patch1 |
05e1171cf4ca
tests: unify test-mq-qpush-fail
Matt Mackall <mpm@selenic.com>
parents:
10397
diff
changeset
|
124 [1] |
13369
69238d0ca60f
mq: catch attempt to qpush to an earlier patch (issue2587)
Afuna <afunamatata@gmail.com>
parents:
12942
diff
changeset
|
125 |
69238d0ca60f
mq: catch attempt to qpush to an earlier patch (issue2587)
Afuna <afunamatata@gmail.com>
parents:
12942
diff
changeset
|
126 Test qpush to a patch below the currently applied patch. |
69238d0ca60f
mq: catch attempt to qpush to an earlier patch (issue2587)
Afuna <afunamatata@gmail.com>
parents:
12942
diff
changeset
|
127 |
69238d0ca60f
mq: catch attempt to qpush to an earlier patch (issue2587)
Afuna <afunamatata@gmail.com>
parents:
12942
diff
changeset
|
128 $ hg qq -c guardedseriesorder |
69238d0ca60f
mq: catch attempt to qpush to an earlier patch (issue2587)
Afuna <afunamatata@gmail.com>
parents:
12942
diff
changeset
|
129 $ hg qnew a |
69238d0ca60f
mq: catch attempt to qpush to an earlier patch (issue2587)
Afuna <afunamatata@gmail.com>
parents:
12942
diff
changeset
|
130 $ hg qguard +block |
69238d0ca60f
mq: catch attempt to qpush to an earlier patch (issue2587)
Afuna <afunamatata@gmail.com>
parents:
12942
diff
changeset
|
131 $ hg qnew b |
69238d0ca60f
mq: catch attempt to qpush to an earlier patch (issue2587)
Afuna <afunamatata@gmail.com>
parents:
12942
diff
changeset
|
132 $ hg qnew c |
69238d0ca60f
mq: catch attempt to qpush to an earlier patch (issue2587)
Afuna <afunamatata@gmail.com>
parents:
12942
diff
changeset
|
133 |
69238d0ca60f
mq: catch attempt to qpush to an earlier patch (issue2587)
Afuna <afunamatata@gmail.com>
parents:
12942
diff
changeset
|
134 $ hg qpop -a |
69238d0ca60f
mq: catch attempt to qpush to an earlier patch (issue2587)
Afuna <afunamatata@gmail.com>
parents:
12942
diff
changeset
|
135 popping c |
69238d0ca60f
mq: catch attempt to qpush to an earlier patch (issue2587)
Afuna <afunamatata@gmail.com>
parents:
12942
diff
changeset
|
136 popping b |
69238d0ca60f
mq: catch attempt to qpush to an earlier patch (issue2587)
Afuna <afunamatata@gmail.com>
parents:
12942
diff
changeset
|
137 popping a |
69238d0ca60f
mq: catch attempt to qpush to an earlier patch (issue2587)
Afuna <afunamatata@gmail.com>
parents:
12942
diff
changeset
|
138 patch queue now empty |
69238d0ca60f
mq: catch attempt to qpush to an earlier patch (issue2587)
Afuna <afunamatata@gmail.com>
parents:
12942
diff
changeset
|
139 |
69238d0ca60f
mq: catch attempt to qpush to an earlier patch (issue2587)
Afuna <afunamatata@gmail.com>
parents:
12942
diff
changeset
|
140 try to push and pop while a is guarded |
69238d0ca60f
mq: catch attempt to qpush to an earlier patch (issue2587)
Afuna <afunamatata@gmail.com>
parents:
12942
diff
changeset
|
141 |
69238d0ca60f
mq: catch attempt to qpush to an earlier patch (issue2587)
Afuna <afunamatata@gmail.com>
parents:
12942
diff
changeset
|
142 $ hg qpush a |
14464
00256f689f9c
mq: print "'foo' 'bar'", not "['foo', 'bar']" when showing guards
Martin Geisler <mg@aragost.com>
parents:
13508
diff
changeset
|
143 cannot push 'a' - guarded by '+block' |
13369
69238d0ca60f
mq: catch attempt to qpush to an earlier patch (issue2587)
Afuna <afunamatata@gmail.com>
parents:
12942
diff
changeset
|
144 [1] |
69238d0ca60f
mq: catch attempt to qpush to an earlier patch (issue2587)
Afuna <afunamatata@gmail.com>
parents:
12942
diff
changeset
|
145 $ hg qpush -a |
69238d0ca60f
mq: catch attempt to qpush to an earlier patch (issue2587)
Afuna <afunamatata@gmail.com>
parents:
12942
diff
changeset
|
146 applying b |
69238d0ca60f
mq: catch attempt to qpush to an earlier patch (issue2587)
Afuna <afunamatata@gmail.com>
parents:
12942
diff
changeset
|
147 patch b is empty |
69238d0ca60f
mq: catch attempt to qpush to an earlier patch (issue2587)
Afuna <afunamatata@gmail.com>
parents:
12942
diff
changeset
|
148 applying c |
69238d0ca60f
mq: catch attempt to qpush to an earlier patch (issue2587)
Afuna <afunamatata@gmail.com>
parents:
12942
diff
changeset
|
149 patch c is empty |
69238d0ca60f
mq: catch attempt to qpush to an earlier patch (issue2587)
Afuna <afunamatata@gmail.com>
parents:
12942
diff
changeset
|
150 now at: c |
69238d0ca60f
mq: catch attempt to qpush to an earlier patch (issue2587)
Afuna <afunamatata@gmail.com>
parents:
12942
diff
changeset
|
151 |
69238d0ca60f
mq: catch attempt to qpush to an earlier patch (issue2587)
Afuna <afunamatata@gmail.com>
parents:
12942
diff
changeset
|
152 now try it when a is unguarded, and we're at the top of the queue |
22453
fd0f0b0d316d
mq: report correct numbers for changing "number of guarded, applied patches"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18217
diff
changeset
|
153 |
fd0f0b0d316d
mq: report correct numbers for changing "number of guarded, applied patches"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18217
diff
changeset
|
154 $ hg qapplied -v |
fd0f0b0d316d
mq: report correct numbers for changing "number of guarded, applied patches"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18217
diff
changeset
|
155 0 G a |
fd0f0b0d316d
mq: report correct numbers for changing "number of guarded, applied patches"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18217
diff
changeset
|
156 1 A b |
fd0f0b0d316d
mq: report correct numbers for changing "number of guarded, applied patches"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18217
diff
changeset
|
157 2 A c |
13369
69238d0ca60f
mq: catch attempt to qpush to an earlier patch (issue2587)
Afuna <afunamatata@gmail.com>
parents:
12942
diff
changeset
|
158 $ hg qsel block |
69238d0ca60f
mq: catch attempt to qpush to an earlier patch (issue2587)
Afuna <afunamatata@gmail.com>
parents:
12942
diff
changeset
|
159 $ hg qpush b |
69238d0ca60f
mq: catch attempt to qpush to an earlier patch (issue2587)
Afuna <afunamatata@gmail.com>
parents:
12942
diff
changeset
|
160 abort: cannot push to a previous patch: b |
69238d0ca60f
mq: catch attempt to qpush to an earlier patch (issue2587)
Afuna <afunamatata@gmail.com>
parents:
12942
diff
changeset
|
161 [255] |
69238d0ca60f
mq: catch attempt to qpush to an earlier patch (issue2587)
Afuna <afunamatata@gmail.com>
parents:
12942
diff
changeset
|
162 $ hg qpush a |
69238d0ca60f
mq: catch attempt to qpush to an earlier patch (issue2587)
Afuna <afunamatata@gmail.com>
parents:
12942
diff
changeset
|
163 abort: cannot push to a previous patch: a |
69238d0ca60f
mq: catch attempt to qpush to an earlier patch (issue2587)
Afuna <afunamatata@gmail.com>
parents:
12942
diff
changeset
|
164 [255] |
69238d0ca60f
mq: catch attempt to qpush to an earlier patch (issue2587)
Afuna <afunamatata@gmail.com>
parents:
12942
diff
changeset
|
165 |
69238d0ca60f
mq: catch attempt to qpush to an earlier patch (issue2587)
Afuna <afunamatata@gmail.com>
parents:
12942
diff
changeset
|
166 and now we try it one more time with a unguarded, while we're not at the top of the queue |
69238d0ca60f
mq: catch attempt to qpush to an earlier patch (issue2587)
Afuna <afunamatata@gmail.com>
parents:
12942
diff
changeset
|
167 |
69238d0ca60f
mq: catch attempt to qpush to an earlier patch (issue2587)
Afuna <afunamatata@gmail.com>
parents:
12942
diff
changeset
|
168 $ hg qpop b |
69238d0ca60f
mq: catch attempt to qpush to an earlier patch (issue2587)
Afuna <afunamatata@gmail.com>
parents:
12942
diff
changeset
|
169 popping c |
69238d0ca60f
mq: catch attempt to qpush to an earlier patch (issue2587)
Afuna <afunamatata@gmail.com>
parents:
12942
diff
changeset
|
170 now at: b |
69238d0ca60f
mq: catch attempt to qpush to an earlier patch (issue2587)
Afuna <afunamatata@gmail.com>
parents:
12942
diff
changeset
|
171 $ hg qpush a |
69238d0ca60f
mq: catch attempt to qpush to an earlier patch (issue2587)
Afuna <afunamatata@gmail.com>
parents:
12942
diff
changeset
|
172 abort: cannot push to a previous patch: a |
69238d0ca60f
mq: catch attempt to qpush to an earlier patch (issue2587)
Afuna <afunamatata@gmail.com>
parents:
12942
diff
changeset
|
173 [255] |
69238d0ca60f
mq: catch attempt to qpush to an earlier patch (issue2587)
Afuna <afunamatata@gmail.com>
parents:
12942
diff
changeset
|
174 |
16633
b2ca2f40c9c1
mq: backup local changes in qpop --force (issue3433)
Patrick Mezard <patrick@mezard.eu>
parents:
14464
diff
changeset
|
175 test qpop --force and backup files |
b2ca2f40c9c1
mq: backup local changes in qpop --force (issue3433)
Patrick Mezard <patrick@mezard.eu>
parents:
14464
diff
changeset
|
176 |
b2ca2f40c9c1
mq: backup local changes in qpop --force (issue3433)
Patrick Mezard <patrick@mezard.eu>
parents:
14464
diff
changeset
|
177 $ hg qpop -a |
b2ca2f40c9c1
mq: backup local changes in qpop --force (issue3433)
Patrick Mezard <patrick@mezard.eu>
parents:
14464
diff
changeset
|
178 popping b |
b2ca2f40c9c1
mq: backup local changes in qpop --force (issue3433)
Patrick Mezard <patrick@mezard.eu>
parents:
14464
diff
changeset
|
179 patch queue now empty |
b2ca2f40c9c1
mq: backup local changes in qpop --force (issue3433)
Patrick Mezard <patrick@mezard.eu>
parents:
14464
diff
changeset
|
180 $ hg qq --create force |
b2ca2f40c9c1
mq: backup local changes in qpop --force (issue3433)
Patrick Mezard <patrick@mezard.eu>
parents:
14464
diff
changeset
|
181 $ echo a > a |
b2ca2f40c9c1
mq: backup local changes in qpop --force (issue3433)
Patrick Mezard <patrick@mezard.eu>
parents:
14464
diff
changeset
|
182 $ echo b > b |
b2ca2f40c9c1
mq: backup local changes in qpop --force (issue3433)
Patrick Mezard <patrick@mezard.eu>
parents:
14464
diff
changeset
|
183 $ echo c > c |
b2ca2f40c9c1
mq: backup local changes in qpop --force (issue3433)
Patrick Mezard <patrick@mezard.eu>
parents:
14464
diff
changeset
|
184 $ hg ci -Am add a b c |
b2ca2f40c9c1
mq: backup local changes in qpop --force (issue3433)
Patrick Mezard <patrick@mezard.eu>
parents:
14464
diff
changeset
|
185 $ echo a >> a |
b2ca2f40c9c1
mq: backup local changes in qpop --force (issue3433)
Patrick Mezard <patrick@mezard.eu>
parents:
14464
diff
changeset
|
186 $ hg rm b |
b2ca2f40c9c1
mq: backup local changes in qpop --force (issue3433)
Patrick Mezard <patrick@mezard.eu>
parents:
14464
diff
changeset
|
187 $ hg rm c |
b2ca2f40c9c1
mq: backup local changes in qpop --force (issue3433)
Patrick Mezard <patrick@mezard.eu>
parents:
14464
diff
changeset
|
188 $ hg qnew p1 |
b2ca2f40c9c1
mq: backup local changes in qpop --force (issue3433)
Patrick Mezard <patrick@mezard.eu>
parents:
14464
diff
changeset
|
189 $ echo a >> a |
b2ca2f40c9c1
mq: backup local changes in qpop --force (issue3433)
Patrick Mezard <patrick@mezard.eu>
parents:
14464
diff
changeset
|
190 $ echo bb > b |
b2ca2f40c9c1
mq: backup local changes in qpop --force (issue3433)
Patrick Mezard <patrick@mezard.eu>
parents:
14464
diff
changeset
|
191 $ hg add b |
b2ca2f40c9c1
mq: backup local changes in qpop --force (issue3433)
Patrick Mezard <patrick@mezard.eu>
parents:
14464
diff
changeset
|
192 $ echo cc > c |
b2ca2f40c9c1
mq: backup local changes in qpop --force (issue3433)
Patrick Mezard <patrick@mezard.eu>
parents:
14464
diff
changeset
|
193 $ hg add c |
b2ca2f40c9c1
mq: backup local changes in qpop --force (issue3433)
Patrick Mezard <patrick@mezard.eu>
parents:
14464
diff
changeset
|
194 $ hg qpop --force --verbose |
b2ca2f40c9c1
mq: backup local changes in qpop --force (issue3433)
Patrick Mezard <patrick@mezard.eu>
parents:
14464
diff
changeset
|
195 saving current version of a as a.orig |
b2ca2f40c9c1
mq: backup local changes in qpop --force (issue3433)
Patrick Mezard <patrick@mezard.eu>
parents:
14464
diff
changeset
|
196 saving current version of b as b.orig |
b2ca2f40c9c1
mq: backup local changes in qpop --force (issue3433)
Patrick Mezard <patrick@mezard.eu>
parents:
14464
diff
changeset
|
197 saving current version of c as c.orig |
b2ca2f40c9c1
mq: backup local changes in qpop --force (issue3433)
Patrick Mezard <patrick@mezard.eu>
parents:
14464
diff
changeset
|
198 popping p1 |
b2ca2f40c9c1
mq: backup local changes in qpop --force (issue3433)
Patrick Mezard <patrick@mezard.eu>
parents:
14464
diff
changeset
|
199 patch queue now empty |
b2ca2f40c9c1
mq: backup local changes in qpop --force (issue3433)
Patrick Mezard <patrick@mezard.eu>
parents:
14464
diff
changeset
|
200 $ hg st |
b2ca2f40c9c1
mq: backup local changes in qpop --force (issue3433)
Patrick Mezard <patrick@mezard.eu>
parents:
14464
diff
changeset
|
201 ? a.orig |
b2ca2f40c9c1
mq: backup local changes in qpop --force (issue3433)
Patrick Mezard <patrick@mezard.eu>
parents:
14464
diff
changeset
|
202 ? b.orig |
b2ca2f40c9c1
mq: backup local changes in qpop --force (issue3433)
Patrick Mezard <patrick@mezard.eu>
parents:
14464
diff
changeset
|
203 ? c.orig |
b2ca2f40c9c1
mq: backup local changes in qpop --force (issue3433)
Patrick Mezard <patrick@mezard.eu>
parents:
14464
diff
changeset
|
204 ? untracked-file |
b2ca2f40c9c1
mq: backup local changes in qpop --force (issue3433)
Patrick Mezard <patrick@mezard.eu>
parents:
14464
diff
changeset
|
205 $ cat a.orig |
b2ca2f40c9c1
mq: backup local changes in qpop --force (issue3433)
Patrick Mezard <patrick@mezard.eu>
parents:
14464
diff
changeset
|
206 a |
b2ca2f40c9c1
mq: backup local changes in qpop --force (issue3433)
Patrick Mezard <patrick@mezard.eu>
parents:
14464
diff
changeset
|
207 a |
b2ca2f40c9c1
mq: backup local changes in qpop --force (issue3433)
Patrick Mezard <patrick@mezard.eu>
parents:
14464
diff
changeset
|
208 a |
b2ca2f40c9c1
mq: backup local changes in qpop --force (issue3433)
Patrick Mezard <patrick@mezard.eu>
parents:
14464
diff
changeset
|
209 $ cat b.orig |
b2ca2f40c9c1
mq: backup local changes in qpop --force (issue3433)
Patrick Mezard <patrick@mezard.eu>
parents:
14464
diff
changeset
|
210 bb |
b2ca2f40c9c1
mq: backup local changes in qpop --force (issue3433)
Patrick Mezard <patrick@mezard.eu>
parents:
14464
diff
changeset
|
211 $ cat c.orig |
b2ca2f40c9c1
mq: backup local changes in qpop --force (issue3433)
Patrick Mezard <patrick@mezard.eu>
parents:
14464
diff
changeset
|
212 cc |
16634
435375cc0ca0
mq: backup local changes in qpush --force
Patrick Mezard <patrick@mezard.eu>
parents:
16633
diff
changeset
|
213 |
16635
9d76320d8b99
mq: add --no-backup for qpush/qpop/qgoto
Patrick Mezard <patrick@mezard.eu>
parents:
16634
diff
changeset
|
214 test qpop --force --no-backup |
9d76320d8b99
mq: add --no-backup for qpush/qpop/qgoto
Patrick Mezard <patrick@mezard.eu>
parents:
16634
diff
changeset
|
215 |
9d76320d8b99
mq: add --no-backup for qpush/qpop/qgoto
Patrick Mezard <patrick@mezard.eu>
parents:
16634
diff
changeset
|
216 $ hg qpush |
9d76320d8b99
mq: add --no-backup for qpush/qpop/qgoto
Patrick Mezard <patrick@mezard.eu>
parents:
16634
diff
changeset
|
217 applying p1 |
9d76320d8b99
mq: add --no-backup for qpush/qpop/qgoto
Patrick Mezard <patrick@mezard.eu>
parents:
16634
diff
changeset
|
218 now at: p1 |
9d76320d8b99
mq: add --no-backup for qpush/qpop/qgoto
Patrick Mezard <patrick@mezard.eu>
parents:
16634
diff
changeset
|
219 $ rm a.orig |
9d76320d8b99
mq: add --no-backup for qpush/qpop/qgoto
Patrick Mezard <patrick@mezard.eu>
parents:
16634
diff
changeset
|
220 $ echo a >> a |
9d76320d8b99
mq: add --no-backup for qpush/qpop/qgoto
Patrick Mezard <patrick@mezard.eu>
parents:
16634
diff
changeset
|
221 $ hg qpop --force --no-backup --verbose |
9d76320d8b99
mq: add --no-backup for qpush/qpop/qgoto
Patrick Mezard <patrick@mezard.eu>
parents:
16634
diff
changeset
|
222 popping p1 |
9d76320d8b99
mq: add --no-backup for qpush/qpop/qgoto
Patrick Mezard <patrick@mezard.eu>
parents:
16634
diff
changeset
|
223 patch queue now empty |
9d76320d8b99
mq: add --no-backup for qpush/qpop/qgoto
Patrick Mezard <patrick@mezard.eu>
parents:
16634
diff
changeset
|
224 $ test -f a.orig && echo 'error: backup with --no-backup' |
9d76320d8b99
mq: add --no-backup for qpush/qpop/qgoto
Patrick Mezard <patrick@mezard.eu>
parents:
16634
diff
changeset
|
225 [1] |
9d76320d8b99
mq: add --no-backup for qpush/qpop/qgoto
Patrick Mezard <patrick@mezard.eu>
parents:
16634
diff
changeset
|
226 |
16733
4da10c00a20c
mq: rename --check into --keep-changes
Patrick Mezard <patrick@mezard.eu>
parents:
16656
diff
changeset
|
227 test qpop --keep-changes |
16653
73b8c2554be8
mq: introduce qpop --check
Patrick Mezard <patrick@mezard.eu>
parents:
16635
diff
changeset
|
228 |
73b8c2554be8
mq: introduce qpop --check
Patrick Mezard <patrick@mezard.eu>
parents:
16635
diff
changeset
|
229 $ hg qpush |
73b8c2554be8
mq: introduce qpop --check
Patrick Mezard <patrick@mezard.eu>
parents:
16635
diff
changeset
|
230 applying p1 |
73b8c2554be8
mq: introduce qpop --check
Patrick Mezard <patrick@mezard.eu>
parents:
16635
diff
changeset
|
231 now at: p1 |
16733
4da10c00a20c
mq: rename --check into --keep-changes
Patrick Mezard <patrick@mezard.eu>
parents:
16656
diff
changeset
|
232 $ hg qpop --keep-changes --force |
4da10c00a20c
mq: rename --check into --keep-changes
Patrick Mezard <patrick@mezard.eu>
parents:
16656
diff
changeset
|
233 abort: cannot use both --force and --keep-changes |
16653
73b8c2554be8
mq: introduce qpop --check
Patrick Mezard <patrick@mezard.eu>
parents:
16635
diff
changeset
|
234 [255] |
73b8c2554be8
mq: introduce qpop --check
Patrick Mezard <patrick@mezard.eu>
parents:
16635
diff
changeset
|
235 $ echo a >> a |
16733
4da10c00a20c
mq: rename --check into --keep-changes
Patrick Mezard <patrick@mezard.eu>
parents:
16656
diff
changeset
|
236 $ hg qpop --keep-changes |
26780 | 237 abort: local changes found, qrefresh first |
16653
73b8c2554be8
mq: introduce qpop --check
Patrick Mezard <patrick@mezard.eu>
parents:
16635
diff
changeset
|
238 [255] |
73b8c2554be8
mq: introduce qpop --check
Patrick Mezard <patrick@mezard.eu>
parents:
16635
diff
changeset
|
239 $ hg revert -qa a |
73b8c2554be8
mq: introduce qpop --check
Patrick Mezard <patrick@mezard.eu>
parents:
16635
diff
changeset
|
240 $ rm a |
16733
4da10c00a20c
mq: rename --check into --keep-changes
Patrick Mezard <patrick@mezard.eu>
parents:
16656
diff
changeset
|
241 $ hg qpop --keep-changes |
26780 | 242 abort: local changes found, qrefresh first |
16653
73b8c2554be8
mq: introduce qpop --check
Patrick Mezard <patrick@mezard.eu>
parents:
16635
diff
changeset
|
243 [255] |
73b8c2554be8
mq: introduce qpop --check
Patrick Mezard <patrick@mezard.eu>
parents:
16635
diff
changeset
|
244 $ hg rm -A a |
16733
4da10c00a20c
mq: rename --check into --keep-changes
Patrick Mezard <patrick@mezard.eu>
parents:
16656
diff
changeset
|
245 $ hg qpop --keep-changes |
26780 | 246 abort: local changes found, qrefresh first |
16653
73b8c2554be8
mq: introduce qpop --check
Patrick Mezard <patrick@mezard.eu>
parents:
16635
diff
changeset
|
247 [255] |
73b8c2554be8
mq: introduce qpop --check
Patrick Mezard <patrick@mezard.eu>
parents:
16635
diff
changeset
|
248 $ hg revert -qa a |
73b8c2554be8
mq: introduce qpop --check
Patrick Mezard <patrick@mezard.eu>
parents:
16635
diff
changeset
|
249 $ echo b > b |
73b8c2554be8
mq: introduce qpop --check
Patrick Mezard <patrick@mezard.eu>
parents:
16635
diff
changeset
|
250 $ hg add b |
16733
4da10c00a20c
mq: rename --check into --keep-changes
Patrick Mezard <patrick@mezard.eu>
parents:
16656
diff
changeset
|
251 $ hg qpop --keep-changes |
26780 | 252 abort: local changes found, qrefresh first |
16653
73b8c2554be8
mq: introduce qpop --check
Patrick Mezard <patrick@mezard.eu>
parents:
16635
diff
changeset
|
253 [255] |
73b8c2554be8
mq: introduce qpop --check
Patrick Mezard <patrick@mezard.eu>
parents:
16635
diff
changeset
|
254 $ hg forget b |
73b8c2554be8
mq: introduce qpop --check
Patrick Mezard <patrick@mezard.eu>
parents:
16635
diff
changeset
|
255 $ echo d > d |
73b8c2554be8
mq: introduce qpop --check
Patrick Mezard <patrick@mezard.eu>
parents:
16635
diff
changeset
|
256 $ hg add d |
16733
4da10c00a20c
mq: rename --check into --keep-changes
Patrick Mezard <patrick@mezard.eu>
parents:
16656
diff
changeset
|
257 $ hg qpop --keep-changes |
16653
73b8c2554be8
mq: introduce qpop --check
Patrick Mezard <patrick@mezard.eu>
parents:
16635
diff
changeset
|
258 popping p1 |
73b8c2554be8
mq: introduce qpop --check
Patrick Mezard <patrick@mezard.eu>
parents:
16635
diff
changeset
|
259 patch queue now empty |
73b8c2554be8
mq: introduce qpop --check
Patrick Mezard <patrick@mezard.eu>
parents:
16635
diff
changeset
|
260 $ hg forget d |
73b8c2554be8
mq: introduce qpop --check
Patrick Mezard <patrick@mezard.eu>
parents:
16635
diff
changeset
|
261 $ rm d |
73b8c2554be8
mq: introduce qpop --check
Patrick Mezard <patrick@mezard.eu>
parents:
16635
diff
changeset
|
262 |
16634
435375cc0ca0
mq: backup local changes in qpush --force
Patrick Mezard <patrick@mezard.eu>
parents:
16633
diff
changeset
|
263 test qpush --force and backup files |
435375cc0ca0
mq: backup local changes in qpush --force
Patrick Mezard <patrick@mezard.eu>
parents:
16633
diff
changeset
|
264 |
435375cc0ca0
mq: backup local changes in qpush --force
Patrick Mezard <patrick@mezard.eu>
parents:
16633
diff
changeset
|
265 $ echo a >> a |
435375cc0ca0
mq: backup local changes in qpush --force
Patrick Mezard <patrick@mezard.eu>
parents:
16633
diff
changeset
|
266 $ hg qnew p2 |
435375cc0ca0
mq: backup local changes in qpush --force
Patrick Mezard <patrick@mezard.eu>
parents:
16633
diff
changeset
|
267 $ echo b >> b |
435375cc0ca0
mq: backup local changes in qpush --force
Patrick Mezard <patrick@mezard.eu>
parents:
16633
diff
changeset
|
268 $ echo d > d |
435375cc0ca0
mq: backup local changes in qpush --force
Patrick Mezard <patrick@mezard.eu>
parents:
16633
diff
changeset
|
269 $ echo e > e |
435375cc0ca0
mq: backup local changes in qpush --force
Patrick Mezard <patrick@mezard.eu>
parents:
16633
diff
changeset
|
270 $ hg add d e |
435375cc0ca0
mq: backup local changes in qpush --force
Patrick Mezard <patrick@mezard.eu>
parents:
16633
diff
changeset
|
271 $ hg rm c |
435375cc0ca0
mq: backup local changes in qpush --force
Patrick Mezard <patrick@mezard.eu>
parents:
16633
diff
changeset
|
272 $ hg qnew p3 |
435375cc0ca0
mq: backup local changes in qpush --force
Patrick Mezard <patrick@mezard.eu>
parents:
16633
diff
changeset
|
273 $ hg qpop -a |
435375cc0ca0
mq: backup local changes in qpush --force
Patrick Mezard <patrick@mezard.eu>
parents:
16633
diff
changeset
|
274 popping p3 |
435375cc0ca0
mq: backup local changes in qpush --force
Patrick Mezard <patrick@mezard.eu>
parents:
16633
diff
changeset
|
275 popping p2 |
435375cc0ca0
mq: backup local changes in qpush --force
Patrick Mezard <patrick@mezard.eu>
parents:
16633
diff
changeset
|
276 patch queue now empty |
435375cc0ca0
mq: backup local changes in qpush --force
Patrick Mezard <patrick@mezard.eu>
parents:
16633
diff
changeset
|
277 $ echo a >> a |
435375cc0ca0
mq: backup local changes in qpush --force
Patrick Mezard <patrick@mezard.eu>
parents:
16633
diff
changeset
|
278 $ echo b1 >> b |
435375cc0ca0
mq: backup local changes in qpush --force
Patrick Mezard <patrick@mezard.eu>
parents:
16633
diff
changeset
|
279 $ echo d1 > d |
435375cc0ca0
mq: backup local changes in qpush --force
Patrick Mezard <patrick@mezard.eu>
parents:
16633
diff
changeset
|
280 $ hg add d |
435375cc0ca0
mq: backup local changes in qpush --force
Patrick Mezard <patrick@mezard.eu>
parents:
16633
diff
changeset
|
281 $ echo e1 > e |
435375cc0ca0
mq: backup local changes in qpush --force
Patrick Mezard <patrick@mezard.eu>
parents:
16633
diff
changeset
|
282 $ hg qpush -a --force --verbose |
435375cc0ca0
mq: backup local changes in qpush --force
Patrick Mezard <patrick@mezard.eu>
parents:
16633
diff
changeset
|
283 applying p2 |
435375cc0ca0
mq: backup local changes in qpush --force
Patrick Mezard <patrick@mezard.eu>
parents:
16633
diff
changeset
|
284 saving current version of a as a.orig |
435375cc0ca0
mq: backup local changes in qpush --force
Patrick Mezard <patrick@mezard.eu>
parents:
16633
diff
changeset
|
285 patching file a |
23749
a387b0390082
localrepo: show headline notes in commitctx before showing filenames
Mads Kiilerich <madski@unity3d.com>
parents:
22947
diff
changeset
|
286 committing files: |
16634
435375cc0ca0
mq: backup local changes in qpush --force
Patrick Mezard <patrick@mezard.eu>
parents:
16633
diff
changeset
|
287 a |
23749
a387b0390082
localrepo: show headline notes in commitctx before showing filenames
Mads Kiilerich <madski@unity3d.com>
parents:
22947
diff
changeset
|
288 committing manifest |
a387b0390082
localrepo: show headline notes in commitctx before showing filenames
Mads Kiilerich <madski@unity3d.com>
parents:
22947
diff
changeset
|
289 committing changelog |
16634
435375cc0ca0
mq: backup local changes in qpush --force
Patrick Mezard <patrick@mezard.eu>
parents:
16633
diff
changeset
|
290 applying p3 |
435375cc0ca0
mq: backup local changes in qpush --force
Patrick Mezard <patrick@mezard.eu>
parents:
16633
diff
changeset
|
291 saving current version of b as b.orig |
435375cc0ca0
mq: backup local changes in qpush --force
Patrick Mezard <patrick@mezard.eu>
parents:
16633
diff
changeset
|
292 saving current version of d as d.orig |
435375cc0ca0
mq: backup local changes in qpush --force
Patrick Mezard <patrick@mezard.eu>
parents:
16633
diff
changeset
|
293 patching file b |
435375cc0ca0
mq: backup local changes in qpush --force
Patrick Mezard <patrick@mezard.eu>
parents:
16633
diff
changeset
|
294 patching file c |
435375cc0ca0
mq: backup local changes in qpush --force
Patrick Mezard <patrick@mezard.eu>
parents:
16633
diff
changeset
|
295 patching file d |
435375cc0ca0
mq: backup local changes in qpush --force
Patrick Mezard <patrick@mezard.eu>
parents:
16633
diff
changeset
|
296 file d already exists |
435375cc0ca0
mq: backup local changes in qpush --force
Patrick Mezard <patrick@mezard.eu>
parents:
16633
diff
changeset
|
297 1 out of 1 hunks FAILED -- saving rejects to file d.rej |
435375cc0ca0
mq: backup local changes in qpush --force
Patrick Mezard <patrick@mezard.eu>
parents:
16633
diff
changeset
|
298 patching file e |
435375cc0ca0
mq: backup local changes in qpush --force
Patrick Mezard <patrick@mezard.eu>
parents:
16633
diff
changeset
|
299 file e already exists |
435375cc0ca0
mq: backup local changes in qpush --force
Patrick Mezard <patrick@mezard.eu>
parents:
16633
diff
changeset
|
300 1 out of 1 hunks FAILED -- saving rejects to file e.rej |
435375cc0ca0
mq: backup local changes in qpush --force
Patrick Mezard <patrick@mezard.eu>
parents:
16633
diff
changeset
|
301 patch failed to apply |
23749
a387b0390082
localrepo: show headline notes in commitctx before showing filenames
Mads Kiilerich <madski@unity3d.com>
parents:
22947
diff
changeset
|
302 committing files: |
16634
435375cc0ca0
mq: backup local changes in qpush --force
Patrick Mezard <patrick@mezard.eu>
parents:
16633
diff
changeset
|
303 b |
23749
a387b0390082
localrepo: show headline notes in commitctx before showing filenames
Mads Kiilerich <madski@unity3d.com>
parents:
22947
diff
changeset
|
304 committing manifest |
a387b0390082
localrepo: show headline notes in commitctx before showing filenames
Mads Kiilerich <madski@unity3d.com>
parents:
22947
diff
changeset
|
305 committing changelog |
24365
f1eaf03dd608
commands: say "working directory" in full spelling
Yuya Nishihara <yuya@tcha.org>
parents:
23749
diff
changeset
|
306 patch failed, rejects left in working directory |
26780 | 307 errors during apply, please fix and qrefresh p3 |
16634
435375cc0ca0
mq: backup local changes in qpush --force
Patrick Mezard <patrick@mezard.eu>
parents:
16633
diff
changeset
|
308 [2] |
435375cc0ca0
mq: backup local changes in qpush --force
Patrick Mezard <patrick@mezard.eu>
parents:
16633
diff
changeset
|
309 $ cat a.orig |
435375cc0ca0
mq: backup local changes in qpush --force
Patrick Mezard <patrick@mezard.eu>
parents:
16633
diff
changeset
|
310 a |
435375cc0ca0
mq: backup local changes in qpush --force
Patrick Mezard <patrick@mezard.eu>
parents:
16633
diff
changeset
|
311 a |
435375cc0ca0
mq: backup local changes in qpush --force
Patrick Mezard <patrick@mezard.eu>
parents:
16633
diff
changeset
|
312 $ cat b.orig |
435375cc0ca0
mq: backup local changes in qpush --force
Patrick Mezard <patrick@mezard.eu>
parents:
16633
diff
changeset
|
313 b |
435375cc0ca0
mq: backup local changes in qpush --force
Patrick Mezard <patrick@mezard.eu>
parents:
16633
diff
changeset
|
314 b1 |
435375cc0ca0
mq: backup local changes in qpush --force
Patrick Mezard <patrick@mezard.eu>
parents:
16633
diff
changeset
|
315 $ cat d.orig |
435375cc0ca0
mq: backup local changes in qpush --force
Patrick Mezard <patrick@mezard.eu>
parents:
16633
diff
changeset
|
316 d1 |
16635
9d76320d8b99
mq: add --no-backup for qpush/qpop/qgoto
Patrick Mezard <patrick@mezard.eu>
parents:
16634
diff
changeset
|
317 |
9d76320d8b99
mq: add --no-backup for qpush/qpop/qgoto
Patrick Mezard <patrick@mezard.eu>
parents:
16634
diff
changeset
|
318 test qpush --force --no-backup |
9d76320d8b99
mq: add --no-backup for qpush/qpop/qgoto
Patrick Mezard <patrick@mezard.eu>
parents:
16634
diff
changeset
|
319 |
9d76320d8b99
mq: add --no-backup for qpush/qpop/qgoto
Patrick Mezard <patrick@mezard.eu>
parents:
16634
diff
changeset
|
320 $ hg revert -qa |
9d76320d8b99
mq: add --no-backup for qpush/qpop/qgoto
Patrick Mezard <patrick@mezard.eu>
parents:
16634
diff
changeset
|
321 $ hg qpop -a |
9d76320d8b99
mq: add --no-backup for qpush/qpop/qgoto
Patrick Mezard <patrick@mezard.eu>
parents:
16634
diff
changeset
|
322 popping p3 |
9d76320d8b99
mq: add --no-backup for qpush/qpop/qgoto
Patrick Mezard <patrick@mezard.eu>
parents:
16634
diff
changeset
|
323 popping p2 |
9d76320d8b99
mq: add --no-backup for qpush/qpop/qgoto
Patrick Mezard <patrick@mezard.eu>
parents:
16634
diff
changeset
|
324 patch queue now empty |
9d76320d8b99
mq: add --no-backup for qpush/qpop/qgoto
Patrick Mezard <patrick@mezard.eu>
parents:
16634
diff
changeset
|
325 $ echo a >> a |
9d76320d8b99
mq: add --no-backup for qpush/qpop/qgoto
Patrick Mezard <patrick@mezard.eu>
parents:
16634
diff
changeset
|
326 $ rm a.orig |
9d76320d8b99
mq: add --no-backup for qpush/qpop/qgoto
Patrick Mezard <patrick@mezard.eu>
parents:
16634
diff
changeset
|
327 $ hg qpush --force --no-backup --verbose |
9d76320d8b99
mq: add --no-backup for qpush/qpop/qgoto
Patrick Mezard <patrick@mezard.eu>
parents:
16634
diff
changeset
|
328 applying p2 |
9d76320d8b99
mq: add --no-backup for qpush/qpop/qgoto
Patrick Mezard <patrick@mezard.eu>
parents:
16634
diff
changeset
|
329 patching file a |
23749
a387b0390082
localrepo: show headline notes in commitctx before showing filenames
Mads Kiilerich <madski@unity3d.com>
parents:
22947
diff
changeset
|
330 committing files: |
16635
9d76320d8b99
mq: add --no-backup for qpush/qpop/qgoto
Patrick Mezard <patrick@mezard.eu>
parents:
16634
diff
changeset
|
331 a |
23749
a387b0390082
localrepo: show headline notes in commitctx before showing filenames
Mads Kiilerich <madski@unity3d.com>
parents:
22947
diff
changeset
|
332 committing manifest |
a387b0390082
localrepo: show headline notes in commitctx before showing filenames
Mads Kiilerich <madski@unity3d.com>
parents:
22947
diff
changeset
|
333 committing changelog |
16635
9d76320d8b99
mq: add --no-backup for qpush/qpop/qgoto
Patrick Mezard <patrick@mezard.eu>
parents:
16634
diff
changeset
|
334 now at: p2 |
9d76320d8b99
mq: add --no-backup for qpush/qpop/qgoto
Patrick Mezard <patrick@mezard.eu>
parents:
16634
diff
changeset
|
335 $ test -f a.orig && echo 'error: backup with --no-backup' |
9d76320d8b99
mq: add --no-backup for qpush/qpop/qgoto
Patrick Mezard <patrick@mezard.eu>
parents:
16634
diff
changeset
|
336 [1] |
9d76320d8b99
mq: add --no-backup for qpush/qpop/qgoto
Patrick Mezard <patrick@mezard.eu>
parents:
16634
diff
changeset
|
337 |
9d76320d8b99
mq: add --no-backup for qpush/qpop/qgoto
Patrick Mezard <patrick@mezard.eu>
parents:
16634
diff
changeset
|
338 test qgoto --force --no-backup |
9d76320d8b99
mq: add --no-backup for qpush/qpop/qgoto
Patrick Mezard <patrick@mezard.eu>
parents:
16634
diff
changeset
|
339 |
9d76320d8b99
mq: add --no-backup for qpush/qpop/qgoto
Patrick Mezard <patrick@mezard.eu>
parents:
16634
diff
changeset
|
340 $ hg qpop |
9d76320d8b99
mq: add --no-backup for qpush/qpop/qgoto
Patrick Mezard <patrick@mezard.eu>
parents:
16634
diff
changeset
|
341 popping p2 |
9d76320d8b99
mq: add --no-backup for qpush/qpop/qgoto
Patrick Mezard <patrick@mezard.eu>
parents:
16634
diff
changeset
|
342 patch queue now empty |
9d76320d8b99
mq: add --no-backup for qpush/qpop/qgoto
Patrick Mezard <patrick@mezard.eu>
parents:
16634
diff
changeset
|
343 $ echo a >> a |
9d76320d8b99
mq: add --no-backup for qpush/qpop/qgoto
Patrick Mezard <patrick@mezard.eu>
parents:
16634
diff
changeset
|
344 $ hg qgoto --force --no-backup p2 --verbose |
9d76320d8b99
mq: add --no-backup for qpush/qpop/qgoto
Patrick Mezard <patrick@mezard.eu>
parents:
16634
diff
changeset
|
345 applying p2 |
9d76320d8b99
mq: add --no-backup for qpush/qpop/qgoto
Patrick Mezard <patrick@mezard.eu>
parents:
16634
diff
changeset
|
346 patching file a |
23749
a387b0390082
localrepo: show headline notes in commitctx before showing filenames
Mads Kiilerich <madski@unity3d.com>
parents:
22947
diff
changeset
|
347 committing files: |
16635
9d76320d8b99
mq: add --no-backup for qpush/qpop/qgoto
Patrick Mezard <patrick@mezard.eu>
parents:
16634
diff
changeset
|
348 a |
23749
a387b0390082
localrepo: show headline notes in commitctx before showing filenames
Mads Kiilerich <madski@unity3d.com>
parents:
22947
diff
changeset
|
349 committing manifest |
a387b0390082
localrepo: show headline notes in commitctx before showing filenames
Mads Kiilerich <madski@unity3d.com>
parents:
22947
diff
changeset
|
350 committing changelog |
16635
9d76320d8b99
mq: add --no-backup for qpush/qpop/qgoto
Patrick Mezard <patrick@mezard.eu>
parents:
16634
diff
changeset
|
351 now at: p2 |
9d76320d8b99
mq: add --no-backup for qpush/qpop/qgoto
Patrick Mezard <patrick@mezard.eu>
parents:
16634
diff
changeset
|
352 $ test -f a.orig && echo 'error: backup with --no-backup' |
9d76320d8b99
mq: add --no-backup for qpush/qpop/qgoto
Patrick Mezard <patrick@mezard.eu>
parents:
16634
diff
changeset
|
353 [1] |
16654
490ed8972f1b
mq: introduce qpush --check
Patrick Mezard <patrick@mezard.eu>
parents:
16653
diff
changeset
|
354 |
16733
4da10c00a20c
mq: rename --check into --keep-changes
Patrick Mezard <patrick@mezard.eu>
parents:
16656
diff
changeset
|
355 test qpush --keep-changes |
16654
490ed8972f1b
mq: introduce qpush --check
Patrick Mezard <patrick@mezard.eu>
parents:
16653
diff
changeset
|
356 |
16733
4da10c00a20c
mq: rename --check into --keep-changes
Patrick Mezard <patrick@mezard.eu>
parents:
16656
diff
changeset
|
357 $ hg qpush --keep-changes --force |
4da10c00a20c
mq: rename --check into --keep-changes
Patrick Mezard <patrick@mezard.eu>
parents:
16656
diff
changeset
|
358 abort: cannot use both --force and --keep-changes |
16654
490ed8972f1b
mq: introduce qpush --check
Patrick Mezard <patrick@mezard.eu>
parents:
16653
diff
changeset
|
359 [255] |
16733
4da10c00a20c
mq: rename --check into --keep-changes
Patrick Mezard <patrick@mezard.eu>
parents:
16656
diff
changeset
|
360 $ hg qpush --keep-changes --exact |
4da10c00a20c
mq: rename --check into --keep-changes
Patrick Mezard <patrick@mezard.eu>
parents:
16656
diff
changeset
|
361 abort: cannot use --exact and --keep-changes together |
16654
490ed8972f1b
mq: introduce qpush --check
Patrick Mezard <patrick@mezard.eu>
parents:
16653
diff
changeset
|
362 [255] |
490ed8972f1b
mq: introduce qpush --check
Patrick Mezard <patrick@mezard.eu>
parents:
16653
diff
changeset
|
363 $ echo b >> b |
16733
4da10c00a20c
mq: rename --check into --keep-changes
Patrick Mezard <patrick@mezard.eu>
parents:
16656
diff
changeset
|
364 $ hg qpush --keep-changes |
16654
490ed8972f1b
mq: introduce qpush --check
Patrick Mezard <patrick@mezard.eu>
parents:
16653
diff
changeset
|
365 applying p3 |
24826
9b02b678888e
mq: avoid silent failure when single patch doesn't apply (issue4604)
Matt Mackall <mpm@selenic.com>
parents:
24365
diff
changeset
|
366 abort: conflicting local changes found |
9b02b678888e
mq: avoid silent failure when single patch doesn't apply (issue4604)
Matt Mackall <mpm@selenic.com>
parents:
24365
diff
changeset
|
367 (did you forget to qrefresh?) |
9b02b678888e
mq: avoid silent failure when single patch doesn't apply (issue4604)
Matt Mackall <mpm@selenic.com>
parents:
24365
diff
changeset
|
368 [255] |
16654
490ed8972f1b
mq: introduce qpush --check
Patrick Mezard <patrick@mezard.eu>
parents:
16653
diff
changeset
|
369 $ rm b |
16733
4da10c00a20c
mq: rename --check into --keep-changes
Patrick Mezard <patrick@mezard.eu>
parents:
16656
diff
changeset
|
370 $ hg qpush --keep-changes |
16654
490ed8972f1b
mq: introduce qpush --check
Patrick Mezard <patrick@mezard.eu>
parents:
16653
diff
changeset
|
371 applying p3 |
24826
9b02b678888e
mq: avoid silent failure when single patch doesn't apply (issue4604)
Matt Mackall <mpm@selenic.com>
parents:
24365
diff
changeset
|
372 abort: conflicting local changes found |
9b02b678888e
mq: avoid silent failure when single patch doesn't apply (issue4604)
Matt Mackall <mpm@selenic.com>
parents:
24365
diff
changeset
|
373 (did you forget to qrefresh?) |
9b02b678888e
mq: avoid silent failure when single patch doesn't apply (issue4604)
Matt Mackall <mpm@selenic.com>
parents:
24365
diff
changeset
|
374 [255] |
16654
490ed8972f1b
mq: introduce qpush --check
Patrick Mezard <patrick@mezard.eu>
parents:
16653
diff
changeset
|
375 $ hg rm -A b |
16733
4da10c00a20c
mq: rename --check into --keep-changes
Patrick Mezard <patrick@mezard.eu>
parents:
16656
diff
changeset
|
376 $ hg qpush --keep-changes |
16654
490ed8972f1b
mq: introduce qpush --check
Patrick Mezard <patrick@mezard.eu>
parents:
16653
diff
changeset
|
377 applying p3 |
24826
9b02b678888e
mq: avoid silent failure when single patch doesn't apply (issue4604)
Matt Mackall <mpm@selenic.com>
parents:
24365
diff
changeset
|
378 abort: conflicting local changes found |
9b02b678888e
mq: avoid silent failure when single patch doesn't apply (issue4604)
Matt Mackall <mpm@selenic.com>
parents:
24365
diff
changeset
|
379 (did you forget to qrefresh?) |
9b02b678888e
mq: avoid silent failure when single patch doesn't apply (issue4604)
Matt Mackall <mpm@selenic.com>
parents:
24365
diff
changeset
|
380 [255] |
16654
490ed8972f1b
mq: introduce qpush --check
Patrick Mezard <patrick@mezard.eu>
parents:
16653
diff
changeset
|
381 $ hg revert -aq b |
490ed8972f1b
mq: introduce qpush --check
Patrick Mezard <patrick@mezard.eu>
parents:
16653
diff
changeset
|
382 $ echo d > d |
490ed8972f1b
mq: introduce qpush --check
Patrick Mezard <patrick@mezard.eu>
parents:
16653
diff
changeset
|
383 $ hg add d |
16733
4da10c00a20c
mq: rename --check into --keep-changes
Patrick Mezard <patrick@mezard.eu>
parents:
16656
diff
changeset
|
384 $ hg qpush --keep-changes |
16654
490ed8972f1b
mq: introduce qpush --check
Patrick Mezard <patrick@mezard.eu>
parents:
16653
diff
changeset
|
385 applying p3 |
24826
9b02b678888e
mq: avoid silent failure when single patch doesn't apply (issue4604)
Matt Mackall <mpm@selenic.com>
parents:
24365
diff
changeset
|
386 abort: conflicting local changes found |
9b02b678888e
mq: avoid silent failure when single patch doesn't apply (issue4604)
Matt Mackall <mpm@selenic.com>
parents:
24365
diff
changeset
|
387 (did you forget to qrefresh?) |
9b02b678888e
mq: avoid silent failure when single patch doesn't apply (issue4604)
Matt Mackall <mpm@selenic.com>
parents:
24365
diff
changeset
|
388 [255] |
16654
490ed8972f1b
mq: introduce qpush --check
Patrick Mezard <patrick@mezard.eu>
parents:
16653
diff
changeset
|
389 $ hg forget d |
490ed8972f1b
mq: introduce qpush --check
Patrick Mezard <patrick@mezard.eu>
parents:
16653
diff
changeset
|
390 $ rm d |
490ed8972f1b
mq: introduce qpush --check
Patrick Mezard <patrick@mezard.eu>
parents:
16653
diff
changeset
|
391 $ hg qpop |
490ed8972f1b
mq: introduce qpush --check
Patrick Mezard <patrick@mezard.eu>
parents:
16653
diff
changeset
|
392 popping p2 |
490ed8972f1b
mq: introduce qpush --check
Patrick Mezard <patrick@mezard.eu>
parents:
16653
diff
changeset
|
393 patch queue now empty |
490ed8972f1b
mq: introduce qpush --check
Patrick Mezard <patrick@mezard.eu>
parents:
16653
diff
changeset
|
394 $ echo b >> b |
16733
4da10c00a20c
mq: rename --check into --keep-changes
Patrick Mezard <patrick@mezard.eu>
parents:
16656
diff
changeset
|
395 $ hg qpush -a --keep-changes |
16654
490ed8972f1b
mq: introduce qpush --check
Patrick Mezard <patrick@mezard.eu>
parents:
16653
diff
changeset
|
396 applying p2 |
490ed8972f1b
mq: introduce qpush --check
Patrick Mezard <patrick@mezard.eu>
parents:
16653
diff
changeset
|
397 applying p3 |
24826
9b02b678888e
mq: avoid silent failure when single patch doesn't apply (issue4604)
Matt Mackall <mpm@selenic.com>
parents:
24365
diff
changeset
|
398 abort: conflicting local changes found |
9b02b678888e
mq: avoid silent failure when single patch doesn't apply (issue4604)
Matt Mackall <mpm@selenic.com>
parents:
24365
diff
changeset
|
399 (did you forget to qrefresh?) |
9b02b678888e
mq: avoid silent failure when single patch doesn't apply (issue4604)
Matt Mackall <mpm@selenic.com>
parents:
24365
diff
changeset
|
400 [255] |
16654
490ed8972f1b
mq: introduce qpush --check
Patrick Mezard <patrick@mezard.eu>
parents:
16653
diff
changeset
|
401 $ hg qtop |
490ed8972f1b
mq: introduce qpush --check
Patrick Mezard <patrick@mezard.eu>
parents:
16653
diff
changeset
|
402 p2 |
490ed8972f1b
mq: introduce qpush --check
Patrick Mezard <patrick@mezard.eu>
parents:
16653
diff
changeset
|
403 $ hg parents --template "{rev} {desc}\n" |
490ed8972f1b
mq: introduce qpush --check
Patrick Mezard <patrick@mezard.eu>
parents:
16653
diff
changeset
|
404 2 imported patch p2 |
490ed8972f1b
mq: introduce qpush --check
Patrick Mezard <patrick@mezard.eu>
parents:
16653
diff
changeset
|
405 $ hg st b |
490ed8972f1b
mq: introduce qpush --check
Patrick Mezard <patrick@mezard.eu>
parents:
16653
diff
changeset
|
406 M b |
490ed8972f1b
mq: introduce qpush --check
Patrick Mezard <patrick@mezard.eu>
parents:
16653
diff
changeset
|
407 $ cat b |
490ed8972f1b
mq: introduce qpush --check
Patrick Mezard <patrick@mezard.eu>
parents:
16653
diff
changeset
|
408 b |
490ed8972f1b
mq: introduce qpush --check
Patrick Mezard <patrick@mezard.eu>
parents:
16653
diff
changeset
|
409 b |
16655
6ca125af882f
mq: introduce qgoto --check
Patrick Mezard <patrick@mezard.eu>
parents:
16654
diff
changeset
|
410 |
16733
4da10c00a20c
mq: rename --check into --keep-changes
Patrick Mezard <patrick@mezard.eu>
parents:
16656
diff
changeset
|
411 test qgoto --keep-changes |
16655
6ca125af882f
mq: introduce qgoto --check
Patrick Mezard <patrick@mezard.eu>
parents:
16654
diff
changeset
|
412 |
6ca125af882f
mq: introduce qgoto --check
Patrick Mezard <patrick@mezard.eu>
parents:
16654
diff
changeset
|
413 $ hg revert -aq b |
6ca125af882f
mq: introduce qgoto --check
Patrick Mezard <patrick@mezard.eu>
parents:
16654
diff
changeset
|
414 $ rm e |
16733
4da10c00a20c
mq: rename --check into --keep-changes
Patrick Mezard <patrick@mezard.eu>
parents:
16656
diff
changeset
|
415 $ hg qgoto --keep-changes --force p3 |
4da10c00a20c
mq: rename --check into --keep-changes
Patrick Mezard <patrick@mezard.eu>
parents:
16656
diff
changeset
|
416 abort: cannot use both --force and --keep-changes |
16655
6ca125af882f
mq: introduce qgoto --check
Patrick Mezard <patrick@mezard.eu>
parents:
16654
diff
changeset
|
417 [255] |
6ca125af882f
mq: introduce qgoto --check
Patrick Mezard <patrick@mezard.eu>
parents:
16654
diff
changeset
|
418 $ echo a >> a |
16733
4da10c00a20c
mq: rename --check into --keep-changes
Patrick Mezard <patrick@mezard.eu>
parents:
16656
diff
changeset
|
419 $ hg qgoto --keep-changes p3 |
16655
6ca125af882f
mq: introduce qgoto --check
Patrick Mezard <patrick@mezard.eu>
parents:
16654
diff
changeset
|
420 applying p3 |
6ca125af882f
mq: introduce qgoto --check
Patrick Mezard <patrick@mezard.eu>
parents:
16654
diff
changeset
|
421 now at: p3 |
6ca125af882f
mq: introduce qgoto --check
Patrick Mezard <patrick@mezard.eu>
parents:
16654
diff
changeset
|
422 $ hg st a |
6ca125af882f
mq: introduce qgoto --check
Patrick Mezard <patrick@mezard.eu>
parents:
16654
diff
changeset
|
423 M a |
16733
4da10c00a20c
mq: rename --check into --keep-changes
Patrick Mezard <patrick@mezard.eu>
parents:
16656
diff
changeset
|
424 $ hg qgoto --keep-changes p2 |
16655
6ca125af882f
mq: introduce qgoto --check
Patrick Mezard <patrick@mezard.eu>
parents:
16654
diff
changeset
|
425 popping p3 |
6ca125af882f
mq: introduce qgoto --check
Patrick Mezard <patrick@mezard.eu>
parents:
16654
diff
changeset
|
426 now at: p2 |
6ca125af882f
mq: introduce qgoto --check
Patrick Mezard <patrick@mezard.eu>
parents:
16654
diff
changeset
|
427 $ hg st a |
6ca125af882f
mq: introduce qgoto --check
Patrick Mezard <patrick@mezard.eu>
parents:
16654
diff
changeset
|
428 M a |
16656
4ae3ba9e4d7a
mq: introduce mq.check setting
Patrick Mezard <patrick@mezard.eu>
parents:
16655
diff
changeset
|
429 |
16733
4da10c00a20c
mq: rename --check into --keep-changes
Patrick Mezard <patrick@mezard.eu>
parents:
16656
diff
changeset
|
430 test mq.keepchanges setting |
16656
4ae3ba9e4d7a
mq: introduce mq.check setting
Patrick Mezard <patrick@mezard.eu>
parents:
16655
diff
changeset
|
431 |
16733
4da10c00a20c
mq: rename --check into --keep-changes
Patrick Mezard <patrick@mezard.eu>
parents:
16656
diff
changeset
|
432 $ hg --config mq.keepchanges=1 qpush |
16656
4ae3ba9e4d7a
mq: introduce mq.check setting
Patrick Mezard <patrick@mezard.eu>
parents:
16655
diff
changeset
|
433 applying p3 |
4ae3ba9e4d7a
mq: introduce mq.check setting
Patrick Mezard <patrick@mezard.eu>
parents:
16655
diff
changeset
|
434 now at: p3 |
4ae3ba9e4d7a
mq: introduce mq.check setting
Patrick Mezard <patrick@mezard.eu>
parents:
16655
diff
changeset
|
435 $ hg st a |
4ae3ba9e4d7a
mq: introduce mq.check setting
Patrick Mezard <patrick@mezard.eu>
parents:
16655
diff
changeset
|
436 M a |
16733
4da10c00a20c
mq: rename --check into --keep-changes
Patrick Mezard <patrick@mezard.eu>
parents:
16656
diff
changeset
|
437 $ hg --config mq.keepchanges=1 qpop |
16656
4ae3ba9e4d7a
mq: introduce mq.check setting
Patrick Mezard <patrick@mezard.eu>
parents:
16655
diff
changeset
|
438 popping p3 |
4ae3ba9e4d7a
mq: introduce mq.check setting
Patrick Mezard <patrick@mezard.eu>
parents:
16655
diff
changeset
|
439 now at: p2 |
4ae3ba9e4d7a
mq: introduce mq.check setting
Patrick Mezard <patrick@mezard.eu>
parents:
16655
diff
changeset
|
440 $ hg st a |
4ae3ba9e4d7a
mq: introduce mq.check setting
Patrick Mezard <patrick@mezard.eu>
parents:
16655
diff
changeset
|
441 M a |
16733
4da10c00a20c
mq: rename --check into --keep-changes
Patrick Mezard <patrick@mezard.eu>
parents:
16656
diff
changeset
|
442 $ hg --config mq.keepchanges=1 qgoto p3 |
16656
4ae3ba9e4d7a
mq: introduce mq.check setting
Patrick Mezard <patrick@mezard.eu>
parents:
16655
diff
changeset
|
443 applying p3 |
4ae3ba9e4d7a
mq: introduce mq.check setting
Patrick Mezard <patrick@mezard.eu>
parents:
16655
diff
changeset
|
444 now at: p3 |
4ae3ba9e4d7a
mq: introduce mq.check setting
Patrick Mezard <patrick@mezard.eu>
parents:
16655
diff
changeset
|
445 $ hg st a |
4ae3ba9e4d7a
mq: introduce mq.check setting
Patrick Mezard <patrick@mezard.eu>
parents:
16655
diff
changeset
|
446 M a |
4ae3ba9e4d7a
mq: introduce mq.check setting
Patrick Mezard <patrick@mezard.eu>
parents:
16655
diff
changeset
|
447 $ echo b >> b |
26943
263edb591b72
mq: let the user choose where .orig files are kept
Christian Delahousse <cdelahousse@fb.com>
parents:
26780
diff
changeset
|
448 $ hg --config mq.keepchanges=1 qpop --force --config 'ui.origbackuppath=.hg/origbackups' |
16656
4ae3ba9e4d7a
mq: introduce mq.check setting
Patrick Mezard <patrick@mezard.eu>
parents:
16655
diff
changeset
|
449 popping p3 |
4ae3ba9e4d7a
mq: introduce mq.check setting
Patrick Mezard <patrick@mezard.eu>
parents:
16655
diff
changeset
|
450 now at: p2 |
4ae3ba9e4d7a
mq: introduce mq.check setting
Patrick Mezard <patrick@mezard.eu>
parents:
16655
diff
changeset
|
451 $ hg st b |
16733
4da10c00a20c
mq: rename --check into --keep-changes
Patrick Mezard <patrick@mezard.eu>
parents:
16656
diff
changeset
|
452 $ hg --config mq.keepchanges=1 qpush --exact |
26780 | 453 abort: local changes found, qrefresh first |
16656
4ae3ba9e4d7a
mq: introduce mq.check setting
Patrick Mezard <patrick@mezard.eu>
parents:
16655
diff
changeset
|
454 [255] |
4ae3ba9e4d7a
mq: introduce mq.check setting
Patrick Mezard <patrick@mezard.eu>
parents:
16655
diff
changeset
|
455 $ hg revert -qa a |
4ae3ba9e4d7a
mq: introduce mq.check setting
Patrick Mezard <patrick@mezard.eu>
parents:
16655
diff
changeset
|
456 $ hg qpop |
4ae3ba9e4d7a
mq: introduce mq.check setting
Patrick Mezard <patrick@mezard.eu>
parents:
16655
diff
changeset
|
457 popping p2 |
4ae3ba9e4d7a
mq: introduce mq.check setting
Patrick Mezard <patrick@mezard.eu>
parents:
16655
diff
changeset
|
458 patch queue now empty |
4ae3ba9e4d7a
mq: introduce mq.check setting
Patrick Mezard <patrick@mezard.eu>
parents:
16655
diff
changeset
|
459 $ echo a >> a |
16733
4da10c00a20c
mq: rename --check into --keep-changes
Patrick Mezard <patrick@mezard.eu>
parents:
16656
diff
changeset
|
460 $ hg --config mq.keepchanges=1 qpush --force |
16656
4ae3ba9e4d7a
mq: introduce mq.check setting
Patrick Mezard <patrick@mezard.eu>
parents:
16655
diff
changeset
|
461 applying p2 |
4ae3ba9e4d7a
mq: introduce mq.check setting
Patrick Mezard <patrick@mezard.eu>
parents:
16655
diff
changeset
|
462 now at: p2 |
4ae3ba9e4d7a
mq: introduce mq.check setting
Patrick Mezard <patrick@mezard.eu>
parents:
16655
diff
changeset
|
463 $ hg st a |
16913
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
16733
diff
changeset
|
464 |
26943
263edb591b72
mq: let the user choose where .orig files are kept
Christian Delahousse <cdelahousse@fb.com>
parents:
26780
diff
changeset
|
465 test previous qpop (with --force and --config) saved .orig files to where user |
263edb591b72
mq: let the user choose where .orig files are kept
Christian Delahousse <cdelahousse@fb.com>
parents:
26780
diff
changeset
|
466 wants them |
263edb591b72
mq: let the user choose where .orig files are kept
Christian Delahousse <cdelahousse@fb.com>
parents:
26780
diff
changeset
|
467 $ ls .hg/origbackups |
34146
9e4f82bc2b0b
scmutil: don't append .orig to backups in origbackuppath (BC)
Mark Thomas <mbthomas@fb.com>
parents:
33278
diff
changeset
|
468 b |
26943
263edb591b72
mq: let the user choose where .orig files are kept
Christian Delahousse <cdelahousse@fb.com>
parents:
26780
diff
changeset
|
469 $ rm -rf .hg/origbackups |
263edb591b72
mq: let the user choose where .orig files are kept
Christian Delahousse <cdelahousse@fb.com>
parents:
26780
diff
changeset
|
470 |
16913
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
16733
diff
changeset
|
471 $ cd .. |