[PATCH 6 of 6] tests: avoid repr in test-bundle2-format.t

Yuya Nishihara yuya at tcha.org
Wed Sep 20 10:11:38 EDT 2017


On Wed, 20 Sep 2017 07:22:35 +0530, Pulkit Goyal wrote:
> The series looks good to me.
> 
> On Tue, Sep 19, 2017 at 9:38 PM, Augie Fackler <raf at durin42.com> wrote:
> > # HG changeset patch
> > # User Augie Fackler <augie at google.com>
> > # Date 1505758787 14400
> > #      Mon Sep 18 14:19:47 2017 -0400
> > # Node ID eef6eaa44b13c7d8f3802776586d119f1dfb33f7
> > # Parent  df919997998c3a6fa3f3182a84a7d13011a58ed9
> > tests: avoid repr in test-bundle2-format.t

Queued, thanks.

> > @@ -792,14 +792,14 @@ class unbundle20(unpackermixin):
> >                ignored or failing.
> >          """
> >          if not name:
> > -            raise ValueError('empty parameter name')
> > -        if name[0] not in pycompat.bytestr(string.ascii_letters):
> > -            raise ValueError('non letter first character: %r' % name)
> > +            raise ValueError(r'empty parameter name')
> > +        if name[0:1] not in pycompat.bytestr(string.ascii_letters):
> > +            raise ValueError(r'non letter first character: %s' % name)

Nit: actually name[0:1] isn't needed since 'int in bytes' just works, but
this change should be okay.


More information about the Mercurial-devel mailing list