Commit Graph

54 Commits

Author SHA1 Message Date
Xavier Deguillard
fe7cc8b0a9 pathfuncs: remove boost::filesystem exported dependency
Summary:
The PathFuncs.h header is included pretty much everywhere in EdenFS, and thus
its compile speed affects the entirety of EdenFS. Unfortunately, the
boost::filesystem dependency is pretty large and is thus slowing down the
compilation.

Since the few methods that rely on Boost are only used in one place, let's
instead inline the use of Boost in these places.

Reviewed By: chadaustin, fanzeyi

Differential Revision: D35058316

fbshipit-source-id: b80a39f1575acc0fa4b9e64eb5375b95b4b421da
2022-03-22 15:48:40 -07:00
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
Xavier Deguillard
09f97fa27a store: diff should respect the mount case sensitivity
Summary:
During a diff operation, files that have a case change should not reported as
changed for case insensitive mount. This is a follow up to D29150552 (37ccaa9231) where the
TreeInode code was taught to ignore case changes for case insensitive mounts.

Reviewed By: kmancini

Differential Revision: D29952464

fbshipit-source-id: e5fa8eccc1c1984a680838fd8589a0278989d9d0
2021-07-29 11:29:42 -07:00
Zhengchao Liu
321cb87688 cli support for ActivityRecorder
Summary:
This adds debug commands for ActivityRecorder:
```
eden debug start_recording --output-dir <DIR>
  * stdout: the id of the profile
eden debug stop_recording --unique <ID>
  * stdout: the output file path
```
Users can record multiple profiles concurrently. Each profile is identified by the timestamp when it started.

Reviewed By: genevievehelsel

Differential Revision: D29666359

fbshipit-source-id: 487ca67de77378a8141bc4ac46b9abd1375ffd23
2021-07-23 12:32:25 -07:00
Xavier Deguillard
de7a364e78 utils: really skip path sanity checking when asked
Summary:
When the caller asks to not perform sanity checking, this should be honored as
the caller can for instance tell that a path is guaranteed to be valid and
shouldn't be checked.

When running the newly added glob benchmark, EdenFS was spending 7.5% of the
time validating a path that was constructed via the operator+.

Reviewed By: fanzeyi

Differential Revision: D28612665

fbshipit-source-id: 282155d0415ab6458bd9307c89a24e9e090bf09d
2021-05-21 19:26:46 -07:00
Zeyi (Rice) Fan
a87cfb9aa3 utils: expand AbsolutePathBase to provide some filesystem related methods via Boost
Summary:
These methods will be used in my later Windows fsck diff as it will need to scan disk state to find changes.

It is a bit unfortunate that we'll need to stick with boost for now. However this should be a fairly easy migration to `std::filesystem` once that is available.

Reviewed By: kmancini

Differential Revision: D27872828

fbshipit-source-id: f6b27a171026aeaaea3db9f17b8f43cfa25004e4
2021-04-23 15:22:09 -07:00
Xavier Deguillard
8853701e91 path: forbid building non-utf8 paths
Summary:
The world has moved on utf-8 as the default encoding for files and data, but
EdenFS still accepts non utf-8 filenames to be written to it. In fact, most of
the time when a non utf-8 file is written to the working copy, and even though
EdenFS handles it properly, Mercurial ends up freaking out and crash. In all of
these cases, non-utf8 files were not intentional, and thus refusing to create
them wouldn't be a loss of functionality.

Note that this diff makes the asumption that Mercurial's manifest only accept
utf8 path, and thus we only have to protect against files being created in the
working copy that aren't utf8.

The unfortunate part of this diff is that it makes importing trees a bit more
expensive as testing that a path is utf8 valid is not free.

Reviewed By: chadaustin

Differential Revision: D25442975

fbshipit-source-id: 89341a004272736a61639751da43c2e9c673d5b3
2021-02-23 11:35:12 -08:00
Andres Suarez
21c95391ca Apply clang-format update fixes
Reviewed By: igorsugak

Differential Revision: D25861960

