Commit Graph

19 Commits

Author SHA1 Message Date
Xavier Deguillard
a29d465ee8 fs: fix license header
Summary:
With Facebook having been renamed Meta Platforms, we need to change the license
headers.

Reviewed By: fanzeyi

Differential Revision: D33407812

fbshipit-source-id: b11bfbbf13a48873f0cea75f212cc7b07a68fb2e
2022-01-04 15:00:07 -08:00
John Reese
9fd86a4fae apply upgraded black 21.4b2 formatting to fbsource
Summary:
This applies the formatting changes from black v21.4b2 to all covered
projects in fbsource. Most changes are to single line docstrings, as black
will now remove leading and trailing whitespace to match PEP8. Any other
formatting changes are likely due to files that landed without formatting,
or files that previously triggered errors in black.

Any changes to code should be AST identical. Any test failures are likely
due to bad tests, or testing against the output of pyfmt.

Reviewed By: thatch

Differential Revision: D28204910

fbshipit-source-id: 804725bcd14f763e90c5ddff1d0418117c15809a
2021-05-04 22:16:51 -07:00
John Reese
737849c9dd apply black 20.8b1 formatting update
Summary:
allow-large-files

black_any_style

Reviewed By: zertosh

Differential Revision: D24325133

fbshipit-source-id: b4afe80d1e8b2bc993f4b8e3822c02964df47462
2020-10-14 20:21:52 -07:00
Ratnadeep Joshi
9ce47b3031 Move eden.cli namespace to eden.fs.cli
Summary: [edenfs] Move eden.cli namespace to eden.fs.cli

Reviewed By: simpkins

Differential Revision: D20520952

fbshipit-source-id: 182793867404dcb0753363282640f8fd4d2ff496
2020-03-25 11:46:56 -07:00
Ratnadeep Joshi
17fd33424d Move py/ directory from eden/ to eden/fs
Summary: [edenfs] Move py/ directory from eden/ to eden/fs

Reviewed By: simpkins

Differential Revision: D20479925

fbshipit-source-id: 36abf7fe208c283f01c9bf415e2fcb1a8f4bdbae
2020-03-24 11:45:37 -07:00
Zeyi (Rice) Fan
6d31b0b0dc eden: use the zipapp_main instead of main so return code gets correctly returned
Summary:
`edenfsctl` on macOS is not returning the status code correctly when build with `make-client.py`.

