Mercurial > hg
annotate tests/test-mq-missingfiles.t @ 41685:b81ecf3571d5
addremove: respect ui.relative-paths
I previously changed these code paths while trying to not change any
behavior to avoid inconsistencies between them in the intermediate
commits. They're now all ready to be switched over to respecting
ui.relative-paths.
Differential Revision: https://phab.mercurial-scm.org/D5936
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Mon, 11 Feb 2019 09:40:24 -0800 |
parents | 13ccb03f2145 |
children | c70bdd222dcd |
rev | line source |
---|---|
5581
8a8c341bd292
mq: missing target files do not make qpush to fail immediately (issue 835)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
1 |
12399
4fee1fd3de9a
tests: added a short description to issue numbers
Martin Geisler <mg@aragost.com>
parents:
12324
diff
changeset
|
2 Issue835: qpush fails immediately when patching a missing file, but |
4fee1fd3de9a
tests: added a short description to issue numbers
Martin Geisler <mg@aragost.com>
parents:
12324
diff
changeset
|
3 remaining added files are still created empty which will trick a |
4fee1fd3de9a
tests: added a short description to issue numbers
Martin Geisler <mg@aragost.com>
parents:
12324
diff
changeset
|
4 future qrefresh. |
5581
8a8c341bd292
mq: missing target files do not make qpush to fail immediately (issue 835)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
5 |
12324
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
6 $ cat > writelines.py <<EOF |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
7 > import sys |
41328
13ccb03f2145
tests: handle string escaping/encoding on Python 3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39707
diff
changeset
|
8 > if sys.version_info[0] >= 3: |
13ccb03f2145
tests: handle string escaping/encoding on Python 3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39707
diff
changeset
|
9 > encode = lambda x: x.encode('utf-8').decode('unicode_escape').encode('utf-8') |
13ccb03f2145
tests: handle string escaping/encoding on Python 3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39707
diff
changeset
|
10 > else: |
13ccb03f2145
tests: handle string escaping/encoding on Python 3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39707
diff
changeset
|
11 > encode = lambda x: x.decode('string_escape') |
12324
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
12 > path = sys.argv[1] |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
13 > args = sys.argv[2:] |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
14 > assert (len(args) % 2) == 0 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
15 > |
36022
b911995040f9
py3: replace file() with open() in test-mq-missingfiles.t
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32940
diff
changeset
|
16 > f = open(path, 'wb') |
36390
34afe92e3719
py3: use '//' for integer divisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
36287
diff
changeset
|
17 > for i in range(len(args) // 2): |
12324
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
18 > count, s = args[2*i:2*i+2] |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
19 > count = int(count) |
41328
13ccb03f2145
tests: handle string escaping/encoding on Python 3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39707
diff
changeset
|
20 > s = encode(s) |
12324
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
21 > f.write(s*count) |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
22 > f.close() |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
23 > EOF |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
24 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
25 $ echo "[extensions]" >> $HGRCPATH |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
26 $ echo "mq=" >> $HGRCPATH |
5581
8a8c341bd292
mq: missing target files do not make qpush to fail immediately (issue 835)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
27 |
12324
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
28 $ hg init normal |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
29 $ cd normal |
39707
5abc47d4ca6b
tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents:
36390
diff
changeset
|
30 $ "$PYTHON" ../writelines.py b 10 'a\n' |
12324
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
31 $ hg ci -Am addb |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
32 adding b |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
33 $ echo a > a |
39707
5abc47d4ca6b
tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents:
36390
diff
changeset
|
34 $ "$PYTHON" ../writelines.py b 2 'b\n' 10 'a\n' 2 'c\n' |
12324
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
35 $ echo c > c |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
36 $ hg add a c |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
37 $ hg qnew -f changeb |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
38 $ hg qpop |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
39 popping changeb |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
40 patch queue now empty |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
41 $ hg rm b |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
42 $ hg ci -Am rmb |
5581
8a8c341bd292
mq: missing target files do not make qpush to fail immediately (issue 835)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
43 |
12324
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
44 Push patch with missing target: |
5581
8a8c341bd292
mq: missing target files do not make qpush to fail immediately (issue 835)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
45 |
12324
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
46 $ hg qpush |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
47 applying changeb |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
48 unable to find 'b' for patching |
29900
50f2966f86ca
import: report directory-relative paths in error messages (issue5224)
liscju <piotr.listkiewicz@gmail.com>
parents:
26780
diff
changeset
|
49 (use '--prefix' to apply patch relative to the current directory) |
12324
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
50 2 out of 2 hunks FAILED -- saving rejects to file b.rej |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
51 patch failed, unable to continue (try -v) |
24365
f1eaf03dd608
commands: say "working directory" in full spelling
Yuya Nishihara <yuya@tcha.org>
parents:
16813
diff
changeset
|
52 patch failed, rejects left in working directory |
26780 | 53 errors during apply, please fix and qrefresh changeb |
12324
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
54 [2] |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
55 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
56 Display added files: |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
57 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
58 $ cat a |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
59 a |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
60 $ cat c |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
61 c |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
62 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
63 Display rejections: |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
64 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
65 $ cat b.rej |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
66 --- b |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
67 +++ b |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
68 @@ -1,3 +1,5 @@ |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
69 +b |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
70 +b |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
71 a |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
72 a |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
73 a |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
74 @@ -8,3 +10,5 @@ |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
75 a |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
76 a |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
77 a |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
78 +c |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
79 +c |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
80 |
16813
6d42c797ca6e
patch: keep patching after missing copy source (issue3480)
Patrick Mezard <patrick@mezard.eu>
parents:
14370
diff
changeset
|
81 Test missing renamed file |
6d42c797ca6e
patch: keep patching after missing copy source (issue3480)
Patrick Mezard <patrick@mezard.eu>
parents:
14370
diff
changeset
|
82 |
6d42c797ca6e
patch: keep patching after missing copy source (issue3480)
Patrick Mezard <patrick@mezard.eu>
parents:
14370
diff
changeset
|
83 $ hg qpop |
6d42c797ca6e
patch: keep patching after missing copy source (issue3480)
Patrick Mezard <patrick@mezard.eu>
parents:
14370
diff
changeset
|
84 popping changeb |
6d42c797ca6e
patch: keep patching after missing copy source (issue3480)
Patrick Mezard <patrick@mezard.eu>
parents:
14370
diff
changeset
|
85 patch queue now empty |
6d42c797ca6e
patch: keep patching after missing copy source (issue3480)
Patrick Mezard <patrick@mezard.eu>
parents:
14370
diff
changeset
|
86 $ hg up -qC 0 |
6d42c797ca6e
patch: keep patching after missing copy source (issue3480)
Patrick Mezard <patrick@mezard.eu>
parents:
14370
diff
changeset
|
87 $ echo a > a |
6d42c797ca6e
patch: keep patching after missing copy source (issue3480)
Patrick Mezard <patrick@mezard.eu>
parents:
14370
diff
changeset
|
88 $ hg mv b bb |
39707
5abc47d4ca6b
tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents:
36390
diff
changeset
|
89 $ "$PYTHON" ../writelines.py bb 2 'b\n' 10 'a\n' 2 'c\n' |
16813
6d42c797ca6e
patch: keep patching after missing copy source (issue3480)
Patrick Mezard <patrick@mezard.eu>
parents:
14370
diff
changeset
|
90 $ echo c > c |
6d42c797ca6e
patch: keep patching after missing copy source (issue3480)
Patrick Mezard <patrick@mezard.eu>
parents:
14370
diff
changeset
|
91 $ hg add a c |
6d42c797ca6e
patch: keep patching after missing copy source (issue3480)
Patrick Mezard <patrick@mezard.eu>
parents:
14370
diff
changeset
|
92 $ hg qnew changebb |
6d42c797ca6e
patch: keep patching after missing copy source (issue3480)
Patrick Mezard <patrick@mezard.eu>
parents:
14370
diff
changeset
|
93 $ hg qpop |
6d42c797ca6e
patch: keep patching after missing copy source (issue3480)
Patrick Mezard <patrick@mezard.eu>
parents:
14370
diff
changeset
|
94 popping changebb |
6d42c797ca6e
patch: keep patching after missing copy source (issue3480)
Patrick Mezard <patrick@mezard.eu>
parents:
14370
diff
changeset
|
95 patch queue now empty |
6d42c797ca6e
patch: keep patching after missing copy source (issue3480)
Patrick Mezard <patrick@mezard.eu>
parents:
14370
diff
changeset
|
96 $ hg up -qC 1 |
6d42c797ca6e
patch: keep patching after missing copy source (issue3480)
Patrick Mezard <patrick@mezard.eu>
parents:
14370
diff
changeset
|
97 $ hg qpush |
6d42c797ca6e
patch: keep patching after missing copy source (issue3480)
Patrick Mezard <patrick@mezard.eu>
parents:
14370
diff
changeset
|
98 applying changebb |
6d42c797ca6e
patch: keep patching after missing copy source (issue3480)
Patrick Mezard <patrick@mezard.eu>
parents:
14370
diff
changeset
|
99 patching file bb |
6d42c797ca6e
patch: keep patching after missing copy source (issue3480)
Patrick Mezard <patrick@mezard.eu>
parents:
14370
diff
changeset
|
100 Hunk #1 FAILED at 0 |
6d42c797ca6e
patch: keep patching after missing copy source (issue3480)
Patrick Mezard <patrick@mezard.eu>
parents:
14370
diff
changeset
|
101 Hunk #2 FAILED at 7 |
6d42c797ca6e
patch: keep patching after missing copy source (issue3480)
Patrick Mezard <patrick@mezard.eu>
parents:
14370
diff
changeset
|
102 2 out of 2 hunks FAILED -- saving rejects to file bb.rej |
6d42c797ca6e
patch: keep patching after missing copy source (issue3480)
Patrick Mezard <patrick@mezard.eu>
parents:
14370
diff
changeset
|
103 b not tracked! |
6d42c797ca6e
patch: keep patching after missing copy source (issue3480)
Patrick Mezard <patrick@mezard.eu>
parents:
14370
diff
changeset
|
104 patch failed, unable to continue (try -v) |
24365
f1eaf03dd608
commands: say "working directory" in full spelling
Yuya Nishihara <yuya@tcha.org>
parents:
16813
diff
changeset
|
105 patch failed, rejects left in working directory |
26780 | 106 errors during apply, please fix and qrefresh changebb |
16813
6d42c797ca6e
patch: keep patching after missing copy source (issue3480)
Patrick Mezard <patrick@mezard.eu>
parents:
14370
diff
changeset
|
107 [2] |
6d42c797ca6e
patch: keep patching after missing copy source (issue3480)
Patrick Mezard <patrick@mezard.eu>
parents:
14370
diff
changeset
|
108 $ cat a |
6d42c797ca6e
patch: keep patching after missing copy source (issue3480)
Patrick Mezard <patrick@mezard.eu>
parents:
14370
diff
changeset
|
109 a |
6d42c797ca6e
patch: keep patching after missing copy source (issue3480)
Patrick Mezard <patrick@mezard.eu>
parents:
14370
diff
changeset
|
110 $ cat c |
6d42c797ca6e
patch: keep patching after missing copy source (issue3480)
Patrick Mezard <patrick@mezard.eu>
parents:
14370
diff
changeset
|
111 c |
6d42c797ca6e
patch: keep patching after missing copy source (issue3480)
Patrick Mezard <patrick@mezard.eu>
parents:
14370
diff
changeset
|
112 $ cat bb.rej |
6d42c797ca6e
patch: keep patching after missing copy source (issue3480)
Patrick Mezard <patrick@mezard.eu>
parents:
14370
diff
changeset
|
113 --- bb |
6d42c797ca6e
patch: keep patching after missing copy source (issue3480)
Patrick Mezard <patrick@mezard.eu>
parents:
14370
diff
changeset
|
114 +++ bb |
6d42c797ca6e
patch: keep patching after missing copy source (issue3480)
Patrick Mezard <patrick@mezard.eu>
parents:
14370
diff
changeset
|
115 @@ -1,3 +1,5 @@ |
6d42c797ca6e
patch: keep patching after missing copy source (issue3480)
Patrick Mezard <patrick@mezard.eu>
parents:
14370
diff
changeset
|
116 +b |
6d42c797ca6e
patch: keep patching after missing copy source (issue3480)
Patrick Mezard <patrick@mezard.eu>
parents:
14370
diff
changeset
|
117 +b |
6d42c797ca6e
patch: keep patching after missing copy source (issue3480)
Patrick Mezard <patrick@mezard.eu>
parents:
14370
diff
changeset
|
118 a |
6d42c797ca6e
patch: keep patching after missing copy source (issue3480)
Patrick Mezard <patrick@mezard.eu>
parents:
14370
diff
changeset
|
119 a |
6d42c797ca6e
patch: keep patching after missing copy source (issue3480)
Patrick Mezard <patrick@mezard.eu>
parents:
14370
diff
changeset
|
120 a |
6d42c797ca6e
patch: keep patching after missing copy source (issue3480)
Patrick Mezard <patrick@mezard.eu>
parents:
14370
diff
changeset
|
121 @@ -8,3 +10,5 @@ |
6d42c797ca6e
patch: keep patching after missing copy source (issue3480)
Patrick Mezard <patrick@mezard.eu>
parents:
14370
diff
changeset
|
122 a |
6d42c797ca6e
patch: keep patching after missing copy source (issue3480)
Patrick Mezard <patrick@mezard.eu>
parents:
14370
diff
changeset
|
123 a |
6d42c797ca6e
patch: keep patching after missing copy source (issue3480)
Patrick Mezard <patrick@mezard.eu>
parents:
14370
diff
changeset
|
124 a |
6d42c797ca6e
patch: keep patching after missing copy source (issue3480)
Patrick Mezard <patrick@mezard.eu>
parents:
14370
diff
changeset
|
125 +c |
6d42c797ca6e
patch: keep patching after missing copy source (issue3480)
Patrick Mezard <patrick@mezard.eu>
parents:
14370
diff
changeset
|
126 +c |
6d42c797ca6e
patch: keep patching after missing copy source (issue3480)
Patrick Mezard <patrick@mezard.eu>
parents:
14370
diff
changeset
|
127 |
12324
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
128 $ cd .. |
5581
8a8c341bd292
mq: missing target files do not make qpush to fail immediately (issue 835)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
129 |
8a8c341bd292
mq: missing target files do not make qpush to fail immediately (issue 835)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
130 |
12324
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
131 $ echo "[diff]" >> $HGRCPATH |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
132 $ echo "git=1" >> $HGRCPATH |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
133 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
134 $ hg init git |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
135 $ cd git |
39707
5abc47d4ca6b
tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents:
36390
diff
changeset
|
136 $ "$PYTHON" ../writelines.py b 1 '\x00' |
12324
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
137 $ hg ci -Am addb |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
138 adding b |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
139 $ echo a > a |
39707
5abc47d4ca6b
tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents:
36390
diff
changeset
|
140 $ "$PYTHON" ../writelines.py b 1 '\x01' 1 '\x00' |
12324
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
141 $ echo c > c |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
142 $ hg add a c |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
143 $ hg qnew -f changeb |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
144 $ hg qpop |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
145 popping changeb |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
146 patch queue now empty |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
147 $ hg rm b |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
148 $ hg ci -Am rmb |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
149 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
150 Push git patch with missing target: |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
151 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
152 $ hg qpush |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
153 applying changeb |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
154 unable to find 'b' for patching |
29900
50f2966f86ca
import: report directory-relative paths in error messages (issue5224)
liscju <piotr.listkiewicz@gmail.com>
parents:
26780
diff
changeset
|
155 (use '--prefix' to apply patch relative to the current directory) |
12324
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
156 1 out of 1 hunks FAILED -- saving rejects to file b.rej |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
157 patch failed, unable to continue (try -v) |
24365
f1eaf03dd608
commands: say "working directory" in full spelling
Yuya Nishihara <yuya@tcha.org>
parents:
16813
diff
changeset
|
158 patch failed, rejects left in working directory |
26780 | 159 errors during apply, please fix and qrefresh changeb |
12324
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
160 [2] |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
161 $ hg st |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
162 ? b.rej |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
163 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
164 Display added files: |
5581
8a8c341bd292
mq: missing target files do not make qpush to fail immediately (issue 835)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
165 |
12324
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
166 $ cat a |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
167 a |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
168 $ cat c |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
169 c |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
170 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
171 Display rejections: |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
172 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
173 $ cat b.rej |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
174 --- b |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
175 +++ b |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
176 GIT binary patch |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
177 literal 2 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
178 Jc${No0000400IC2 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
179 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
180 $ cd .. |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
181 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
182 Test push creating directory during git copy or rename: |
5581
8a8c341bd292
mq: missing target files do not make qpush to fail immediately (issue 835)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
183 |
12324
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
184 $ hg init missingdir |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
185 $ cd missingdir |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
186 $ echo a > a |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
187 $ hg ci -Am adda |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
188 adding a |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
189 $ mkdir d |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
190 $ hg copy a d/a2 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
191 $ hg mv a d/a |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
192 $ hg qnew -g -f patch |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
193 $ hg qpop |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
194 popping patch |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
195 patch queue now empty |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
196 $ hg qpush |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
197 applying patch |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
198 now at: patch |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
199 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
200 $ cd .. |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
7506
diff
changeset
|
201 |