fbshipit-source-id: e3c39c080429058a58cdc66d45350e5d1420f98c
2021-01-10 10:06:29 -08:00
Xavier Deguillard
978cd4549c hg: ignore invalid filename when importing manifest
Summary:
Mercurial support files with `\` in their name, which can't be represented on
Windows due to `\` being the path separator. Currently, EdenFS will throw
errors at the user when such file are encountered, let's simply warn, and
continue.

Reviewed By: chadaustin

Differential Revision: D25430523

fbshipit-source-id: 4167b4cd81380226aead8e4f4850a7738087fd95
2021-01-05 14:08:14 -08:00
Chad Austin
20d032231c improve PathComponent parse failure error messaging
Summary:
Be more specific about which PathComponent string failed to validate
in order to help diagnose downstream issues like glob syntax errors.

Reviewed By: genevievehelsel

Differential Revision: D24966004

fbshipit-source-id: cd3bc0aeaeb389caa13c86b91149d48c5afdb306
2020-11-17 12:53:39 -08:00
Xavier Deguillard
d2f78cafdf pathfuncs: silence warning
Summary:
The components iterator return pieces of the original path, using a reference
makes little sense and the compiler complains.

Reviewed By: genevievehelsel

Differential Revision: D24873851

fbshipit-source-id: 40d414dcb4a0539167ab4760dfc0095af8245b3a
2020-11-11 20:00:39 -08:00
Xavier Deguillard
34598d4337 remove dependency on glog
Summary:
The EdenFS codebase uses folly/logging/xlog to log, but we were still relying
on glog for the various CHECK macros. Since xlog also contains equivalent CHECK
macros, let's just rely on them instead.

This is mostly codemodded + arc lint + various fixes to get it compile.

Reviewed By: chadaustin

Differential Revision: D24871174

fbshipit-source-id: 4d2a691df235d6dbd0fbd8f7c19d5a956e86b31c
2020-11-10 16:31:15 -08:00
Xavier Deguillard
a75af7a63d PathFuncs: allow paths on Windows to be '\' separated
Summary:
Previously, when that code was ported on Windows, paths separator were
converted from '\' to '/' when a wide string was provided, all the other paths
were treated as is.

The main issue with this strategy is that not all paths can be converted, the
non-stored ones for instance are immutable, which leads to some subtle bugs
down the line. For instance, the paths: "Z:/foo/bar/baz" and "Z:\foo/bar\baz"
would not be equal as the path separator isn't the same, but both of these are
actually the same path underneath.

To solve this, this diff first introduce a Windows path separator, and then
modifies the path comparison functions to ignore the path separator and only
compare the components.

I'm definitively not a fan of the pattern I use for searching for both / and \
in paths, suggestions are welcome for how to improve that.

Reviewed By: chadaustin

Differential Revision: D24376980

fbshipit-source-id: 0702bf775c7c3937b2138abd5a63d339ac80aaed
2020-10-22 16:24:17 -07:00
Xavier Deguillard
fafb9177c8 path: verify that composed paths are comprised of valid PathComponent
Summary:
The path iterator functions are skipping sanity checking of paths as they
assume that the path has already been validated. Unfortunately, that isn't the
case as the only sanity checking we are doing is on the beginning and end of
the string that is passed in. Notably, `RelativePathPiece{"./foo"}` would not
fail the sanity checking even though it it's not made of valid components.

Reviewed By: chadaustin

Differential Revision: D24439804

fbshipit-source-id: 852b3a1180b185cb0bfb96bf5bcdc98b231f32c5
2020-10-22 16:24:17 -07:00
Xavier Deguillard
c6b9788af8 win: move win/utils onto utils/
Summary: This will make it easier to build with Buck.

Reviewed By: fanzeyi

Differential Revision: D23827754

fbshipit-source-id: bf3bf4d607a08b9831f9dfea172b2e923a219561
2020-09-22 09:09:56 -07:00
Wez Furlong
2941822299 eden: use SpawnedProcess to start privhelper
Summary:
On macOS we cannot safely use `fork` to spawn processes while other threads may initialize objc classes.

This commit replaces the use of `fork` in the privhelper startup with
`SpawnedProcess` instead.  We need to take care with this as we are generally
installed setuid root and we'd like to avoid being tricked into running an
arbitrary child process as root.

This commit defines a separate executable called `edenfs_privhelper` that
contains just the privhelper server code.

We need to be careful about locating this executable; to avoid invoking an
arbitrary process while we have root privileges we require that the privhelper
be a sibling to the edenfs executable and carry out some additional ownership
verification so that we can tell that the owner of edenfs also controls
edenfs_privhelper.

To facilitate this, I've added an `executablePath` function to PathFuncs; it
returns the path to the current executable image.

To make the integration test scenario simpler, I've added the edenfs_executable
binary definition alongside that of the edenfs binary in the buck and cmake
build systems.  This causes the binaries to be siblings in-situ in the build
tree and avoids the need to move things into place in the test harness.

Reviewed By: chadaustin

Differential Revision: D23653343

fbshipit-source-id: 3c2539a5e0e11cee88960db49c885ce0366d314e
2020-09-18 17:22:39 -07:00
Chad Austin
e505d33da7 stop using deprecated std::iterator
Summary:
std::iterator is deprecated in C++17. Removing it fixes warnings in
the Clang/Windows build.

Reviewed By: genevievehelsel

Differential Revision: D23352927

fbshipit-source-id: 293e30909eaa8a7c4856a91930a3886ad0b19364
2020-08-26 17:08:05 -07:00
Xavier Deguillard
0273817488 win: simplify path management
Summary:
The StringConv.h header contains many functions to convert from Windows paths
to Eden's path (and vice versa) to workaround the fact that Eden's path don't
support wide strings that Windows uses. Let's simply add support for these wide
strings in PathFuncs so we can greatly simplify all the call sites. Instead of
calling "edenToWinName(winstr)", "PathComponent(winstr)" is both more
descriptive and more idiomatic.

To be fair, I'm not entirely a fan of the approach taken in this diff, as this
adds Windows specific code to PathFuncs.h, but I feel that the benefit is too
big to not do that.

Reviewed By: chadaustin

Differential Revision: D23004523

fbshipit-source-id: 3a1507e398a66909773251907db01e06603b91dd
2020-08-10 08:53:13 -07:00
Puneet Kaushik
2cc0d4385c Update EdenDispatcher to use Inode backed fs data on Windows
Summary:
This diff updates the EdenDispatcher to fetch/update the FS info in EdenMount which is backed by InodeTree. This helps to store the FS state in the Inode structure, which are used for source control status and update operations.

Also added a custom formatter definition for RelativePathPiece to make it easy to log relative paths.

Reviewed By: simpkins

Differential Revision: D20480861

fbshipit-source-id: b4bf1da3eeebeaee46a4a187eea9193302182068
2020-04-24 12:46:18 -07:00
Puneet Kaushik
ca84d255e8 Merge Windows and POSIX version of TestMounts
Summary: This diff is merging the Windows version of MountTest with the POSIX version. The merged MountTest is build and tested later in this stack with the Merged EdenMount.

Reviewed By: simpkins

Differential Revision: D20480864

fbshipit-source-id: 65e9402f1b03c81166835a6a605053a1bf011ddc
2020-04-23 12:41:48 -07:00
Chad Austin
db73eb37fd make deleted default constructors explicit
Summary:
Some of our types were vulnerable to the issue described in
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p1008r0.pdf so
make all deleted default constructors explicit.

Reviewed By: simpkins

Differential Revision: D21008976

fbshipit-source-id: 5b21923f25121dabf4bb0ea55f94536fb3532e6b
2020-04-14 12:47:03 -07:00
Puneet Kaushik
8aed2fb637 On Windows verify Windows path seperator in PathComponentSanityCheck
Summary: On Windows we will verify both Windows and POSIX path separators, because we have both types of paths.

Reviewed By: simpkins

Differential Revision: D19562772

fbshipit-source-id: a6d8280e3bae4f6cd32b1f379bb59e22dd584211
2020-02-13 14:19:48 -08:00
Victor Zverovich
09618791bd Update fmt to version 6
Summary: As title

Reviewed By: yfeldblum

Differential Revision: D17741047

fbshipit-source-id: e921a2fef99a9b6f11e09758e69d99a54815054a
2020-01-23 19:33:14 -08:00
Chad Austin
f930a40434 make PathComponentPiece and RelativePathPiece constexpr
Summary: Allow creation of PathComponentPiece and RelativePathPiece values at compile-time.

Reviewed By: wez

Differential Revision: D18642594

fbshipit-source-id: 209e5c27e8fab1e877ccee8558fa757b68078e66
2019-12-04 13:30:18 -08:00
Victor Zverovich
3285a8f909 Replace Folly Format with fmt in logger to reduce binary size
Summary:
Now that fmt is available in Folly builds (D14813810), use it to reduce binary code size in Folly Logger. This is done by moving most of the formatting logic behind the type-erased `vformat` API. Previously it was instantiated for all combinations of formatting argument types used in calls to `FB_LOGF` and `XLOGF` in a program.

The effect of this change can be illustrated by looking at symbol sizes as given by `nm -S -td` for the following test function:

```
void test_log() {
  FB_LOGF(logger, WARN, "num events: {:06d}, duration: {:6.3f}", 1234, 5.6789);
}
```
compiled in `opt` mode.

`nm` before:

```
0000000004236736 0000000000000231 T test_log()
0000000004236992 0000000000001002 W std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > folly::LogStreamProcessor::formatLogString<int, double>(folly::Range<char const*>, int const&, double const&)
```

`nm` after:

```
0000000004237536 0000000000000231 T test_log()
0000000004237792 0000000000000251 W std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > folly::LogStreamProcessor::formatLogString<int, double>(folly::Range<char const*>, int const&, double const&)
0000000004238048 0000000000000740 W folly::LogStreamProcessor::vformatLogString[abi:cxx11](folly::Range<char const*>, fmt::v5::format_args, bool&)
```

Before we had one 1002 byte instantiation of `formatLogString<int, double>`. With this change it was reduced 4x to 251 bytes and non-template function `vformatLogString` was added which is shared among all logging calls. The size of `test_log` remained unchanged. There are even bigger savings from Folly Formatter instantiations which are no longer needed, e.g.

```
0000000004238032 0000000000001363 W _ZNK5folly13BaseFormatterINS_9FormatterILb0EJRKiRKdEEELb0EJS3_S5_EEclIZNKS7_8appendToINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENSt9enable_ifIXsr12IsSomeStringIT_EE5valueEvE4typeERSH_EUlNS_5RangeIPKcEEE_EEvSK_
```

So in total this change results in ~5x per-call/instantiation binary size. It is possible to reduce binary size even further but it is not done in the current diff to keep it manageable.

In addition to binary size improvements, switching to fmt will potentially

* allow catching errors in format strings at compile time,
* simplify future migration to C++20 [`std::format`](http://eel.is/c++draft/format).

Reviewed By: simpkins

Differential Revision: D15485589

fbshipit-source-id: 06db4436839f11c2c3dbed7b36658e2193343411
2019-11-18 05:53:08 -08:00
Andres Suarez
fbdb46f5cb Tidy up license headers
Reviewed By: chadaustin

Differential Revision: D17872966

fbshipit-source-id: cd60a364a2146f0dadbeca693b1d4a5d7c97ff63
2019-10-11 05:28:23 -07:00
Adam Simpkins
aa5e6c7295 update license headers in C++ files
Summary:
Update the copyright & license headers in C++ files to reflect the
relicensing to GPLv2

Reviewed By: wez

Differential Revision: D15487078

fbshipit-source-id: 19f24c933a64ecad0d3a692d0f8d2a38b4194b1d
2019-06-19 17:02:45 -07:00
Jake Crouch
1f34bd8448 Templatize Path Memory Estimation
Summary: Previously functions were defined per string type but since SSO detection is now templatized so can path memory estimation.

Reviewed By: chadaustin

Differential Revision: D15723098

fbshipit-source-id: df8dcd359a0f4f704eba337ebf5e382d87ca3abe
2019-06-07 18:51:40 -07:00
Jake Crouch
0dc6812f33 Print out Journal Info with edenfsctl
Summary: Print out memory usage and entry counts with edenfsctl stats

Reviewed By: chadaustin

Differential Revision: D15607015

fbshipit-source-id: 866960ea1d3b5e9fdbe24df3b57fba419795ec76
2019-06-07 13:37:02 -07:00
Puneet Kaushik
9e24d970a8 Replace EDEN_WIN with _WIN32 for Windows only code
Reviewed By: chadaustin

Differential Revision: D15228464

fbshipit-source-id: 08b30f535fa17a5bcda906e640cc036cd0d59d02
2019-05-09 16:33:08 -07:00
Adam Simpkins
81260b6085 add a removeRecursively() helper function
Summary:
Add a helper function to recursively remove a directory from the local
filesystem, given an `AbsolutePath`.

Reviewed By: wez

Differential Revision: D14954737

fbshipit-source-id: a3f6b60e610c18eabea2a7c507661a43502a2554
2019-04-16 22:10:05 -07:00
Yedidya Feldblum
e245072bf7 Add assorted missing includes
Summary: [Eden] Add assorted missing `#include`s.

