This is an archive of the discontinued Mercurial Phabricator instance.

hghave: add a check for the `xz` compression utility
ClosedPublic

Authored by mharbison72 on Nov 13 2019, 9:44 AM.

Details

Summary

This isn't install by default on Mac, which causes a test failure. The logic
for avoiding the command is a little goofy, but nested #if isn't supported,
and it still seems worth running the hg command to see if anything explodes.

With this, the py3 tests run (almost) cleanly on 10.14.6:

  1. Ran 835 tests, 58 skipped, 1 failed.

Alas, the mac-packaging test is skipped because it's slow. The failure here is
in test-releasenotes-merging.t, complaining about not being able to import the
fuzzywuzzy module. I have it installed on py3 (thus the test isn't skipped),
but not on py2. So there must be some unintended cross pollination here when
running hg commands.

Diff Detail

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

Event Timeline

mharbison72 created this revision.Nov 13 2019, 9:44 AM
indygreg accepted this revision.Nov 18 2019, 10:41 PM
indygreg added a subscriber: indygreg.

Regarding nested conditionals, you could do something like #if py3 xz. But then we wouldn't have test coverage of Mercurial itself generating lzma, which is built in to Python 3. So this suggestion is not appropriate here: the patch as authored is great!

This revision is now accepted and ready to land.Nov 18 2019, 10:41 PM
This revision was automatically updated to reflect the committed changes.