This is an archive of the discontinued Mercurial Phabricator instance.

phabricator: update hgmatcher to cope with the new data format

Authored by Kwan on Oct 10 2019, 5:53 PM.



The new conduit format can't be matched by the existing matcher since it shifts
all the data into an urlencoded string of JSON, the order of which isn't stable
between runs. Instead detect JSON values of params and load them into python
dicts, which python will then naturally deep-equal compare.

Diff Detail

rHG Mercurial
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Kwan created this revision.Oct 10 2019, 5:53 PM
Kwan updated this revision to Diff 17085.Oct 11 2019, 1:55 PM

Fix some test-check-code issues, and one test-check-pyflakes unused local.

Kwan updated this revision to Diff 17105.Oct 12 2019, 9:45 AM

I'd missed out the attrs key conversion needed on py3.

Kwan added inline comments.Oct 12 2019, 10:02 AM

These will need converting to unicode first for py3.5 (I keep forgetting about loads only accepting bytes from 3.6 onwards).

durin42 added inline comments.

That might be a nudge towards dropping 3.5 support. We've already got problems on 3.5. :(

This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.