Show More
@@ -854,10 +854,18 b' class queue(object):' | |||
|
854 | 854 | |
|
855 | 855 | _reserved = ('series', 'status', 'guards', '.', '..') |
|
856 | 856 | def check_reserved_name(self, name): |
|
857 |
if |
|
|
858 | or name.startswith('.mq') or '#' in name or ':' in name): | |
|
857 | if name in self._reserved: | |
|
859 | 858 | raise util.Abort(_('"%s" cannot be used as the name of a patch') |
|
860 | 859 | % name) |
|
860 | for prefix in ('.hg', '.mq'): | |
|
861 | if name.startswith(prefix): | |
|
862 | raise util.Abort(_('patch name cannot begin with "%s"') | |
|
863 | % prefix) | |
|
864 | for c in ('#', ':'): | |
|
865 | if c in name: | |
|
866 | raise util.Abort(_('"%s" cannot be used in the name of a patch') | |
|
867 | % c) | |
|
868 | ||
|
861 | 869 | |
|
862 | 870 | def new(self, repo, patchfn, *pats, **opts): |
|
863 | 871 | """options: |
@@ -106,10 +106,10 b' plain headers' | |||
|
106 | 106 | abort: "guards" cannot be used as the name of a patch |
|
107 | 107 | abort: "." cannot be used as the name of a patch |
|
108 | 108 | abort: ".." cannot be used as the name of a patch |
|
109 | abort: ".hgignore" cannot be used as the name of a patch | |
|
110 | abort: ".mqfoo" cannot be used as the name of a patch | |
|
111 |
abort: " |
|
|
112 |
abort: " |
|
|
109 | abort: patch name cannot begin with ".hg" | |
|
110 | abort: patch name cannot begin with ".mq" | |
|
111 | abort: "#" cannot be used in the name of a patch | |
|
112 | abort: ":" cannot be used in the name of a patch | |
|
113 | 113 | % qnew with name containing slash |
|
114 | 114 | abort: path ends in directory separator: foo/ |
|
115 | 115 | abort: "foo" already exists as a directory |
@@ -173,10 +173,10 b' hg headers' | |||
|
173 | 173 | abort: "guards" cannot be used as the name of a patch |
|
174 | 174 | abort: "." cannot be used as the name of a patch |
|
175 | 175 | abort: ".." cannot be used as the name of a patch |
|
176 | abort: ".hgignore" cannot be used as the name of a patch | |
|
177 | abort: ".mqfoo" cannot be used as the name of a patch | |
|
178 |
abort: " |
|
|
179 |
abort: " |
|
|
176 | abort: patch name cannot begin with ".hg" | |
|
177 | abort: patch name cannot begin with ".mq" | |
|
178 | abort: "#" cannot be used in the name of a patch | |
|
179 | abort: ":" cannot be used in the name of a patch | |
|
180 | 180 | % qnew with name containing slash |
|
181 | 181 | abort: path ends in directory separator: foo/ |
|
182 | 182 | abort: "foo" already exists as a directory |
General Comments 0
You need to be logged in to leave comments.
Login now