[PATCH hglib] hglib: Move string literals in the test code to util.b() (issue4520)

Brett Cannon brett at python.org
Wed Mar 11 10:15:00 CDT 2015


On Tue, Mar 10, 2015 at 6:20 PM Matt Mackall <mpm at selenic.com> wrote:

> On Mon, 2015-03-09 at 18:26 -0400, Brett Cannon wrote:
> > # HG changeset patch
> > # User Brett Cannon <brett at python.org>
> > # Date 1425939985 14400
> > #      Mon Mar 09 18:26:25 2015 -0400
> > # Node ID 4c0f97d377a0d193743f1b43481dadefc1880cd0
> > # Parent  fe74d55995393f6a72abce49da8d43e5fe37cdcd
> > hglib: Move string literals in the test code to util.b() (issue4520)
>
> Various things spotted by our automated checks (check-code and
> check-commit in the hg repo):
>
> - please don't uppercase "Move" in summary above
>
> > +        rev0, node0 = self.client.commit(b('first'), addremove=True,
> > +                                         date=now.isoformat('
> ').encode('latin-1'))
>
> - this and a couple other lines are too long
>
> > -        print rev0, node0
> > +        print(rev0, node0)
>
> - not portable
>

Not portable how? It works in every version of Python because Python 2
prints a tuple while Python 3 prints two space-separate values. Something
will have to be chosen in this instance for final Python 3 support since
it's a syntax error otherwise.


> - and now that my eyes are drawn to it, not related to $SUMMARY
>
>
Yes, that was a oversight on my part. Teasing apart my work in another repo
and reconstructing it is tough. =) But since this was the last major patch
little slip-ups like this shouldn't happen again.


> I've fixed these up, but you might want to acquaint yourself with these
> scripts.
>

Sure thing. I'll run them from now on.

-Brett


>
> --
> Mathematics is the supreme nostalgia of our time.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20150311/0945258c/attachment.html>


More information about the Mercurial-devel mailing list