Summary:
This removes the dependency of `future` (used by `import past`) which is not
available in our Windows tests.
Reviewed By: farnz
Differential Revision: D19626387
fbshipit-source-id: 2b13f08a9dafe77d1e7f6fc1a3cc48b3581681ca
Summary:
We want to assume almost all paths are unicode and drop support for non-unicode
paths. `os.fsencode` returns bytes that breaks the assumption.
Change fsencode and fsdecode to do nothing so path types remain unicode.
Most use-cases are related to `__file__`, which is already unicode on Python 3.
`posix._checklink` uses it. But it seems making it no-op is okay.
Reviewed By: farnz
Differential Revision: D19613693
fbshipit-source-id: 587dbeef68b23beeaf6bc8861c71ea27b3c512d7
Summary:
On Python 2 we want bytes.encode("utf-8") to be no-op, while on Python 3 we
want it to return a real `str`. This helper function does that.
Reviewed By: sfilipco
Differential Revision: D19613118
fbshipit-source-id: 1f0fc31bf8aee28cc20694da52b10b12dbdd9000
Summary:
See D17098991 for our encoding strategy.
This diff changes the pycompat module to prefer unicode on Python 3.
Reviewed By: farnz
Differential Revision: D19594828
fbshipit-source-id: 3e6db24a2ebaed69deb68908f19e9b462f62c350
Summary:
These call sites are hit during initialization. They all appear to be
small-ish dictionaries so the performance hit of having this iteration be
non-lazy in Python 2 should not matter much.
Reviewed By: farnz
Differential Revision: D19591565
fbshipit-source-id: 324844d64ba63f6e379aab270e453d44a02063e9
Summary:
We won't need it as we're going straight to dual-compatible code instead of
transforming it.
Reviewed By: quark-zju
Differential Revision: D19588132
fbshipit-source-id: 100f19b3e29874de9e8d48692c42cb2d5856bf5a
Summary:
sysplatform is defined as a byte string, and thus a byte string needs to be
provided.
Reviewed By: ikostia
Differential Revision: D18816931
fbshipit-source-id: c653f1319f160bc00d7a1c90b06ff3b4f4d035ad
Summary:
In Python3, unicode doesn't exist, instead of re-inventing the wheel, just use
unicode from the pycompat module.
Reviewed By: ikostia
Differential Revision: D18816929
fbshipit-source-id: d3ec9ae4f2190db64866568b1945b26e05b9c2a5
Summary:
Somehow, pyre isn't able to inline the value of ispy3 and propagate it properly
and thus complains about lots of code paths. Let's inline it everywhere.
Reviewed By: ikostia
Differential Revision: D18816333
fbshipit-source-id: 80f81cb91bef4c6831952f9469401d87040335e2
Summary:
The Mercurial codebase contains over 500 errors, let's ignore them for now, we
can go back to them later to fix them.
Besides the manual change to .pyre_configuration.local, the changes were
generated with:
pyre --output=json check | pyre-upgrade fixme
Reviewed By: singhsrb
Differential Revision: D18803908
fbshipit-source-id: 724db7bd864c0de47a97ef2092bdee9f2cda531f
Summary:
In preparation for merging fb-mercurial sources to the Eden repository,
move everything from the top-level directory into an `eden/scm`
subdirectory.