[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: mercurial new test packages



On 2018-07-03 14:16:17, Antoine Beaupré wrote:
> On 2018-06-29 03:41:15, Chris Lamb wrote:
> In the meantime, I postponed working on the package as I had to move on
> to other things and there didn't seem to be a concensus on the packaged
> suggested. I'll go back to it now to see if I can fix the test failures
> and hopefully resolve this myself.

The result of that work yesterday led me to dig deeper in the internals
of Mercurial's wire protocol, which is what seems to be at stake here. I
haven't been able to figure out exactly why the problem occurs. The
failing command is here:

@wireprotocommand('listkeys', 'namespace')
def listkeys(repo, proto, namespace):
    d = repo.listkeys(encoding.tolocal(namespace)).items()
    return pushkeymod.encodekeys(d)

And in my tests this is returns as a list of tuples,
deterministically. As I said, I am not able to reproduce the issue
outside of the package build process, so it makes it very difficult to
diagnose.

I had a chat with some folks in the #mercurial IRC channel, and it seems
that the order of output does not matter for that protocol (the
"pushkey encoding") so we can safely ignore the order issues in the test
suite. I have therefore used the following:

  $ "$TESTDIR/get-with-headers.py" $LOCALIP:$HGPORT '?cmd=listkeys' --requestheader 'x-hgarg-1=namespace=phases' | sort

ie. just pipe the output through sort to get consistent results.

I have shared the proposed patchset with durin42 (Augie Fackler) as they
proposed to vet the patches and I'm waiting on the response on that
before the upload.

A.

-- 
For every complex problem, there is an answer that is clear, simple -
and wrong.
                        - H.L. Mencken


Reply to: