[PATCH 10 of 11] py3: conditionalize some LFS test output

Matt Harbison mharbison72 at gmail.com
Mon Jan 28 00:33:21 EST 2019


On Mon, 28 Jan 2019 00:20:56 -0500, Matt Harbison <mharbison72 at gmail.com>  
wrote:

> # HG changeset patch
> # User Matt Harbison <matt_harbison at yahoo.com>
> # Date 1548640698 18000
> #      Sun Jan 27 20:58:18 2019 -0500
> # Node ID 9ee17fc21ed1a6ebf0c7180561f004f98a72c248
> # Parent  fa54bec6b7c74114cfe1d59abdf429fff5c3dd22
> py3: conditionalize some LFS test output
>
> I'm not sure why the one stackframe is py2 only, but that seems  
> harmless.  The
> remaining failure is LfsCorruptionError printing the fully qualified  
> name, as
> well as b'' around its message.

I think the fire is out here, but there are a couple more failures in  
addition to this.

Most concerning is this message in test-lfs-test-server#git-server:

   31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b:  
{"message":"invalid byte in chunk length"}

It's near the top, and I suspect is the cause of the subsequent extensive  
failures, because the same test to the hg server code passes.  So the  
client seems to be sending something bad, and the hg server isn't  
detecting this.

Second is this:

   --- c:/Users/Matt/hg/tests/test-lfs-serve.t
   +++ c:/Users/Matt/hg/tests/test-lfs-serve.t#lfsremote-on.err
   @@ -665,7 +665,7 @@
    #if lfsremote-on
      $ cat $TESTTMP/errors.log | grep '^[A-Z]'
      Traceback (most recent call last):
   -  ValueError: no common changegroup version
   +  ValueError: b'no common changegroup version'
    #else
      $ cat $TESTTMP/errors.log
    #endif

Some ValueErrors have translated strings, but most don't.  Very few have  
r'' prefixes.  So IDK if it's a reasonable plan to add a subclass of  
ValueError to the errors module that would take bytes in the constructor  
and translate to str for the native class.  But it seems like a general  
issue beyond LFS, so I'm punting on that.


More information about the Mercurial-devel mailing list