Mercurial > hg
comparison mercurial/bundle2.py @ 34279:047f2af8ceb0
bundle2: make ValueError messages native strings
author | Augie Fackler <augie@google.com> |
---|---|
date | Mon, 18 Sep 2017 14:03:21 -0400 |
parents | ea7588c11c36 |
children | 2bdd55abd56c |
comparison
equal
deleted
inserted
replaced
34278:ea7588c11c36 | 34279:047f2af8ceb0 |
---|---|
612 | 612 |
613 # methods used to defines the bundle2 content | 613 # methods used to defines the bundle2 content |
614 def addparam(self, name, value=None): | 614 def addparam(self, name, value=None): |
615 """add a stream level parameter""" | 615 """add a stream level parameter""" |
616 if not name: | 616 if not name: |
617 raise ValueError('empty parameter name') | 617 raise ValueError(r'empty parameter name') |
618 if name[0] not in pycompat.bytestr(string.ascii_letters): | 618 if name[0] not in pycompat.bytestr(string.ascii_letters): |
619 raise ValueError('non letter first character: %s' % name) | 619 raise ValueError(r'non letter first character: %s' % name) |
620 self._params.append((name, value)) | 620 self._params.append((name, value)) |
621 | 621 |
622 def addpart(self, part): | 622 def addpart(self, part): |
623 """add a new part to the bundle2 container | 623 """add a new part to the bundle2 container |
624 | 624 |