We should be using [`zipapp_main`](https://fburl.com/diffusion/3eot1k7a) that uses `sys.exit` to propagate the exit code from [`main`](https://fburl.com/diffusion/k7t8vqmx).

Reviewed By: simpkins

Differential Revision: D18772986

fbshipit-source-id: 1714be9665b0779d30e5c86fb1e498466fee56f9
2019-12-03 09:20:42 -08:00
Adam Simpkins
c6071efda3 fix make-client.py to find fb303_core.thrift properly
Summary:
D17005381 changed where `fb303_core.thrift` gets installed.  The
`make-client.py` script needs to be updated to take the new location into
account.

I have some diffs in progress that will enable building the `edenfsctl` with
CMake, which will then remove the need for `make-client.py` entirely.  (The
file move done in D17005381 was part of the work to enable building
`edenfsctl` with CMake.)

Reviewed By: wez

Differential Revision: D17128434

fbshipit-source-id: 22042ba9ad51b1c0d9d869370e549bcf0caed0dd
2019-08-30 15:48:38 -07:00
Puneet Kaushik
0f54d0eb14 Fixing OSS Eden cli to use the updated fb303_core
Summary: The Windows and Mac cli build scripts were not building the new fb303 thrift file. Also updated few cli code to use the new fb303 module.

Reviewed By: chadaustin

Differential Revision: D16508590

fbshipit-source-id: 386fa1bf77124d258ffb00edf56c9c827f32e795
2019-07-26 11:46:11 -07:00
Chad Austin
fe64ec3874 use fb303 repo in open source build
Summary: Add a dependency from the eden open source build to the fb303 open source build and switch EdenServiceHandler to BaseService.

Reviewed By: simpkins

Differential Revision: D15528156

fbshipit-source-id: 2ca5c31dd9fcc9bac43fd399b27f33b6f2c5ebfc
2019-07-24 21:07:04 -07:00
Adam Simpkins
6b86111798 simplify arguments to make-client.py
Summary:
Update `make-client.py` so that it does not require the python interpreter to
be explicitly specified on the command line.  It now uses `sys.executable`
as the default python interpreter if one was not specified on the command
line.

Also add a `--output` flag to control the output file path.

Reviewed By: pkaush

Differential Revision: D16388625

fbshipit-source-id: 6587acb0ea8c083faf76f74c77c7c09ef0b62865
2019-07-22 19:05:26 -07:00
Adam Simpkins
62a914c93d rename the eden thrift wrapper library to match the python namespace
Summary:
We install the python files under `eden/fs/service` in a package named
`eden/thrift` in the built python binaries that use these modules.  This
moves the source files into an `eden/thrift` subdirectory so that the source
directory layout more closely matches the final binary layout.

This will make it easier to run several of Eden's Python-based tools directly
from the source tree, without having to do as much directory layout
transformation.  This is particularly helpful on platforms like Windows, which
don't currently have an equivalent of "live PARs" which can be run from the
source tree without requiring a rebuild after each file edit.

Reviewed By: chadaustin

Differential Revision: D16354622

fbshipit-source-id: 4b58cc96451b1ee5441714aaf74f5e3b6ada9eaa
2019-07-19 15:30:35 -07:00
Adam Simpkins
b46c3f4a6d rename the eden/dirstate.py module to match the python namespace
Summary:
We install `eden/py/dirstate.py` as `eden/dirstate.py` in built python
binaries that use this module.  This  moves the source file into an `eden/`
subdirectory so that the source directory layout more closely matches the
final binary layout.

This will make it easier to run several of Eden's Python-based tools directly
from the source tree, without having to do as much directory layout
transformation.  This is particularly helpful on platforms like Windows, which
don't currently have an equivalent of "live PARs" which can be run from the
source tree without requiring a rebuild after each file edit.

Reviewed By: chadaustin

Differential Revision: D16354627

fbshipit-source-id: 578748e76b730db33cf3ea555df48aa94d15019f
2019-07-19 15:30:34 -07:00
Adam Simpkins
9bfb48c921 update license headers in .py files
Summary:
Update the copyright & license headers in Python files to reflect the
relicensing to GPLv2

Reviewed By: wez

Differential Revision: D15487088

fbshipit-source-id: 9f2138dff41048d2c35f15e09a04ae5a9c9c80dd
2019-06-19 17:02:46 -07:00
Adam Simpkins
20f211acb8 remove unused python imports
Summary: Remove a number of unused imports detected by the linter.

Reviewed By: wez

Differential Revision: D15776268

fbshipit-source-id: 221f45d275664d037bbabcac9858b40266b4833e
2019-06-12 14:00:57 -07:00
Wez Furlong
6aa6599178 eden: fix oss eden cli build
Summary:
We recently added a new thrift file to the codegen, but
forgot that the cli build also needs to be taught how to build
the python code for it.

Reviewed By: strager

Differential Revision: D15788134

fbshipit-source-id: 48a14f0a91b79cc4dceaddd281598cac773b7e11
2019-06-12 13:32:54 -07:00
Wez Furlong
12f3af6005 eden: use new getdeps for FB internal CI and packaging build
Summary: this cuts over the FB internal CI builds to the updated getdeps.py.

Reviewed By: simpkins

Differential Revision: D14967377

fbshipit-source-id: 183d1d7014c9b587affacf86ff185c3bae703fec
2019-05-03 15:59:44 -07:00
Eamonn Kent
e8a8830e72 Isolate low-level overlay logic into FsOverlay
Summary:
In this change, we separate the low-level code that manipulates the overlay
into the FsOverlay class. The Overlay class makes use of the FsOverlay and
InodeMetaData table to support its Overlay interfaces. The FsOverlay class
is decoupled from the Overlay class, allowing other classes to manipulate
the overlay independently. We have a need for this in order to add
fsck to the c++ code base : described in T40728883.

Reviewed By: simpkins

Differential Revision: D14218281

fbshipit-source-id: 66c587f2b341579b8075ca5e5eeb4da6ffadf6f5
2019-03-11 17:30:21 -07:00
Wez Furlong
15e862fafe eden: fixup cli readline dep and mac packaging
Summary:
This diff updates our internal eden packaging to correctly declare
a dep on python3, and to specify that python3 interpreter when building
the CLI.

It also allows importing of `readline` to fail, which is important because
the python3 on the system may not have a functioning readline extension.

Reviewed By: strager

Differential Revision: D14098276

fbshipit-source-id: ad1174e46b9b1c0ec1e602ecaeb59c1f0835472a
2019-02-19 11:26:26 -08:00
Wez Furlong
d3f71a14f3 eden: add a script to build the eden client executable for oss builds
Summary:
The `make-client.py` script assembles an executable zip file
that holds all of the deps needed to run the `eden` cli on a posix
system.

Reviewed By: simpkins

Differential Revision: D13480144

fbshipit-source-id: de8cb093427c793a40e8bf81727f879216c9b41a
2019-01-15 14:14:32 -08:00