mercurial/bundle2.py
changeset 23916 a3f7c781786b
parent 23868 405eacbecc52
child 24026 3daef83a1873
--- a/mercurial/bundle2.py	Sat Jan 17 17:59:30 2015 -0800
+++ b/mercurial/bundle2.py	Sat Jan 17 18:08:47 2015 -0800
@@ -85,7 +85,7 @@
 
     :typesize: (one byte)
 
-    :parttype: alphanumerical part name (restricted to ^a-zA-Z0-9_:-])
+    :parttype: alphanumerical part name (restricted to [a-zA-Z0-9_:-]*)
 
     :partid: A 32bits integer (unique in the bundle) that can be used to refer
              to this part.
@@ -176,7 +176,7 @@
 
 def validateparttype(parttype):
     """raise ValueError if a parttype contains invalid character"""
-    if _parttypeforbidden.match(parttype):
+    if _parttypeforbidden.search(parttype):
         raise ValueError(parttype)
 
 def _makefpartparamsizes(nbparams):