1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-09-19 00:18:50 +02:00
phorge-arcanist/support
epriestley a28e76b7b3 Allow "hg arc-ls-markers" to run under Python 2 or Python 3
Summary:
Ref T13546. See PHI1805. Currently, the "arc-ls-markers" extension doesn't run under Python 3:

  - some stuff needs "b'...'" to mark it as a byte string;
  - "dict.iteritems()" is gone in Python 3, and "mercurial.pycompat" isn't always available;
  - in Python 3, "json" refuses to print byte strings; and
  - the compiler caching behavior in Python 3 has changed.

Try to get these things working in the same way under Python 2 and Python 3.

Test Plan:
Ran this command (with `python` as Python 2, locally):

```
$ python /usr/local/bin/hg --config 'extensions.arc-hg=/Users/epriestley/dev/core/lib/arcanist/support/hg/arc-hg.py' arc-ls-markers --
```

...and this command:

```
$ python3 /usr/local/bin/hg --config 'extensions.arc-hg=/Users/epriestley/dev/core/lib/arcanist/support/hg/arc-hg.py' arc-ls-markers --
```

..and saw the same output in both cases (previously, `python3 ...` fataled in various ways).

Maniphest Tasks: T13546

Differential Revision: https://secure.phabricator.com/D21392
2020-07-06 15:29:35 -07:00
..
arcanoid Port "arc weld" and "arc anoid" to Toolsets workflows, plus minor fixes 2020-02-16 09:16:24 -08:00
hg Allow "hg arc-ls-markers" to run under Python 2 or Python 3 2020-07-06 15:29:35 -07:00
init When "ArcanistRuntime" exits with a nonzero exit code, emit that exit code 2020-02-27 06:17:02 -08:00
lib Merge utility/support changes from "wilds" to "master" 2020-02-13 14:10:09 -08:00
shell Port "arc prompts" from wilds and fix a path issue in shell completion 2020-04-11 10:43:05 -07:00
unit Merge utility/support changes from "wilds" to "master" 2020-02-13 14:10:09 -08:00
xhpast Fix improper XHPAST parsing of namespace grammar like "use x as private;" 2020-04-07 14:35:42 -07:00