Mercurial > hg
annotate tests/test-mq-qimport.t @ 51168:a9e00554b3e4 stable
procutil: move stdin assignment outside of try-finally block
There is an stdin variable in the global scope of this module. And in the
`finally` block of this try-finally statement we're checking `if stdin is not
None`. Let's make sure we don't confuse code check tools into thinking we want
to use global stdin by moving this line of code outside of `try`.
This was caught by pytype 2023.11.21 on Python 3.11.2.
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Sat, 02 Dec 2023 15:10:28 -0300 |
parents | fe3303436b79 |
children |
rev | line source |
---|---|
12464
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
1 $ cat > writelines.py <<EOF |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
2 > import sys |
48944
fe3303436b79
tests: remove Python 2 support code
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41738
diff
changeset
|
3 > encode = lambda x: x.encode('utf-8').decode('unicode_escape').encode('utf-8') |
12464
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
4 > path = sys.argv[1] |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
5 > args = sys.argv[2:] |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
6 > assert (len(args) % 2) == 0 |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
7 > |
36021
85c94c9d342b
py3: replace file() with open() in test-mq-qimport.t
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32940
diff
changeset
|
8 > f = open(path, 'wb') |
41738
c70bdd222dcd
tests: bulk changes to avoid whitespace errors of check-code.py
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
41328
diff
changeset
|
9 > for i in range(len(args) // 2): |
c70bdd222dcd
tests: bulk changes to avoid whitespace errors of check-code.py
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
41328
diff
changeset
|
10 > count, s = args[2 * i:2 * i + 2] |
12464
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
11 > count = int(count) |
41328
13ccb03f2145
tests: handle string escaping/encoding on Python 3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39707
diff
changeset
|
12 > s = encode(s) |
41738
c70bdd222dcd
tests: bulk changes to avoid whitespace errors of check-code.py
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
41328
diff
changeset
|
13 > f.write(s * count) |
12464
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
14 > f.close() |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
15 > |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
16 > EOF |
23172
e955549cd045
tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents:
22046
diff
changeset
|
17 > cat <<EOF >> $HGRCPATH |
e955549cd045
tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents:
22046
diff
changeset
|
18 > [extensions] |
e955549cd045
tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents:
22046
diff
changeset
|
19 > mq = |
e955549cd045
tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents:
22046
diff
changeset
|
20 > [diff] |
e955549cd045
tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents:
22046
diff
changeset
|
21 > git = 1 |
e955549cd045
tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents:
22046
diff
changeset
|
22 > EOF |
12464
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
23 $ hg init repo |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
24 $ cd repo |
6027
cee68264ed92
mq: qimport must read patches in binary mode
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
25 |
16987
54295c87eefc
mq: abort if no files or revisions are specified for qimport
Thomas Arendsen Hein <thomas@intevation.de>
parents:
16913
diff
changeset
|
26 qimport without file or revision |
54295c87eefc
mq: abort if no files or revisions are specified for qimport
Thomas Arendsen Hein <thomas@intevation.de>
parents:
16913
diff
changeset
|
27 |
54295c87eefc
mq: abort if no files or revisions are specified for qimport
Thomas Arendsen Hein <thomas@intevation.de>
parents:
16913
diff
changeset
|
28 $ hg qimport |
54295c87eefc
mq: abort if no files or revisions are specified for qimport
Thomas Arendsen Hein <thomas@intevation.de>
parents:
16913
diff
changeset
|
29 abort: no files or revisions specified |
54295c87eefc
mq: abort if no files or revisions are specified for qimport
Thomas Arendsen Hein <thomas@intevation.de>
parents:
16913
diff
changeset
|
30 [255] |
54295c87eefc
mq: abort if no files or revisions are specified for qimport
Thomas Arendsen Hein <thomas@intevation.de>
parents:
16913
diff
changeset
|
31 |
12464
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
32 qimport non-existing-file |
6027
cee68264ed92
mq: qimport must read patches in binary mode
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
33 |
12464
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
34 $ hg qimport non-existing-file |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
35 abort: unable to read file non-existing-file |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
36 [255] |
6940
05ec27530d04
qimport: report filename in case of IOError
Martin Geisler <mg@daimi.au.dk>
parents:
6027
diff
changeset
|
37 |
16359
a1b6a63f9f39
context: make changectx.mutable() benefit from .phase() logic
Patrick Mezard <patrick@mezard.eu>
parents:
16119
diff
changeset
|
38 qimport null revision |
a1b6a63f9f39
context: make changectx.mutable() benefit from .phase() logic
Patrick Mezard <patrick@mezard.eu>
parents:
16119
diff
changeset
|
39 |
a1b6a63f9f39
context: make changectx.mutable() benefit from .phase() logic
Patrick Mezard <patrick@mezard.eu>
parents:
16119
diff
changeset
|
40 $ hg qimport -r null |
a1b6a63f9f39
context: make changectx.mutable() benefit from .phase() logic
Patrick Mezard <patrick@mezard.eu>
parents:
16119
diff
changeset
|
41 abort: revision -1 is not mutable |
29968
0342bf292f73
mq: use single quotes in use warning
timeless <timeless@mozdev.org>
parents:
28388
diff
changeset
|
42 (see 'hg help phases' for details) |
16359
a1b6a63f9f39
context: make changectx.mutable() benefit from .phase() logic
Patrick Mezard <patrick@mezard.eu>
parents:
16119
diff
changeset
|
43 [255] |
a1b6a63f9f39
context: make changectx.mutable() benefit from .phase() logic
Patrick Mezard <patrick@mezard.eu>
parents:
16119
diff
changeset
|
44 $ hg qseries |
a1b6a63f9f39
context: make changectx.mutable() benefit from .phase() logic
Patrick Mezard <patrick@mezard.eu>
parents:
16119
diff
changeset
|
45 |
12464
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
46 import email |
6940
05ec27530d04
qimport: report filename in case of IOError
Martin Geisler <mg@daimi.au.dk>
parents:
6027
diff
changeset
|
47 |
12464
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
48 $ hg qimport --push -n email - <<EOF |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
49 > From: Username in email <test@example.net> |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
50 > Subject: [PATCH] Message in email |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
51 > Date: Fri, 02 Jan 1970 00:00:00 +0000 |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
52 > |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
53 > Text before patch. |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
54 > |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
55 > # HG changeset patch |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
56 > # User Username in patch <test@example.net> |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
57 > # Date 0 0 |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
58 > # Node ID 1a706973a7d84cb549823634a821d9bdf21c6220 |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
59 > # Parent 0000000000000000000000000000000000000000 |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
60 > First line of commit message. |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
61 > |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
62 > More text in commit message. |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
63 > --- confuse the diff detection |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
64 > |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
65 > diff --git a/x b/x |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
66 > new file mode 100644 |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
67 > --- /dev/null |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
68 > +++ b/x |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
69 > @@ -0,0 +1,1 @@ |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
70 > +new file |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
71 > Text after patch. |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
72 > |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
73 > EOF |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
74 adding email to series file |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
75 applying email |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
76 now at: email |
9287
53fdf18fd63b
mq: Parse commit message after we find start of changeset patch
David Soria Parra <dsp@php.net>
parents:
8362
diff
changeset
|
77 |
12464
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
78 hg tip -v |
9287
53fdf18fd63b
mq: Parse commit message after we find start of changeset patch
David Soria Parra <dsp@php.net>
parents:
8362
diff
changeset
|
79 |
12464
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
80 $ hg tip -v |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
81 changeset: 0:1a706973a7d8 |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
82 tag: email |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
83 tag: qbase |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
84 tag: qtip |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
85 tag: tip |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
86 user: Username in patch <test@example.net> |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
87 date: Thu Jan 01 00:00:00 1970 +0000 |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
88 files: x |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
89 description: |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
90 First line of commit message. |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
91 |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
92 More text in commit message. |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
93 |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
94 |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
95 $ hg qpop |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
96 popping email |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
97 patch queue now empty |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
98 $ hg qdelete email |
9287
53fdf18fd63b
mq: Parse commit message after we find start of changeset patch
David Soria Parra <dsp@php.net>
parents:
8362
diff
changeset
|
99 |
12464
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
100 import URL |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
101 |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
102 $ echo foo >> foo |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
103 $ hg add foo |
12642
bb35840e965c
tests: remove the last traces of $HGTMP
Mads Kiilerich <mads@kiilerich.com>
parents:
12464
diff
changeset
|
104 $ hg diff > url.diff |
12464
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
105 $ hg revert --no-backup foo |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
106 $ rm foo |
9287
53fdf18fd63b
mq: Parse commit message after we find start of changeset patch
David Soria Parra <dsp@php.net>
parents:
8362
diff
changeset
|
107 |
12464
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
108 Under unix: file:///foobar/blah |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
109 Under windows: file:///c:/foobar/blah |
9287
53fdf18fd63b
mq: Parse commit message after we find start of changeset patch
David Soria Parra <dsp@php.net>
parents:
8362
diff
changeset
|
110 |
12642
bb35840e965c
tests: remove the last traces of $HGTMP
Mads Kiilerich <mads@kiilerich.com>
parents:
12464
diff
changeset
|
111 $ patchurl=`pwd | tr '\\\\' /`/url.diff |
12464
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
112 $ expr "$patchurl" : "\/" > /dev/null || patchurl="/$patchurl" |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
113 $ hg qimport file://"$patchurl" |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
114 adding url.diff to series file |
12642
bb35840e965c
tests: remove the last traces of $HGTMP
Mads Kiilerich <mads@kiilerich.com>
parents:
12464
diff
changeset
|
115 $ rm url.diff |
12464
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
116 $ hg qun |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
117 url.diff |
9287
53fdf18fd63b
mq: Parse commit message after we find start of changeset patch
David Soria Parra <dsp@php.net>
parents:
8362
diff
changeset
|
118 |
12464
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
119 import patch that already exists |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
120 |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
121 $ echo foo2 >> foo |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
122 $ hg add foo |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
123 $ hg diff > ../url.diff |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
124 $ hg revert --no-backup foo |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
125 $ rm foo |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
126 $ hg qimport ../url.diff |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
127 abort: patch "url.diff" already exists |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
128 [255] |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
129 $ hg qpush |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
130 applying url.diff |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
131 now at: url.diff |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
132 $ cat foo |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
133 foo |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
134 $ hg qpop |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
135 popping url.diff |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
136 patch queue now empty |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
137 |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
138 qimport -f |
7158
d1d011accf94
mq: let qimport read patches from URLs
Brendan Cully <brendan@kublai.com>
parents:
6940
diff
changeset
|
139 |
12464
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
140 $ hg qimport -f ../url.diff |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
141 adding url.diff to series file |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
142 $ hg qpush |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
143 applying url.diff |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
144 now at: url.diff |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
145 $ cat foo |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
146 foo2 |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
147 $ hg qpop |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
148 popping url.diff |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
149 patch queue now empty |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
150 |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
151 build diff with CRLF |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
152 |
39707
5abc47d4ca6b
tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents:
37845
diff
changeset
|
153 $ "$PYTHON" ../writelines.py b 5 'a\n' 5 'a\r\n' |
12464
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
154 $ hg ci -Am addb |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
155 adding b |
39707
5abc47d4ca6b
tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents:
37845
diff
changeset
|
156 $ "$PYTHON" ../writelines.py b 2 'a\n' 10 'b\n' 2 'a\r\n' |
12464
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
157 $ hg diff > b.diff |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
158 $ hg up -C |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
159 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
160 |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
161 qimport CRLF diff |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
162 |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
163 $ hg qimport b.diff |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
164 adding b.diff to series file |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
165 $ hg qpush |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
166 applying b.diff |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
167 now at: b.diff |
7160
1b7b21b634f2
mq: make qimport -f work properly. Closes issue1255.
Brendan Cully <brendan@kublai.com>
parents:
7158
diff
changeset
|
168 |
12464
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
169 try to import --push |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
170 |
16119
5de83d9ca79c
mq: make qimport --push push all imported patches (issue3130)
Patrick Mezard <patrick@mezard.eu>
parents:
16027
diff
changeset
|
171 $ cat > appendfoo.diff <<EOF |
5de83d9ca79c
mq: make qimport --push push all imported patches (issue3130)
Patrick Mezard <patrick@mezard.eu>
parents:
16027
diff
changeset
|
172 > append foo |
17347
2da47de36b6f
check-code: fix check for trailing whitespace on continued lines too
Mads Kiilerich <mads@kiilerich.com>
parents:
16987
diff
changeset
|
173 > |
16119
5de83d9ca79c
mq: make qimport --push push all imported patches (issue3130)
Patrick Mezard <patrick@mezard.eu>
parents:
16027
diff
changeset
|
174 > diff -r 07f494440405 -r 261500830e46 baz |
5de83d9ca79c
mq: make qimport --push push all imported patches (issue3130)
Patrick Mezard <patrick@mezard.eu>
parents:
16027
diff
changeset
|
175 > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
5de83d9ca79c
mq: make qimport --push push all imported patches (issue3130)
Patrick Mezard <patrick@mezard.eu>
parents:
16027
diff
changeset
|
176 > +++ b/baz Thu Jan 01 00:00:00 1970 +0000 |
5de83d9ca79c
mq: make qimport --push push all imported patches (issue3130)
Patrick Mezard <patrick@mezard.eu>
parents:
16027
diff
changeset
|
177 > @@ -0,0 +1,1 @@ |
5de83d9ca79c
mq: make qimport --push push all imported patches (issue3130)
Patrick Mezard <patrick@mezard.eu>
parents:
16027
diff
changeset
|
178 > +foo |
5de83d9ca79c
mq: make qimport --push push all imported patches (issue3130)
Patrick Mezard <patrick@mezard.eu>
parents:
16027
diff
changeset
|
179 > EOF |
5de83d9ca79c
mq: make qimport --push push all imported patches (issue3130)
Patrick Mezard <patrick@mezard.eu>
parents:
16027
diff
changeset
|
180 |
5de83d9ca79c
mq: make qimport --push push all imported patches (issue3130)
Patrick Mezard <patrick@mezard.eu>
parents:
16027
diff
changeset
|
181 $ cat > appendbar.diff <<EOF |
5de83d9ca79c
mq: make qimport --push push all imported patches (issue3130)
Patrick Mezard <patrick@mezard.eu>
parents:
16027
diff
changeset
|
182 > append bar |
17347
2da47de36b6f
check-code: fix check for trailing whitespace on continued lines too
Mads Kiilerich <mads@kiilerich.com>
parents:
16987
diff
changeset
|
183 > |
16119
5de83d9ca79c
mq: make qimport --push push all imported patches (issue3130)
Patrick Mezard <patrick@mezard.eu>
parents:
16027
diff
changeset
|
184 > diff -r 07f494440405 -r 261500830e46 baz |
5de83d9ca79c
mq: make qimport --push push all imported patches (issue3130)
Patrick Mezard <patrick@mezard.eu>
parents:
16027
diff
changeset
|
185 > --- a/baz Thu Jan 01 00:00:00 1970 +0000 |
5de83d9ca79c
mq: make qimport --push push all imported patches (issue3130)
Patrick Mezard <patrick@mezard.eu>
parents:
16027
diff
changeset
|
186 > +++ b/baz Thu Jan 01 00:00:00 1970 +0000 |
5de83d9ca79c
mq: make qimport --push push all imported patches (issue3130)
Patrick Mezard <patrick@mezard.eu>
parents:
16027
diff
changeset
|
187 > @@ -1,1 +1,2 @@ |
5de83d9ca79c
mq: make qimport --push push all imported patches (issue3130)
Patrick Mezard <patrick@mezard.eu>
parents:
16027
diff
changeset
|
188 > foo |
5de83d9ca79c
mq: make qimport --push push all imported patches (issue3130)
Patrick Mezard <patrick@mezard.eu>
parents:
16027
diff
changeset
|
189 > +bar |
5de83d9ca79c
mq: make qimport --push push all imported patches (issue3130)
Patrick Mezard <patrick@mezard.eu>
parents:
16027
diff
changeset
|
190 > EOF |
5de83d9ca79c
mq: make qimport --push push all imported patches (issue3130)
Patrick Mezard <patrick@mezard.eu>
parents:
16027
diff
changeset
|
191 |
5de83d9ca79c
mq: make qimport --push push all imported patches (issue3130)
Patrick Mezard <patrick@mezard.eu>
parents:
16027
diff
changeset
|
192 $ hg qimport --push appendfoo.diff appendbar.diff |
5de83d9ca79c
mq: make qimport --push push all imported patches (issue3130)
Patrick Mezard <patrick@mezard.eu>
parents:
16027
diff
changeset
|
193 adding appendfoo.diff to series file |
5de83d9ca79c
mq: make qimport --push push all imported patches (issue3130)
Patrick Mezard <patrick@mezard.eu>
parents:
16027
diff
changeset
|
194 adding appendbar.diff to series file |
5de83d9ca79c
mq: make qimport --push push all imported patches (issue3130)
Patrick Mezard <patrick@mezard.eu>
parents:
16027
diff
changeset
|
195 applying appendfoo.diff |
5de83d9ca79c
mq: make qimport --push push all imported patches (issue3130)
Patrick Mezard <patrick@mezard.eu>
parents:
16027
diff
changeset
|
196 applying appendbar.diff |
5de83d9ca79c
mq: make qimport --push push all imported patches (issue3130)
Patrick Mezard <patrick@mezard.eu>
parents:
16027
diff
changeset
|
197 now at: appendbar.diff |
12464
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
198 $ hg qfin -a |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
199 patch b.diff finalized without changeset message |
26736
143b52fce68e
mq: generate patch names from first line of description
Mads Kiilerich <mads@kiilerich.com>
parents:
25474
diff
changeset
|
200 $ touch .hg/patches/append_foo |
21965
fd7839d1107d
qimport: record imported revs incrementally (issue3874)
Matt Mackall <mpm@selenic.com>
parents:
17565
diff
changeset
|
201 $ hg qimport -r 'p1(.)::' |
fd7839d1107d
qimport: record imported revs incrementally (issue3874)
Matt Mackall <mpm@selenic.com>
parents:
17565
diff
changeset
|
202 $ hg qapplied |
27919
db24d6888896
mq: check for reserved patch name with qimport -r (issue5033)
Mads Kiilerich <madski@unity3d.com>
parents:
27513
diff
changeset
|
203 append_foo__1 |
26736
143b52fce68e
mq: generate patch names from first line of description
Mads Kiilerich <mads@kiilerich.com>
parents:
25474
diff
changeset
|
204 append_bar |
21965
fd7839d1107d
qimport: record imported revs incrementally (issue3874)
Matt Mackall <mpm@selenic.com>
parents:
17565
diff
changeset
|
205 $ hg qfin -a |
26736
143b52fce68e
mq: generate patch names from first line of description
Mads Kiilerich <mads@kiilerich.com>
parents:
25474
diff
changeset
|
206 $ rm .hg/patches/append_foo |
16119
5de83d9ca79c
mq: make qimport --push push all imported patches (issue3130)
Patrick Mezard <patrick@mezard.eu>
parents:
16027
diff
changeset
|
207 $ hg qimport -r 'p1(.)::' -P |
12464
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
208 $ hg qpop -a |
26736
143b52fce68e
mq: generate patch names from first line of description
Mads Kiilerich <mads@kiilerich.com>
parents:
25474
diff
changeset
|
209 popping append_bar |
143b52fce68e
mq: generate patch names from first line of description
Mads Kiilerich <mads@kiilerich.com>
parents:
25474
diff
changeset
|
210 popping append_foo |
12464
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
211 patch queue now empty |
26736
143b52fce68e
mq: generate patch names from first line of description
Mads Kiilerich <mads@kiilerich.com>
parents:
25474
diff
changeset
|
212 $ hg qdel append_foo |
143b52fce68e
mq: generate patch names from first line of description
Mads Kiilerich <mads@kiilerich.com>
parents:
25474
diff
changeset
|
213 $ hg qdel -k append_bar |
12464
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
214 |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
215 qimport -e |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
216 |
26736
143b52fce68e
mq: generate patch names from first line of description
Mads Kiilerich <mads@kiilerich.com>
parents:
25474
diff
changeset
|
217 $ hg qimport -e append_bar |
143b52fce68e
mq: generate patch names from first line of description
Mads Kiilerich <mads@kiilerich.com>
parents:
25474
diff
changeset
|
218 adding append_bar to series file |
143b52fce68e
mq: generate patch names from first line of description
Mads Kiilerich <mads@kiilerich.com>
parents:
25474
diff
changeset
|
219 $ hg qdel -k append_bar |
6027
cee68264ed92
mq: qimport must read patches in binary mode
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
220 |
12464
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
221 qimport -e --name newname oldexisitingpatch |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
222 |
26736
143b52fce68e
mq: generate patch names from first line of description
Mads Kiilerich <mads@kiilerich.com>
parents:
25474
diff
changeset
|
223 $ hg qimport -e --name this-name-is-better append_bar |
143b52fce68e
mq: generate patch names from first line of description
Mads Kiilerich <mads@kiilerich.com>
parents:
25474
diff
changeset
|
224 renaming append_bar to this-name-is-better |
12464
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
225 adding this-name-is-better to series file |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
226 $ hg qser |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
227 this-name-is-better |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
228 url.diff |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
229 |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
230 qimport -e --name without --force |
11699
da0b9109186d
mq: support "qimport --existing --name renametothis thatexistingpatch"
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
231 |
12464
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
232 $ cp .hg/patches/this-name-is-better .hg/patches/3.diff |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
233 $ hg qimport -e --name this-name-is-better 3.diff |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
234 abort: patch "this-name-is-better" already exists |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
235 [255] |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
236 $ hg qser |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
237 this-name-is-better |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
238 url.diff |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
239 |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
240 qimport -e --name with --force |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
241 |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
242 $ hg qimport --force -e --name this-name-is-better 3.diff |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
243 renaming 3.diff to this-name-is-better |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
244 adding this-name-is-better to series file |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
245 $ hg qser |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
246 this-name-is-better |
3177e3a7b14f
tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents:
11701
diff
changeset
|
247 url.diff |
14395
dc961471efde
mq: check patch name is valid before reading imported file
Idan Kamara <idankk86@gmail.com>
parents:
12642
diff
changeset
|
248 |
31556
448acdee9161
mq: reject new patch name containing leading/trailing whitespace
Yuya Nishihara <yuya@tcha.org>
parents:
29968
diff
changeset
|
249 import patch of bad filename |
448acdee9161
mq: reject new patch name containing leading/trailing whitespace
Yuya Nishihara <yuya@tcha.org>
parents:
29968
diff
changeset
|
250 |
448acdee9161
mq: reject new patch name containing leading/trailing whitespace
Yuya Nishihara <yuya@tcha.org>
parents:
29968
diff
changeset
|
251 $ touch '../ bad.diff' |
448acdee9161
mq: reject new patch name containing leading/trailing whitespace
Yuya Nishihara <yuya@tcha.org>
parents:
29968
diff
changeset
|
252 $ hg qimport '../ bad.diff' |
448acdee9161
mq: reject new patch name containing leading/trailing whitespace
Yuya Nishihara <yuya@tcha.org>
parents:
29968
diff
changeset
|
253 abort: patch name cannot begin or end with whitespace |
448acdee9161
mq: reject new patch name containing leading/trailing whitespace
Yuya Nishihara <yuya@tcha.org>
parents:
29968
diff
changeset
|
254 [255] |
448acdee9161
mq: reject new patch name containing leading/trailing whitespace
Yuya Nishihara <yuya@tcha.org>
parents:
29968
diff
changeset
|
255 $ touch '.hg/patches/ bad.diff' |
448acdee9161
mq: reject new patch name containing leading/trailing whitespace
Yuya Nishihara <yuya@tcha.org>
parents:
29968
diff
changeset
|
256 $ hg qimport -e ' bad.diff' |
448acdee9161
mq: reject new patch name containing leading/trailing whitespace
Yuya Nishihara <yuya@tcha.org>
parents:
29968
diff
changeset
|
257 abort: patch name cannot begin or end with whitespace |
448acdee9161
mq: reject new patch name containing leading/trailing whitespace
Yuya Nishihara <yuya@tcha.org>
parents:
29968
diff
changeset
|
258 [255] |
448acdee9161
mq: reject new patch name containing leading/trailing whitespace
Yuya Nishihara <yuya@tcha.org>
parents:
29968
diff
changeset
|
259 |
14395
dc961471efde
mq: check patch name is valid before reading imported file
Idan Kamara <idankk86@gmail.com>
parents:
12642
diff
changeset
|
260 qimport with bad name, should abort before reading file |
dc961471efde
mq: check patch name is valid before reading imported file
Idan Kamara <idankk86@gmail.com>
parents:
12642
diff
changeset
|
261 |
17492 | 262 $ hg qimport non-existent-file --name .hg |
14395
dc961471efde
mq: check patch name is valid before reading imported file
Idan Kamara <idankk86@gmail.com>
parents:
12642
diff
changeset
|
263 abort: patch name cannot begin with ".hg" |
dc961471efde
mq: check patch name is valid before reading imported file
Idan Kamara <idankk86@gmail.com>
parents:
12642
diff
changeset
|
264 [255] |
31556
448acdee9161
mq: reject new patch name containing leading/trailing whitespace
Yuya Nishihara <yuya@tcha.org>
parents:
29968
diff
changeset
|
265 $ hg qimport non-existent-file --name ' foo' |
448acdee9161
mq: reject new patch name containing leading/trailing whitespace
Yuya Nishihara <yuya@tcha.org>
parents:
29968
diff
changeset
|
266 abort: patch name cannot begin or end with whitespace |
448acdee9161
mq: reject new patch name containing leading/trailing whitespace
Yuya Nishihara <yuya@tcha.org>
parents:
29968
diff
changeset
|
267 [255] |
448acdee9161
mq: reject new patch name containing leading/trailing whitespace
Yuya Nishihara <yuya@tcha.org>
parents:
29968
diff
changeset
|
268 $ hg qimport non-existent-file --name 'foo ' |
448acdee9161
mq: reject new patch name containing leading/trailing whitespace
Yuya Nishihara <yuya@tcha.org>
parents:
29968
diff
changeset
|
269 abort: patch name cannot begin or end with whitespace |
448acdee9161
mq: reject new patch name containing leading/trailing whitespace
Yuya Nishihara <yuya@tcha.org>
parents:
29968
diff
changeset
|
270 [255] |
14396
170747a3e139
mq: strip all leading slashes from url when importing
Idan Kamara <idankk86@gmail.com>
parents:
14395
diff
changeset
|
271 |
170747a3e139
mq: strip all leading slashes from url when importing
Idan Kamara <idankk86@gmail.com>
parents:
14395
diff
changeset
|
272 qimport http:// patch with leading slashes in url |
170747a3e139
mq: strip all leading slashes from url when importing
Idan Kamara <idankk86@gmail.com>
parents:
14395
diff
changeset
|
273 |
170747a3e139
mq: strip all leading slashes from url when importing
Idan Kamara <idankk86@gmail.com>
parents:
14395
diff
changeset
|
274 set up hgweb |
170747a3e139
mq: strip all leading slashes from url when importing
Idan Kamara <idankk86@gmail.com>
parents:
14395
diff
changeset
|
275 |
170747a3e139
mq: strip all leading slashes from url when importing
Idan Kamara <idankk86@gmail.com>
parents:
14395
diff
changeset
|
276 $ cd .. |
170747a3e139
mq: strip all leading slashes from url when importing
Idan Kamara <idankk86@gmail.com>
parents:
14395
diff
changeset
|
277 $ hg init served |
170747a3e139
mq: strip all leading slashes from url when importing
Idan Kamara <idankk86@gmail.com>
parents:
14395
diff
changeset
|
278 $ cd served |
170747a3e139
mq: strip all leading slashes from url when importing
Idan Kamara <idankk86@gmail.com>
parents:
14395
diff
changeset
|
279 $ echo a > a |
170747a3e139
mq: strip all leading slashes from url when importing
Idan Kamara <idankk86@gmail.com>
parents:
14395
diff
changeset
|
280 $ hg ci -Am patch |
170747a3e139
mq: strip all leading slashes from url when importing
Idan Kamara <idankk86@gmail.com>
parents:
14395
diff
changeset
|
281 adding a |
170747a3e139
mq: strip all leading slashes from url when importing
Idan Kamara <idankk86@gmail.com>
parents:
14395
diff
changeset
|
282 $ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
170747a3e139
mq: strip all leading slashes from url when importing
Idan Kamara <idankk86@gmail.com>
parents:
14395
diff
changeset
|
283 $ cat hg.pid >> $DAEMON_PIDS |
170747a3e139
mq: strip all leading slashes from url when importing
Idan Kamara <idankk86@gmail.com>
parents:
14395
diff
changeset
|
284 |
170747a3e139
mq: strip all leading slashes from url when importing
Idan Kamara <idankk86@gmail.com>
parents:
14395
diff
changeset
|
285 $ cd ../repo |
170747a3e139
mq: strip all leading slashes from url when importing
Idan Kamara <idankk86@gmail.com>
parents:
14395
diff
changeset
|
286 $ hg qimport http://localhost:$HGPORT/raw-rev/0/// |
170747a3e139
mq: strip all leading slashes from url when importing
Idan Kamara <idankk86@gmail.com>
parents:
14395
diff
changeset
|
287 adding 0 to series file |
16027
29ea059be33c
qimport: when mq.secret=True set qimported revision as secret
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
15934
diff
changeset
|
288 |
29ea059be33c
qimport: when mq.secret=True set qimported revision as secret
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
15934
diff
changeset
|
289 check qimport phase: |
29ea059be33c
qimport: when mq.secret=True set qimported revision as secret
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
15934
diff
changeset
|
290 |
29ea059be33c
qimport: when mq.secret=True set qimported revision as secret
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
15934
diff
changeset
|
291 $ hg -q qpush |
29ea059be33c
qimport: when mq.secret=True set qimported revision as secret
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
15934
diff
changeset
|
292 now at: 0 |
29ea059be33c
qimport: when mq.secret=True set qimported revision as secret
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
15934
diff
changeset
|
293 $ hg phase qparent |
29ea059be33c
qimport: when mq.secret=True set qimported revision as secret
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
15934
diff
changeset
|
294 1: draft |
29ea059be33c
qimport: when mq.secret=True set qimported revision as secret
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
15934
diff
changeset
|
295 $ hg qimport -r qparent |
29ea059be33c
qimport: when mq.secret=True set qimported revision as secret
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
15934
diff
changeset
|
296 $ hg phase qbase |
29ea059be33c
qimport: when mq.secret=True set qimported revision as secret
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
15934
diff
changeset
|
297 1: draft |
29ea059be33c
qimport: when mq.secret=True set qimported revision as secret
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
15934
diff
changeset
|
298 $ hg qfinish qbase |
29ea059be33c
qimport: when mq.secret=True set qimported revision as secret
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
15934
diff
changeset
|
299 $ echo '[mq]' >> $HGRCPATH |
29ea059be33c
qimport: when mq.secret=True set qimported revision as secret
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
15934
diff
changeset
|
300 $ echo 'secret=true' >> $HGRCPATH |
29ea059be33c
qimport: when mq.secret=True set qimported revision as secret
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
15934
diff
changeset
|
301 $ hg qimport -r qparent |
29ea059be33c
qimport: when mq.secret=True set qimported revision as secret
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
15934
diff
changeset
|
302 $ hg phase qbase |
29ea059be33c
qimport: when mq.secret=True set qimported revision as secret
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
15934
diff
changeset
|
303 1: secret |
16913
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
16359
diff
changeset
|
304 |
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
16359
diff
changeset
|
305 $ cd .. |
17565
f62ed3d90377
tests: enable even more Windows server tests
Patrick Mezard <patrick@mezard.eu>
parents:
17492
diff
changeset
|
306 |
25474
8c14f87bd0ae
tests: drop DAEMON_PIDS from killdaemons calls
Matt Mackall <mpm@selenic.com>
parents:
25472
diff
changeset
|
307 $ killdaemons.py |
27513
707cdf2c3700
mq: use fallback patch name if no alpha-numeric in summary line (issue5025)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26736
diff
changeset
|
308 |
707cdf2c3700
mq: use fallback patch name if no alpha-numeric in summary line (issue5025)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26736
diff
changeset
|
309 check patch name generation for non-alpha-numeric summary line |
707cdf2c3700
mq: use fallback patch name if no alpha-numeric in summary line (issue5025)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26736
diff
changeset
|
310 |
707cdf2c3700
mq: use fallback patch name if no alpha-numeric in summary line (issue5025)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26736
diff
changeset
|
311 $ cd repo |
707cdf2c3700
mq: use fallback patch name if no alpha-numeric in summary line (issue5025)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26736
diff
changeset
|
312 |
707cdf2c3700
mq: use fallback patch name if no alpha-numeric in summary line (issue5025)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26736
diff
changeset
|
313 $ hg qpop -a -q |
707cdf2c3700
mq: use fallback patch name if no alpha-numeric in summary line (issue5025)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26736
diff
changeset
|
314 patch queue now empty |
707cdf2c3700
mq: use fallback patch name if no alpha-numeric in summary line (issue5025)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26736
diff
changeset
|
315 $ hg qseries -v |
707cdf2c3700
mq: use fallback patch name if no alpha-numeric in summary line (issue5025)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26736
diff
changeset
|
316 0 U imported_patch_b_diff |
707cdf2c3700
mq: use fallback patch name if no alpha-numeric in summary line (issue5025)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26736
diff
changeset
|
317 1 U 0 |
707cdf2c3700
mq: use fallback patch name if no alpha-numeric in summary line (issue5025)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26736
diff
changeset
|
318 2 U this-name-is-better |
707cdf2c3700
mq: use fallback patch name if no alpha-numeric in summary line (issue5025)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26736
diff
changeset
|
319 3 U url.diff |
707cdf2c3700
mq: use fallback patch name if no alpha-numeric in summary line (issue5025)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26736
diff
changeset
|
320 |
707cdf2c3700
mq: use fallback patch name if no alpha-numeric in summary line (issue5025)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26736
diff
changeset
|
321 $ echo bb >> b |
707cdf2c3700
mq: use fallback patch name if no alpha-numeric in summary line (issue5025)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26736
diff
changeset
|
322 $ hg commit -m '==++--==' |
707cdf2c3700
mq: use fallback patch name if no alpha-numeric in summary line (issue5025)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26736
diff
changeset
|
323 |
707cdf2c3700
mq: use fallback patch name if no alpha-numeric in summary line (issue5025)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26736
diff
changeset
|
324 $ hg qimport -r tip |
707cdf2c3700
mq: use fallback patch name if no alpha-numeric in summary line (issue5025)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26736
diff
changeset
|
325 $ hg qseries -v |
707cdf2c3700
mq: use fallback patch name if no alpha-numeric in summary line (issue5025)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26736
diff
changeset
|
326 0 A 1.diff |
707cdf2c3700
mq: use fallback patch name if no alpha-numeric in summary line (issue5025)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26736
diff
changeset
|
327 1 U imported_patch_b_diff |
707cdf2c3700
mq: use fallback patch name if no alpha-numeric in summary line (issue5025)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26736
diff
changeset
|
328 2 U 0 |
707cdf2c3700
mq: use fallback patch name if no alpha-numeric in summary line (issue5025)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26736
diff
changeset
|
329 3 U this-name-is-better |
707cdf2c3700
mq: use fallback patch name if no alpha-numeric in summary line (issue5025)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26736
diff
changeset
|
330 4 U url.diff |
27919
db24d6888896
mq: check for reserved patch name with qimport -r (issue5033)
Mads Kiilerich <madski@unity3d.com>
parents:
27513
diff
changeset
|
331 |
db24d6888896
mq: check for reserved patch name with qimport -r (issue5033)
Mads Kiilerich <madski@unity3d.com>
parents:
27513
diff
changeset
|
332 check reserved patch names |
db24d6888896
mq: check for reserved patch name with qimport -r (issue5033)
Mads Kiilerich <madski@unity3d.com>
parents:
27513
diff
changeset
|
333 |
db24d6888896
mq: check for reserved patch name with qimport -r (issue5033)
Mads Kiilerich <madski@unity3d.com>
parents:
27513
diff
changeset
|
334 $ hg qpop -qa |
db24d6888896
mq: check for reserved patch name with qimport -r (issue5033)
Mads Kiilerich <madski@unity3d.com>
parents:
27513
diff
changeset
|
335 patch queue now empty |
db24d6888896
mq: check for reserved patch name with qimport -r (issue5033)
Mads Kiilerich <madski@unity3d.com>
parents:
27513
diff
changeset
|
336 $ echo >> b |
db24d6888896
mq: check for reserved patch name with qimport -r (issue5033)
Mads Kiilerich <madski@unity3d.com>
parents:
27513
diff
changeset
|
337 $ hg commit -m 'status' |
db24d6888896
mq: check for reserved patch name with qimport -r (issue5033)
Mads Kiilerich <madski@unity3d.com>
parents:
27513
diff
changeset
|
338 $ echo >> b |
db24d6888896
mq: check for reserved patch name with qimport -r (issue5033)
Mads Kiilerich <madski@unity3d.com>
parents:
27513
diff
changeset
|
339 $ hg commit -m '.' |
db24d6888896
mq: check for reserved patch name with qimport -r (issue5033)
Mads Kiilerich <madski@unity3d.com>
parents:
27513
diff
changeset
|
340 $ echo >> b |
db24d6888896
mq: check for reserved patch name with qimport -r (issue5033)
Mads Kiilerich <madski@unity3d.com>
parents:
27513
diff
changeset
|
341 $ hg commit -m 'taken' |
db24d6888896
mq: check for reserved patch name with qimport -r (issue5033)
Mads Kiilerich <madski@unity3d.com>
parents:
27513
diff
changeset
|
342 $ mkdir .hg/patches/taken |
db24d6888896
mq: check for reserved patch name with qimport -r (issue5033)
Mads Kiilerich <madski@unity3d.com>
parents:
27513
diff
changeset
|
343 $ touch .hg/patches/taken__1 |
db24d6888896
mq: check for reserved patch name with qimport -r (issue5033)
Mads Kiilerich <madski@unity3d.com>
parents:
27513
diff
changeset
|
344 $ hg qimport -r -3:: |
db24d6888896
mq: check for reserved patch name with qimport -r (issue5033)
Mads Kiilerich <madski@unity3d.com>
parents:
27513
diff
changeset
|
345 $ hg qap |
db24d6888896
mq: check for reserved patch name with qimport -r (issue5033)
Mads Kiilerich <madski@unity3d.com>
parents:
27513
diff
changeset
|
346 1.diff__1 |
db24d6888896
mq: check for reserved patch name with qimport -r (issue5033)
Mads Kiilerich <madski@unity3d.com>
parents:
27513
diff
changeset
|
347 2.diff |
db24d6888896
mq: check for reserved patch name with qimport -r (issue5033)
Mads Kiilerich <madski@unity3d.com>
parents:
27513
diff
changeset
|
348 taken__2 |
db24d6888896
mq: check for reserved patch name with qimport -r (issue5033)
Mads Kiilerich <madski@unity3d.com>
parents:
27513
diff
changeset
|
349 |
28388
b1d35e2e1af6
mq: restrict generated patch name to 75 characters (issue5117)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
27919
diff
changeset
|
350 check very long patch name |
b1d35e2e1af6
mq: restrict generated patch name to 75 characters (issue5117)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
27919
diff
changeset
|
351 |
b1d35e2e1af6
mq: restrict generated patch name to 75 characters (issue5117)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
27919
diff
changeset
|
352 $ hg qpop -qa |
b1d35e2e1af6
mq: restrict generated patch name to 75 characters (issue5117)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
27919
diff
changeset
|
353 patch queue now empty |
b1d35e2e1af6
mq: restrict generated patch name to 75 characters (issue5117)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
27919
diff
changeset
|
354 $ echo >> b |
b1d35e2e1af6
mq: restrict generated patch name to 75 characters (issue5117)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
27919
diff
changeset
|
355 $ hg commit -m 'abcdefghi pqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghi pqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghi pqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghi pqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghi pqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghi pqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' |
b1d35e2e1af6
mq: restrict generated patch name to 75 characters (issue5117)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
27919
diff
changeset
|
356 $ hg qimport -r . |
b1d35e2e1af6
mq: restrict generated patch name to 75 characters (issue5117)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
27919
diff
changeset
|
357 $ hg qap |
b1d35e2e1af6
mq: restrict generated patch name to 75 characters (issue5117)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
27919
diff
changeset
|
358 abcdefghi_pqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghi_pqrstuvwxyzabcdefg |