Reviewed By: swolchok

Differential Revision: D14293384

fbshipit-source-id: ccd61dde41a978bd3f82eb11cbe401cd51e7e056
2019-03-07 00:13:47 -08:00
Rick Ratmansky
593f2f29ca Revert D14114164: [Folly] Remove include of glog from Range.h
Differential Revision:
D14114164

Original commit changeset: e227609e9214

fbshipit-source-id: 99d0fde58e512224915d7a00893ddf15c547dfba
2019-03-01 06:51:52 -08:00
Yedidya Feldblum
851e90c055 Remove include of glog from Range.h
Summary: [Folly] Remove include of `glog` from `Range.h`.

Reviewed By: lbrandy, Orvid

Differential Revision: D14114164

fbshipit-source-id: e227609e9214ab39ff272e44519d34f3047fe025
2019-03-01 01:43:08 -08:00
Scott Wolchok
3db36918c8 Don't include FBVector.h in String.h
Summary: No need for String to import fbvector.

Reviewed By: yfeldblum

Differential Revision: D13007715

fbshipit-source-id: c61639a04273f14dd3daf230ee6ed9ade93d058e
2018-11-29 11:52:37 -08:00
Puneet Kaushik
060d62f3c6 Add string conversion functions for Windows
Summary:
Backing store works with eden strings(UTF8 + Unix path separator). The path strings we receive on Windows from FS and cli are Windows paths
 (Win path separator and/or UTF16). Adding the functions to convert one to another.

