Mercurial > hg
annotate tests/test-mq-qnew.t @ 13310:deab25946eb2 stable
i18n-de: translated some rebase strings.
author | Arne Babenhauserheide <bab@draketo.de> |
---|---|
date | Fri, 24 Dec 2010 15:10:24 +0100 |
parents | e339346a9b05 |
children | 684a977c2ae0 |
rev | line source |
---|---|
7296
695383442347
mq: put qnew tests into own file, fold in qnew-twice
Brendan Cully <brendan@kublai.com>
parents:
2990
diff
changeset
|
1 |
12466 | 2 $ catpatch() { |
3 > cat $1 | sed -e "s/^\(# Parent \).*/\1/" | |
4 > } | |
5 $ echo "[extensions]" >> $HGRCPATH | |
6 $ echo "mq=" >> $HGRCPATH | |
7 $ runtest() { | |
8 > hg init mq | |
9 > cd mq | |
10 > | |
11 > echo a > a | |
12 > hg ci -Ama | |
13 > | |
14 > echo '% qnew should refuse bad patch names' | |
15 > hg qnew series | |
16 > hg qnew status | |
17 > hg qnew guards | |
18 > hg qnew .hgignore | |
19 > hg qnew .mqfoo | |
20 > hg qnew 'foo#bar' | |
21 > hg qnew 'foo:bar' | |
22 > | |
23 > hg qinit -c | |
24 > | |
25 > echo '% qnew with name containing slash' | |
12878
1634287b6ab1
qnew: give better feedback when doing 'hg qnew foo/' (issue2464)
Martin Geisler <mg@aragost.com>
parents:
12466
diff
changeset
|
26 > hg qnew foo/ |
12466 | 27 > hg qnew foo/bar.patch |
12879
da4a9ed369c8
qnew: distinguish between existing file and directory (issue2464)
Martin Geisler <mg@aragost.com>
parents:
12878
diff
changeset
|
28 > hg qnew foo |
12466 | 29 > hg qseries |
30 > hg qpop | |
31 > hg qdelete foo/bar.patch | |
32 > | |
33 > echo '% qnew with uncommitted changes' | |
34 > echo a > somefile | |
35 > hg add somefile | |
36 > hg qnew uncommitted.patch | |
37 > hg st | |
38 > hg qseries | |
39 > | |
40 > echo '% qnew implies add' | |
41 > hg -R .hg/patches st | |
42 > | |
43 > echo '% qnew missing' | |
44 > hg qnew missing.patch missing | |
45 > | |
46 > echo '% qnew -m' | |
47 > hg qnew -m 'foo bar' mtest.patch | |
48 > catpatch .hg/patches/mtest.patch | |
49 > | |
50 > echo '% qnew twice' | |
51 > hg qnew first.patch | |
52 > hg qnew first.patch | |
53 > | |
54 > touch ../first.patch | |
55 > hg qimport ../first.patch | |
56 > | |
57 > echo '% qnew -f from a subdirectory' | |
58 > hg qpop -a | |
59 > mkdir d | |
60 > cd d | |
61 > echo b > b | |
62 > hg ci -Am t | |
63 > echo b >> b | |
64 > hg st | |
65 > hg qnew -g -f p | |
66 > catpatch ../.hg/patches/p | |
67 > | |
68 > echo '% qnew -u with no username configured' | |
69 > HGUSER= hg qnew -u blue red | |
70 > catpatch ../.hg/patches/red | |
71 > | |
72 > echo '% qnew -e -u with no username configured' | |
73 > HGUSER= hg qnew -e -u chartreuse fucsia | |
74 > catpatch ../.hg/patches/fucsia | |
75 > | |
76 > echo '% fail when trying to import a merge' | |
77 > hg init merge | |
78 > cd merge | |
79 > touch a | |
80 > hg ci -Am null | |
81 > echo a >> a | |
82 > hg ci -m a | |
83 > hg up -r 0 | |
84 > echo b >> a | |
85 > hg ci -m b | |
86 > hg merge -f 1 | |
87 > hg resolve --mark a | |
88 > hg qnew -f merge | |
89 > | |
90 > cd ../../.. | |
91 > rm -r mq | |
92 > } | |
10397
8cb81d75730c
mq: add parent node IDs to MQ patches on qrefresh/qnew
Steve Losh <steve@stevelosh.com>
parents:
10372
diff
changeset
|
93 |
12466 | 94 plain headers |
7296
695383442347
mq: put qnew tests into own file, fold in qnew-twice
Brendan Cully <brendan@kublai.com>
parents:
2990
diff
changeset
|
95 |
12466 | 96 $ echo "[mq]" >> $HGRCPATH |
97 $ echo "plain=true" >> $HGRCPATH | |
98 $ mkdir sandbox | |
99 $ (cd sandbox ; runtest) | |
100 adding a | |
101 % qnew should refuse bad patch names | |
102 abort: "series" cannot be used as the name of a patch | |
103 abort: "status" cannot be used as the name of a patch | |
104 abort: "guards" cannot be used as the name of a patch | |
105 abort: ".hgignore" cannot be used as the name of a patch | |
106 abort: ".mqfoo" cannot be used as the name of a patch | |
107 abort: "foo#bar" cannot be used as the name of a patch | |
108 abort: "foo:bar" cannot be used as the name of a patch | |
109 % qnew with name containing slash | |
12960
e339346a9b05
test-mq-qnew: handle Mac OS X error strings.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
12879
diff
changeset
|
110 abort: cannot write patch "foo/": (Is a|No such file or) directory (re) |
12879
da4a9ed369c8
qnew: distinguish between existing file and directory (issue2464)
Martin Geisler <mg@aragost.com>
parents:
12878
diff
changeset
|
111 abort: "foo" already exists as a directory |
12466 | 112 foo/bar.patch |
113 popping foo/bar.patch | |
114 patch queue now empty | |
115 % qnew with uncommitted changes | |
116 uncommitted.patch | |
117 % qnew implies add | |
118 A .hgignore | |
119 A series | |
120 A uncommitted.patch | |
121 % qnew missing | |
122 abort: missing: No such file or directory | |
123 % qnew -m | |
124 foo bar | |
125 | |
126 % qnew twice | |
127 abort: patch "first.patch" already exists | |
128 abort: patch "first.patch" already exists | |
129 % qnew -f from a subdirectory | |
130 popping first.patch | |
131 popping mtest.patch | |
132 popping uncommitted.patch | |
133 patch queue now empty | |
134 adding d/b | |
135 M d/b | |
136 diff --git a/d/b b/d/b | |
137 --- a/d/b | |
138 +++ b/d/b | |
139 @@ -1,1 +1,2 @@ | |
140 b | |
141 +b | |
142 % qnew -u with no username configured | |
143 From: blue | |
144 | |
145 % qnew -e -u with no username configured | |
146 From: chartreuse | |
147 | |
148 % fail when trying to import a merge | |
149 adding a | |
150 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
151 created new head | |
152 merging a | |
153 warning: conflicts during merge. | |
154 merging a failed! | |
155 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
156 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
157 abort: cannot manage merge changesets | |
158 $ rm -r sandbox | |
2714
85070b784896
Fix test-mq-qnew-twice exit code and output.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
2711
diff
changeset
|
159 |
12466 | 160 hg headers |
11575
a5903e612f07
mq: evaluate --user before invoking editor with -e (issue2289)
Brendan Cully <brendan@kublai.com>
parents:
11513
diff
changeset
|
161 |
12466 | 162 $ echo "plain=false" >> $HGRCPATH |
163 $ mkdir sandbox | |
164 $ (cd sandbox ; runtest) | |
165 adding a | |
166 % qnew should refuse bad patch names | |
167 abort: "series" cannot be used as the name of a patch | |
168 abort: "status" cannot be used as the name of a patch | |
169 abort: "guards" cannot be used as the name of a patch | |
170 abort: ".hgignore" cannot be used as the name of a patch | |
171 abort: ".mqfoo" cannot be used as the name of a patch | |
172 abort: "foo#bar" cannot be used as the name of a patch | |
173 abort: "foo:bar" cannot be used as the name of a patch | |
174 % qnew with name containing slash | |
12960
e339346a9b05
test-mq-qnew: handle Mac OS X error strings.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
12879
diff
changeset
|
175 abort: cannot write patch "foo/": (Is a|No such file or) directory (re) |
12879
da4a9ed369c8
qnew: distinguish between existing file and directory (issue2464)
Martin Geisler <mg@aragost.com>
parents:
12878
diff
changeset
|
176 abort: "foo" already exists as a directory |
12466 | 177 foo/bar.patch |
178 popping foo/bar.patch | |
179 patch queue now empty | |
180 % qnew with uncommitted changes | |
181 uncommitted.patch | |
182 % qnew implies add | |
183 A .hgignore | |
184 A series | |
185 A uncommitted.patch | |
186 % qnew missing | |
187 abort: missing: No such file or directory | |
188 % qnew -m | |
189 # HG changeset patch | |
190 # Parent | |
191 foo bar | |
192 | |
193 % qnew twice | |
194 abort: patch "first.patch" already exists | |
195 abort: patch "first.patch" already exists | |
196 % qnew -f from a subdirectory | |
197 popping first.patch | |
198 popping mtest.patch | |
199 popping uncommitted.patch | |
200 patch queue now empty | |
201 adding d/b | |
202 M d/b | |
203 # HG changeset patch | |
204 # Parent | |
205 diff --git a/d/b b/d/b | |
206 --- a/d/b | |
207 +++ b/d/b | |
208 @@ -1,1 +1,2 @@ | |
209 b | |
210 +b | |
211 % qnew -u with no username configured | |
212 # HG changeset patch | |
213 # Parent | |
214 # User blue | |
215 % qnew -e -u with no username configured | |
216 # HG changeset patch | |
217 # Parent | |
218 # User chartreuse | |
219 % fail when trying to import a merge | |
220 adding a | |
221 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
222 created new head | |
223 merging a | |
224 warning: conflicts during merge. | |
225 merging a failed! | |
226 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
227 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
228 abort: cannot manage merge changesets | |
229 $ rm -r sandbox |