##// END OF EJS Templates
mq: ban \r and \n in patch names (issue4711)...
Augie Fackler -
r25454:b5a8bc09 default
parent child Browse files
Show More
@@ -1102,7 +1102,7 b' class queue(object):'
1102 if name.startswith(prefix):
1102 if name.startswith(prefix):
1103 raise util.Abort(_('patch name cannot begin with "%s"')
1103 raise util.Abort(_('patch name cannot begin with "%s"')
1104 % prefix)
1104 % prefix)
1105 for c in ('#', ':'):
1105 for c in ('#', ':', '\r', '\n'):
1106 if c in name:
1106 if c in name:
1107 raise util.Abort(_('%r cannot be used in the name of a patch')
1107 raise util.Abort(_('%r cannot be used in the name of a patch')
1108 % c)
1108 % c)
@@ -21,6 +21,7 b''
21 > hg qnew .mqfoo
21 > hg qnew .mqfoo
22 > hg qnew 'foo#bar'
22 > hg qnew 'foo#bar'
23 > hg qnew 'foo:bar'
23 > hg qnew 'foo:bar'
24 > hg qnew "`echo foo; echo bar`"
24 >
25 >
25 > hg qinit -c
26 > hg qinit -c
26 >
27 >
@@ -110,6 +111,7 b' plain headers'
110 abort: patch name cannot begin with ".mq"
111 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
112 abort: ':' cannot be used in the name of a patch
113 abort: ':' cannot be used in the name of a patch
114 abort: '\n' cannot be used in the name of a patch
113 % qnew with name containing slash
115 % qnew with name containing slash
114 abort: path ends in directory separator: foo/ (glob)
116 abort: path ends in directory separator: foo/ (glob)
115 abort: "foo" already exists as a directory
117 abort: "foo" already exists as a directory
@@ -178,6 +180,7 b' hg headers'
178 abort: patch name cannot begin with ".mq"
180 abort: patch name cannot begin with ".mq"
179 abort: '#' cannot be used in the name of a patch
181 abort: '#' cannot be used in the name of a patch
180 abort: ':' cannot be used in the name of a patch
182 abort: ':' cannot be used in the name of a patch
183 abort: '\n' cannot be used in the name of a patch
181 % qnew with name containing slash
184 % qnew with name containing slash
182 abort: path ends in directory separator: foo/ (glob)
185 abort: path ends in directory separator: foo/ (glob)
183 abort: "foo" already exists as a directory
186 abort: "foo" already exists as a directory
General Comments 0
You need to be logged in to leave comments. Login now