Reviewed By: strager

Differential Revision: D13091788

fbshipit-source-id: f7fc8a79e360e964cf4619dfa540b57f1f18d283
2018-11-26 08:19:47 -08:00
Wez Furlong
19d6dd41d9 add pathFuncs expandUser() for tilde expansion
Summary:
This function behaves similarly to the python `os.path.expanduser`
function, except that it is restricted to expanding only information for the
current user.

Use this new function to process the hgcache path returned via the
rust config parsing code.

In the longer term I want to centralize and add accessors for
the rust config and move this stuff into EdenConfig, but for
now this is the one place that does this and it is OK to
process it this way here.

Reviewed By: strager

Differential Revision: D12988902

fbshipit-source-id: 96b10640359c3b8c0adac1e14cd42dd592023c3d
2018-11-09 11:24:37 -08:00
Matt Glazar
1f15d7e2fd Delete stale comment
Summary: D3376727 removed the `+1` from `AbsolutePathBase::paths`, but did not remove the comment referring to the `+1`. Remove the stale comment.

Reviewed By: pkaush

Differential Revision: D10394249

fbshipit-source-id: 3b2dc27f7083fe8a8706bac38275249dd4969d11
2018-10-22 20:27:25 -07:00
Chad Austin
65453a7ab2 fix memory error in relativize()
Summary:
relativize() returns an AbsolutePathPiece into its argument which is a
temporary AbsolutePath. The tests and ASAN didn't catch this because
they asserted the result's value before the temporary was destroyed, I
assume. Also the test strings fit into the SSO so there was no actual
memory allocation.

