##// END OF EJS Templates
mq: add '.' and '..' to list of forbidden patch names...
Idan Kamara -
r14051:2b122669 stable
parent child Browse files
Show More
@@ -834,7 +834,7 b' class queue(object):'
834 raise util.Abort(_("local changes found"))
834 raise util.Abort(_("local changes found"))
835 return m, a, r, d
835 return m, a, r, d
836
836
837 _reserved = ('series', 'status', 'guards')
837 _reserved = ('series', 'status', 'guards', '.', '..')
838 def check_reserved_name(self, name):
838 def check_reserved_name(self, name):
839 if (name in self._reserved or name.startswith('.hg')
839 if (name in self._reserved or name.startswith('.hg')
840 or name.startswith('.mq') or '#' in name or ':' in name):
840 or name.startswith('.mq') or '#' in name or ':' in name):
@@ -15,6 +15,8 b''
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'
@@ -102,6 +104,8 b' plain headers'
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
@@ -167,6 +171,8 b' hg headers'
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
General Comments 0
You need to be logged in to leave comments. Login now