[PATCH 4 of 6] bundle2: portably grab first byte of part name for letter check
Augie Fackler
raf at durin42.com
Tue Sep 19 16:08:27 UTC 2017
# HG changeset patch
# User Augie Fackler <augie at google.com>
# Date 1505795275 14400
# Tue Sep 19 00:27:55 2017 -0400
# Node ID 8def3a241d2298eb47bebb19f70ec8d4c1341739
# Parent b4cb774af1c9da914c81e8bf42988828f9807b61
bundle2: portably grab first byte of part name for letter check
diff --git a/mercurial/bundle2.py b/mercurial/bundle2.py
--- a/mercurial/bundle2.py
+++ b/mercurial/bundle2.py
@@ -615,7 +615,7 @@ class bundle20(object):
"""add a stream level parameter"""
if not name:
raise ValueError(r'empty parameter name')
- if name[0] not in pycompat.bytestr(string.ascii_letters):
+ if name[0:1] not in pycompat.bytestr(string.ascii_letters):
raise ValueError(r'non letter first character: %s' % name)
self._params.append((name, value))
More information about the Mercurial-devel
mailing list