Reviewed By: simpkins

Differential Revision: D10261332

fbshipit-source-id: 912ffe6a46845cdd625e6dffbf65f0a0f8f89d0f
2018-10-09 16:39:45 -07:00
Chad Austin
d99eef5354 add a splitFirst() function to PathFuncs
Summary:
Add a splitFirst() function that, if you think about a path as a linked list,
splits the head and the tail. Normally you could use the components
iterator, but split() is easier when the iteration is asynchronous and
requires lambda capture.

Reviewed By: pkaush

Differential Revision: D10154746

fbshipit-source-id: 6372a0bbde27f6596659ad1244cc96fa1f9eb6ff
2018-10-09 16:39:45 -07:00
Puneet Kaushik
eeaf1c0025 Started Eden for Windows and integrated hg store with it.
Summary:
This diff is first in the series to make Eden work on Windows. It includes:

1. HG backing store and Object store, which provides the capability to talk to mercurial and fetch the file and folder contents on Windows.
2. Subprocess and Pipe definition for Windows.
3. The Visual studio solution and projects files to compile Eden and scm datapack.

Few Important points:

1. Most of the changes to existing code is done under a macro EDEN_WIN so that it doesn't impact on other platform.
2. Sqlite is used for caching the fetched contents. We are not using Rocksdb on Windows.
3. The main function only calls some test code and exit after printing the output.
4. The initializeMononoke code is disabled for Windows because it needs Proxygen to talk HTTP. Will enable this once I get Proxygen and other dependencies working.
5. HgImporter pass Windows handles to hg_import_helper as command line args. The code to convert these handles into fds is in a separate diff.

Reviewed By: wez

