annotate tests/test-mq-qimport.t @ 12587:e3247ceaca5e

tests: removed test names in tests The name of the test files is replaced with a glob * expression, thereby the tests does not depend on the filename of the file they are in.
author Erik Zielke <ez@aragost.com>
date Thu, 30 Sep 2010 09:49:40 +0200
parents 3177e3a7b14f
children bb35840e965c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6027
cee68264ed92 mq: qimport must read patches in binary mode
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
1
12464
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
2 $ cat > writelines.py <<EOF
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
3 > import sys
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 >
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
8 > f = file(path, 'wb')
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
9 > for i in xrange(len(args)/2):
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
10 > count, s = args[2*i:2*i+2]
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
11 > count = int(count)
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
12 > s = s.decode('string_escape')
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
13 > f.write(s*count)
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
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
17 $ echo "[extensions]" >> $HGRCPATH
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
18 $ echo "mq=" >> $HGRCPATH
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
19 $ echo "[diff]" >> $HGRCPATH
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
20 $ echo "git=1" >> $HGRCPATH
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
21 $ hg init repo
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
22 $ cd repo
6027
cee68264ed92 mq: qimport must read patches in binary mode
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
23
12464
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
24 qimport non-existing-file
6027
cee68264ed92 mq: qimport must read patches in binary mode
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
25
12464
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
26 $ hg qimport non-existing-file
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
27 abort: unable to read file non-existing-file
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
28 [255]
6940
05ec27530d04 qimport: report filename in case of IOError
Martin Geisler <mg@daimi.au.dk>
parents: 6027
diff changeset
29
12464
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
30 import email
6940
05ec27530d04 qimport: report filename in case of IOError
Martin Geisler <mg@daimi.au.dk>
parents: 6027
diff changeset
31
12464
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
32 $ hg qimport --push -n email - <<EOF
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
33 > From: Username in email <test@example.net>
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
34 > Subject: [PATCH] Message in email
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
35 > Date: Fri, 02 Jan 1970 00:00:00 +0000
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
36 >
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
37 > Text before patch.
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
38 >
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
39 > # HG changeset patch
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
40 > # User Username in patch <test@example.net>
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
41 > # Date 0 0
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
42 > # Node ID 1a706973a7d84cb549823634a821d9bdf21c6220
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
43 > # Parent 0000000000000000000000000000000000000000
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
44 > First line of commit message.
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
45 >
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
46 > More text in commit message.
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
47 > --- confuse the diff detection
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
48 >
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
49 > diff --git a/x b/x
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
50 > new file mode 100644
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
51 > --- /dev/null
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
52 > +++ b/x
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
53 > @@ -0,0 +1,1 @@
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
54 > +new file
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
55 > Text after patch.
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
56 >
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
57 > EOF
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
58 adding email to series file
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
59 applying email
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
60 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
61
12464
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
62 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
63
12464
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
64 $ hg tip -v
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
65 changeset: 0:1a706973a7d8
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
66 tag: email
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
67 tag: qbase
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
68 tag: qtip
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
69 tag: tip
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
70 user: Username in patch <test@example.net>
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
71 date: Thu Jan 01 00:00:00 1970 +0000
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
72 files: x
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
73 description:
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
74 First line of commit message.
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
75
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
76 More text in commit message.
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
77
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
78
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
79 $ hg qpop
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
80 popping email
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
81 patch queue now empty
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
82 $ 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
83
12464
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
84 import URL
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
85
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
86 $ echo foo >> foo
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
87 $ hg add foo
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
88 $ hg diff > $HGTMP/url.diff
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
89 $ hg revert --no-backup foo
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
90 $ 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
91
12464
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
92 Under unix: file:///foobar/blah
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
93 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
94
12464
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
95 $ patchurl=`echo "$HGTMP"/url.diff | tr '\\\\' /`
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
96 $ expr "$patchurl" : "\/" > /dev/null || patchurl="/$patchurl"
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
97 $ hg qimport file://"$patchurl"
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
98 adding url.diff to series file
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
99 $ hg qun
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
100 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
101
12464
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
102 import patch that already exists
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
103
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
104 $ echo foo2 >> foo
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
105 $ hg add foo
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
106 $ hg diff > ../url.diff
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
107 $ hg revert --no-backup foo
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
108 $ rm foo
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
109 $ hg qimport ../url.diff
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
110 abort: patch "url.diff" already exists
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
111 [255]
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
112 $ hg qpush
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
113 applying url.diff
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
114 now at: url.diff
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
115 $ cat foo
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
116 foo
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
117 $ hg qpop
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
118 popping url.diff
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
119 patch queue now empty
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 qimport -f
7158
d1d011accf94 mq: let qimport read patches from URLs
Brendan Cully <brendan@kublai.com>
parents: 6940
diff changeset
122
12464
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
123 $ hg qimport -f ../url.diff
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
124 adding url.diff to series file
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
125 $ hg qpush
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
126 applying url.diff
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
127 now at: url.diff
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
128 $ cat foo
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
129 foo2
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
130 $ hg qpop
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
131 popping url.diff
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
132 patch queue now empty
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
133
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
134 build diff with CRLF
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
135
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
136 $ python ../writelines.py b 5 'a\n' 5 'a\r\n'
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
137 $ hg ci -Am addb
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
138 adding b
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
139 $ python ../writelines.py b 2 'a\n' 10 'b\n' 2 'a\r\n'
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
140 $ hg diff > b.diff
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
141 $ hg up -C
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
142 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
143
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
144 qimport CRLF diff
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
145
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
146 $ hg qimport b.diff
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
147 adding b.diff to series file
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
148 $ hg qpush
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
149 applying b.diff
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
150 now at: b.diff
7160
1b7b21b634f2 mq: make qimport -f work properly. Closes issue1255.
Brendan Cully <brendan@kublai.com>
parents: 7158
diff changeset
151
12464
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
152 try to import --push
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
153
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
154 $ echo another >> b
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
155 $ hg diff > another.diff
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
156 $ hg up -C
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
157 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
158 $ hg qimport --push another.diff
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
159 adding another.diff to series file
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
160 applying another.diff
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
161 now at: another.diff
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
162 $ hg qfin -a
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
163 patch b.diff finalized without changeset message
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
164 patch another.diff finalized without changeset message
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
165 $ hg qimport -rtip -P
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
166 $ hg qpop -a
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
167 popping 2.diff
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
168 patch queue now empty
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
169 $ hg qdel -k 2.diff
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
170
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
171 qimport -e
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
172
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
173 $ hg qimport -e 2.diff
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
174 adding 2.diff to series file
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
175 $ hg qdel -k 2.diff
6027
cee68264ed92 mq: qimport must read patches in binary mode
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
176
12464
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
177 qimport -e --name newname oldexisitingpatch
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
178
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
179 $ hg qimport -e --name this-name-is-better 2.diff
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
180 renaming 2.diff to this-name-is-better
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
181 adding this-name-is-better to series file
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
182 $ hg qser
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
183 this-name-is-better
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
184 url.diff
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
185
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
186 qimport -e --name without --force
11699
da0b9109186d mq: support "qimport --existing --name renametothis thatexistingpatch"
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10775
diff changeset
187
12464
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
188 $ 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
189 $ 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
190 abort: patch "this-name-is-better" already exists
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
191 [255]
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
192 $ hg qser
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
193 this-name-is-better
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
194 url.diff
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
195
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
196 qimport -e --name with --force
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
197
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
198 $ 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
199 renaming 3.diff to this-name-is-better
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
200 adding this-name-is-better to series file
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
201 $ hg qser
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
202 this-name-is-better
3177e3a7b14f tests: unify test-mq-qimport
Matt Mackall <mpm@selenic.com>
parents: 11701
diff changeset
203 url.diff