annotate tests/test-mq-qnew.t @ 13955:86b5cc1e8be8 stable

help config: explain that config files do not exist by default Inspired by critique given on StackOverflow where a user writes: I can have a good guess at what "%USERPROFILE%" might signify but none of the files listed in the "hg help config" output exist after running the installer. Previous experience would suggest that missing files mean something somewhere has gone seriously wrong. http://stackoverflow.com/questions/2329023/2351139#2351139
author Martin Geisler <mg@lazybytes.net>
date Mon, 18 Apr 2011 13:57:22 +0200
parents 684a977c2ae0
children 2b1226693c70
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
2 $ catpatch() {
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
3 > cat $1 | sed -e "s/^\(# Parent \).*/\1/"
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
4 > }
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
5 $ echo "[extensions]" >> $HGRCPATH
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
6 $ echo "mq=" >> $HGRCPATH
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
7 $ runtest() {
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
8 > hg init mq
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
9 > cd mq
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
10 >
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
11 > echo a > a
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
12 > hg ci -Ama
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
13 >
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
14 > echo '% qnew should refuse bad patch names'
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
15 > hg qnew series
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
16 > hg qnew status
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
17 > hg qnew guards
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
18 > hg qnew .hgignore
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
19 > hg qnew .mqfoo
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
20 > hg qnew 'foo#bar'
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
21 > hg qnew 'foo:bar'
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
22 >
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
23 > hg qinit -c
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
24 >
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
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
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
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
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
29 > hg qseries
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
30 > hg qpop
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
31 > hg qdelete foo/bar.patch
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
32 >
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
33 > echo '% qnew with uncommitted changes'
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
34 > echo a > somefile
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
35 > hg add somefile
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
36 > hg qnew uncommitted.patch
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
37 > hg st
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
38 > hg qseries
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
39 >
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
40 > echo '% qnew implies add'
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
41 > hg -R .hg/patches st
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
42 >
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
43 > echo '% qnew missing'
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
44 > hg qnew missing.patch missing
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
45 >
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
46 > echo '% qnew -m'
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
47 > hg qnew -m 'foo bar' mtest.patch
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
48 > catpatch .hg/patches/mtest.patch
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
49 >
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
50 > echo '% qnew twice'
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
51 > hg qnew first.patch
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
52 > hg qnew first.patch
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
53 >
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
54 > touch ../first.patch
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
55 > hg qimport ../first.patch
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
56 >
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
57 > echo '% qnew -f from a subdirectory'
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
58 > hg qpop -a
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
59 > mkdir d
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
60 > cd d
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
61 > echo b > b
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
62 > hg ci -Am t
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
63 > echo b >> b
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
64 > hg st
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
65 > hg qnew -g -f p
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
66 > catpatch ../.hg/patches/p
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
67 >
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
68 > echo '% qnew -u with no username configured'
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
69 > HGUSER= hg qnew -u blue red
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
70 > catpatch ../.hg/patches/red
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
71 >
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
72 > echo '% qnew -e -u with no username configured'
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
73 > HGUSER= hg qnew -e -u chartreuse fucsia
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
74 > catpatch ../.hg/patches/fucsia
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
75 >
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
76 > echo '% fail when trying to import a merge'
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
77 > hg init merge
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
78 > cd merge
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
79 > touch a
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
80 > hg ci -Am null
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
81 > echo a >> a
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
82 > hg ci -m a
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
83 > hg up -r 0
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
84 > echo b >> a
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
85 > hg ci -m b
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
86 > hg merge -f 1
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
87 > hg resolve --mark a
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
88 > hg qnew -f merge
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
89 >
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
90 > cd ../../..
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
91 > rm -r mq
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
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
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
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
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
96 $ echo "[mq]" >> $HGRCPATH
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
97 $ echo "plain=true" >> $HGRCPATH
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
98 $ mkdir sandbox
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
99 $ (cd sandbox ; runtest)
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
100 adding a
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
101 % qnew should refuse bad patch names
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
102 abort: "series" cannot be used as the name of a patch
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
103 abort: "status" cannot be used as the name of a patch
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
104 abort: "guards" cannot be used as the name of a patch
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
105 abort: ".hgignore" cannot be used as the name of a patch
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
106 abort: ".mqfoo" cannot be used as the name of a patch
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
107 abort: "foo#bar" cannot be used as the name of a patch
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
108 abort: "foo:bar" cannot be used as the name of a patch
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
109 % qnew with name containing slash
13197
684a977c2ae0 opener: forbid paths ending with directory separator (issue2507)
Jim Hague <jim.hague@acm.org>
parents: 12960
diff changeset
110 abort: path ends in directory separator: foo/
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
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
112 foo/bar.patch
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
113 popping foo/bar.patch
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
114 patch queue now empty
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
115 % qnew with uncommitted changes
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
116 uncommitted.patch
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
117 % qnew implies add
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
118 A .hgignore
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
119 A series
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
120 A uncommitted.patch
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
121 % qnew missing
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
122 abort: missing: No such file or directory
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
123 % qnew -m
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
124 foo bar
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
125
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
126 % qnew twice
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
127 abort: patch "first.patch" already exists
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
128 abort: patch "first.patch" already exists
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
129 % qnew -f from a subdirectory
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
130 popping first.patch
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
131 popping mtest.patch
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
132 popping uncommitted.patch
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
133 patch queue now empty
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
134 adding d/b
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
135 M d/b
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
136 diff --git a/d/b b/d/b
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
137 --- a/d/b
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
138 +++ b/d/b
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
139 @@ -1,1 +1,2 @@
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
140 b
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
141 +b
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
142 % qnew -u with no username configured
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
143 From: blue
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
144
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
145 % qnew -e -u with no username configured
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
146 From: chartreuse
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
147
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
148 % fail when trying to import a merge
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
149 adding a
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
150 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
151 created new head
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
152 merging a
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
153 warning: conflicts during merge.
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
154 merging a failed!
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
155 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
156 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
157 abort: cannot manage merge changesets
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
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
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
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
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
162 $ echo "plain=false" >> $HGRCPATH
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
163 $ mkdir sandbox
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
164 $ (cd sandbox ; runtest)
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
165 adding a
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
166 % qnew should refuse bad patch names
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
167 abort: "series" cannot be used as the name of a patch
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
168 abort: "status" cannot be used as the name of a patch
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
169 abort: "guards" cannot be used as the name of a patch
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
170 abort: ".hgignore" cannot be used as the name of a patch
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
171 abort: ".mqfoo" cannot be used as the name of a patch
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
172 abort: "foo#bar" cannot be used as the name of a patch
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
173 abort: "foo:bar" cannot be used as the name of a patch
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
174 % qnew with name containing slash
13197
684a977c2ae0 opener: forbid paths ending with directory separator (issue2507)
Jim Hague <jim.hague@acm.org>
parents: 12960
diff changeset
175 abort: path ends in directory separator: foo/
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
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
177 foo/bar.patch
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
178 popping foo/bar.patch
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
179 patch queue now empty
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
180 % qnew with uncommitted changes
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
181 uncommitted.patch
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
182 % qnew implies add
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
183 A .hgignore
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
184 A series
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
185 A uncommitted.patch
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
186 % qnew missing
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
187 abort: missing: No such file or directory
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
188 % qnew -m
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
189 # HG changeset patch
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
190 # Parent
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
191 foo bar
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
192
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
193 % qnew twice
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
194 abort: patch "first.patch" already exists
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
195 abort: patch "first.patch" already exists
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
196 % qnew -f from a subdirectory
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
197 popping first.patch
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
198 popping mtest.patch
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
199 popping uncommitted.patch
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
200 patch queue now empty
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
201 adding d/b
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
202 M d/b
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
203 # HG changeset patch
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
204 # Parent
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
205 diff --git a/d/b b/d/b
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
206 --- a/d/b
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
207 +++ b/d/b
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
208 @@ -1,1 +1,2 @@
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
209 b
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
210 +b
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
211 % qnew -u with no username configured
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
212 # HG changeset patch
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
213 # Parent
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
214 # User blue
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
215 % qnew -e -u with no username configured
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
216 # HG changeset patch
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
217 # Parent
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
218 # User chartreuse
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
219 % fail when trying to import a merge
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
220 adding a
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
221 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
222 created new head
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
223 merging a
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
224 warning: conflicts during merge.
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
225 merging a failed!
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
226 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
227 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
228 abort: cannot manage merge changesets
3160698100c6 tests: unify test-mq-qnew
Matt Mackall <mpm@selenic.com>
parents: 11575
diff changeset
229 $ rm -r sandbox