sapling/eden/fs/inodes
Wez Furlong c08890f849 do a better job at reporting "new" in watchman results.
Summary:
We're seeing that this is always set to true for eden,
which is causing buck to run slower than it should.

To make this work correctly, I've augmented our journal data structure
so that it can track create, change and remove events for the various
paths.

I've also plumbed rename events into the journal.

This requires a slightly more complex merge routine, so I've refactored the two
call sites that were merging in slightly different contexts so that they can
now share the same guts of the merge routine.  Perhaps slightly
counterintuitive in the merge code is that we merge a record from the past into
the state for now and this is a bit backwards compared to how people think.

I've expanded the eden integration test to check that we don't mix up
create/change/removes for the same path in a given window.

On the watchman side, we use the presence of the filename in the createdPaths
set as a hint that the file is new.  In that case we will set the watchman
`ctime` (which is not the state ctime but is really the *created clock time*)
to match the current journal position if the file is new, or leave it set
to 0 if the file is not known to be new.  This will cause the `is_new`
flag to be set appropriately by the code in `watchman/query/eval.cpp`;
if the sequence is 0 then it should never be set to true.  Otherwise (when
the file was in the `createPaths` set) it will be set to the current journal
position and this will be seen as newer than the `since` constraint on
the query and cause the file to show as `new`.

Reviewed By: bolinfest

Differential Revision: D5608538

fbshipit-source-id: 8d78f7da05e5e53110108aca220c3a97794f8cc2
2017-08-11 12:57:37 -07:00
..
test Wrapper for TimeStamps & helper function to set timestamps in setattr. 2017-08-11 11:36:07 -07:00
CheckoutAction.cpp update logging statements to use folly logging APIs 2017-06-22 13:50:13 -07:00
CheckoutAction.h implement removing directories during checkout 2017-03-17 17:13:20 -07:00
CheckoutContext.cpp Adding lastCheckoutTime to EdenMount and initializing timestamps of FileInode with lastCheckoutTime 2017-07-27 11:52:31 -07:00
CheckoutContext.h Adding lastCheckoutTime to EdenMount and initializing timestamps of FileInode with lastCheckoutTime 2017-07-27 11:52:31 -07:00
DeferredDiffEntry.cpp drop Future from the name of ObjectStore APIs 2017-06-21 17:20:50 -07:00
DeferredDiffEntry.h minor clean up to GitIgnoreStack handling 2017-04-28 19:21:34 -07:00
DiffContext.h minor clean up to GitIgnoreStack handling 2017-04-28 19:21:34 -07:00
Dirstate.cpp Remove construct_in_place 2017-07-02 10:35:18 -07:00
Dirstate.h Reimplement dirstate used by Eden's Hg extension as a subclass of Hg's dirstate. 2017-05-26 12:05:29 -07:00
DirstatePersistence.cpp Reimplement dirstate used by Eden's Hg extension as a subclass of Hg's dirstate. 2017-05-26 12:05:29 -07:00
DirstatePersistence.h Reimplement dirstate used by Eden's Hg extension as a subclass of Hg's dirstate. 2017-05-26 12:05:29 -07:00
EdenDispatcher.cpp minor cleanups to the strace-style logging 2017-07-27 20:20:39 -07:00
EdenDispatcher.h remove warm up code 2017-06-29 10:50:14 -07:00
EdenMount.cpp fix EdenServer::unmount() to fully wait for mount point cleanup 2017-08-02 17:07:19 -07:00
EdenMount.h fix EdenServer::unmount() to fully wait for mount point cleanup 2017-08-02 17:07:19 -07:00
FileHandle.cpp minor cleanups to the strace-style logging 2017-07-27 20:20:39 -07:00
FileHandle.h Moving FileData methods to FileInode 2017-07-26 23:39:35 -07:00
FileInode.cpp Wrapper for TimeStamps & helper function to set timestamps in setattr. 2017-08-11 11:36:07 -07:00
FileInode.h Wrapper for TimeStamps & helper function to set timestamps in setattr. 2017-08-11 11:36:07 -07:00
hgdirstate.thrift Reimplement dirstate used by Eden's Hg extension as a subclass of Hg's dirstate. 2017-05-26 12:05:29 -07:00
InodeBase.cpp Wrapper for TimeStamps & helper function to set timestamps in setattr. 2017-08-11 11:36:07 -07:00
InodeBase.h Wrapper for TimeStamps & helper function to set timestamps in setattr. 2017-08-11 11:36:07 -07:00
InodeDiffCallback.h move eden/utils and eden/fuse into eden/fs 2017-04-14 11:39:02 -07:00
InodeError.cpp update all copyright statements to "2016-present" 2017-01-20 22:03:02 -08:00
InodeError.h move eden/utils and eden/fuse into eden/fs 2017-04-14 11:39:02 -07:00
InodeMap.cpp Reading and writing timestamps in to overlay files 2017-08-04 20:19:20 -07:00
InodeMap.h fix EdenServer::unmount() to fully wait for mount point cleanup 2017-08-02 17:07:19 -07:00
InodePtr-defs.h update all copyright statements to "2016-present" 2017-01-20 22:03:02 -08:00
InodePtr.cpp simplify InodePtr classes 2017-04-06 13:20:01 -07:00
InodePtr.h simplify InodePtr classes 2017-04-06 13:20:01 -07:00
InodePtrFwd.h simplify InodePtr classes 2017-04-06 13:20:01 -07:00
Overlay.cpp Wrapper for TimeStamps & helper function to set timestamps in setattr. 2017-08-11 11:36:07 -07:00
Overlay.h Wrapper for TimeStamps & helper function to set timestamps in setattr. 2017-08-11 11:36:07 -07:00
overlay.thrift fix issues updating TreeInode materialization status during checkout 2017-07-07 18:45:02 -07:00
ParentInodeInfo.h move eden/utils and eden/fuse into eden/fs 2017-04-14 11:39:02 -07:00
TARGETS fix EdenServer::unmount() to fully wait for mount point cleanup 2017-08-02 17:07:19 -07:00
TreeInode.cpp do a better job at reporting "new" in watchman results. 2017-08-11 12:57:37 -07:00
TreeInode.h Wrapper for TimeStamps & helper function to set timestamps in setattr. 2017-08-11 11:36:07 -07:00
TreeInodeDirHandle.cpp fix crashes triggered by the new TreeInode::Entry checks 2017-07-26 13:21:13 -07:00
TreeInodeDirHandle.h move eden/utils and eden/fuse into eden/fs 2017-04-14 11:39:02 -07:00