Mercurial > hg
comparison tests/test-mq-qnew.t @ 14051:2b1226693c70 stable
mq: add '.' and '..' to list of forbidden patch names
When an empty string is being passed to normname
it would return '.' causing checkfile() to always
return that a patch with that name exists.
author | Idan Kamara <idankk86@gmail.com> |
---|---|
date | Fri, 29 Apr 2011 22:21:13 +0300 |
parents | 684a977c2ae0 |
children | 3c616f512a5b |
comparison
equal
deleted
inserted
replaced
14050:9e8a9d45945c | 14051:2b1226693c70 |
---|---|
13 > | 13 > |
14 > echo '% qnew should refuse bad patch names' | 14 > echo '% qnew should refuse bad patch names' |
15 > hg qnew series | 15 > hg qnew series |
16 > hg qnew status | 16 > hg qnew status |
17 > hg qnew guards | 17 > hg qnew guards |
18 > hg qnew . | |
19 > hg qnew .. | |
18 > hg qnew .hgignore | 20 > hg qnew .hgignore |
19 > hg qnew .mqfoo | 21 > hg qnew .mqfoo |
20 > hg qnew 'foo#bar' | 22 > hg qnew 'foo#bar' |
21 > hg qnew 'foo:bar' | 23 > hg qnew 'foo:bar' |
22 > | 24 > |
100 adding a | 102 adding a |
101 % qnew should refuse bad patch names | 103 % qnew should refuse bad patch names |
102 abort: "series" cannot be used as the name of a patch | 104 abort: "series" cannot be used as the name of a patch |
103 abort: "status" cannot be used as the name of a patch | 105 abort: "status" cannot be used as the name of a patch |
104 abort: "guards" cannot be used as the name of a patch | 106 abort: "guards" cannot be used as the name of a patch |
107 abort: "." cannot be used as the name of a patch | |
108 abort: ".." cannot be used as the name of a patch | |
105 abort: ".hgignore" cannot be used as the name of a patch | 109 abort: ".hgignore" cannot be used as the name of a patch |
106 abort: ".mqfoo" cannot be used as the name of a patch | 110 abort: ".mqfoo" cannot be used as the name of a patch |
107 abort: "foo#bar" cannot be used as the name of a patch | 111 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 | 112 abort: "foo:bar" cannot be used as the name of a patch |
109 % qnew with name containing slash | 113 % qnew with name containing slash |
165 adding a | 169 adding a |
166 % qnew should refuse bad patch names | 170 % qnew should refuse bad patch names |
167 abort: "series" cannot be used as the name of a patch | 171 abort: "series" cannot be used as the name of a patch |
168 abort: "status" cannot be used as the name of a patch | 172 abort: "status" cannot be used as the name of a patch |
169 abort: "guards" cannot be used as the name of a patch | 173 abort: "guards" cannot be used as the name of a patch |
174 abort: "." cannot be used as the name of a patch | |
175 abort: ".." cannot be used as the name of a patch | |
170 abort: ".hgignore" cannot be used as the name of a patch | 176 abort: ".hgignore" cannot be used as the name of a patch |
171 abort: ".mqfoo" cannot be used as the name of a patch | 177 abort: ".mqfoo" cannot be used as the name of a patch |
172 abort: "foo#bar" cannot be used as the name of a patch | 178 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 | 179 abort: "foo:bar" cannot be used as the name of a patch |
174 % qnew with name containing slash | 180 % qnew with name containing slash |