Differential Revision: D8653992

fbshipit-source-id: 52a3c3750425fb92c2a7158c2c214a9372661e13
2018-08-21 17:53:38 -07:00
Adam Simpkins
3f99298e67 teach edenfs to create directories it needs
Summary:
Update the C++ edenfs code to ensure that the .eden and
.eden/storage/rocks-db directories exist, rather than requiring the python CLI
code create these directories as part of `eden start`

Reviewed By: strager

Differential Revision: D8508488

fbshipit-source-id: 358521b4f5eed1d19bf37903900ca50718e2c35c
2018-06-26 12:07:08 -07:00
Chad Austin
0797ee3a35 to satisfy secfs validation suite, limit path components to 255 bytes
Summary:
Most filesystems limit path components to 255. To remain consistent,
let's have Eden do the same, at least for write operations.

Reviewed By: simpkins

Differential Revision: D8151020

fbshipit-source-id: 251da94a076f5765111c8e3d9d8a25c37682e2e3
2018-05-30 23:11:28 -07:00
Chad Austin
72be488e3d add convenient operator literals for the various path piece types
Summary:
I got tired of typing PathComponentPiece{"..."} in tests so here are
some operator literals.

Reviewed By: simpkins

Differential Revision: D7956732

fbshipit-source-id: 85d9f3fd725853a54da9e70fc659bd7eb9e0862c
2018-05-11 14:52:07 -07:00
Sergey Zhupanov
6f40e9a23f replaced std::size_t by size_t in fbcode/eden codebase.
Summary:
Most uses of `size_t` in `eden` are unqualified, but a few are qualified.
As discussed ad nauseum in
  https://stackoverflow.com/questions/5813700/difference-between-size-t-and-stdsize-t
it is totally safe to use unqualified `size_t` with all compilers/platforms.
Since this saves 5 chars per use, and to improve uniformity, I ran:
```
$ find ~/fbsource/fbcode/eden -type f       \
    | egrep '\.(h|cpp)$'                    \
    | xargs sed -i 's/std::size_t/size_t/g'
```

Reviewed By: chadaustin

Differential Revision: D7021980

fbshipit-source-id: da268e62a9a93d2a5168a40b6878795ae7516b7f
2018-02-20 15:30:18 -08:00
Chad Austin
13176097df bring back fbstring for PathComponent - reduces PathMap memory usage
Summary:
In my benchmarks, using fbstring over std::string for PathMap is
worthwhile.  There are a lot of entries stored in PathMap and the fact
that fbstring is a word smaller than std::string adds up.

Differential Revision: D6820204

fbshipit-source-id: 1ac34a81828891eb8125b13a074de6ed9715edad
2018-01-26 10:51:58 -08:00
Sergey Zhupanov
14890efd46 Added joinAndNormalize to PathFuncs with test plus minor cleanup.
Summary:
joinAndNormalize() canonicalizes a path string relative to
         a relative path base.

Reviewed By: simpkins

Differential Revision: D6659625

fbshipit-source-id: 0547d93d576fb894b16ad43bec020dc7b9658426
2018-01-04 10:11:38 -08:00
Sergey Zhupanov
29c2999a65 Removed all folly::fbstring uses from eden.
Summary: Removed all folly::fbstring uses from eden.

Reviewed By: wez

Differential Revision: D6597696

fbshipit-source-id: 816ea91fad063eccf9e6a46bf5c5e32bc69c6bf7
2018-01-03 16:41:34 -08:00
Adam Simpkins
5ef9928f3b add a normalizeBestEffort() function
Summary:
Add a new function that attempts to normalize a path with `realpath()`, but
falls back to `canonicalPath()` if that fails.  This lets us attempt to resolve
symlinks if possible, but still perform best-effort normalization if that
fails.

Reviewed By: chadaustin

Differential Revision: D6527493

fbshipit-source-id: 9137d517452ca7fd825852c1f60ade07f1ee78fa
2017-12-14 12:41:47 -08:00
Chad Austin
8b9261f2a1 run clang-format across all C++ files
Summary:
Per discussion with bolinfest, this brings Eden in line with clang-format.

This diff was generated with `find . \( -iname '*.cpp' -o -iname '*.h' \) -exec bash -c "yes | arc lint {}" \;`

Reviewed By: bolinfest

Differential Revision: D6232695

fbshipit-source-id: d54942bf1c69b5b0dcd4df629f1f2d5538c9e28c
2017-11-03 16:02:03 -07:00