mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 08:47:12 +03:00
c08890f849
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 |
||
---|---|---|
.. | ||
test | ||
CheckoutAction.cpp | ||
CheckoutAction.h | ||
CheckoutContext.cpp | ||
CheckoutContext.h | ||
DeferredDiffEntry.cpp | ||
DeferredDiffEntry.h | ||
DiffContext.h | ||
Dirstate.cpp | ||
Dirstate.h | ||
DirstatePersistence.cpp | ||
DirstatePersistence.h | ||
EdenDispatcher.cpp | ||
EdenDispatcher.h | ||
EdenMount.cpp | ||
EdenMount.h | ||
FileHandle.cpp | ||
FileHandle.h | ||
FileInode.cpp | ||
FileInode.h | ||
hgdirstate.thrift | ||
InodeBase.cpp | ||
InodeBase.h | ||
InodeDiffCallback.h | ||
InodeError.cpp | ||
InodeError.h | ||
InodeMap.cpp | ||
InodeMap.h | ||
InodePtr-defs.h | ||
InodePtr.cpp | ||
InodePtr.h | ||
InodePtrFwd.h | ||
Overlay.cpp | ||
Overlay.h | ||
overlay.thrift | ||
ParentInodeInfo.h | ||
TARGETS | ||
TreeInode.cpp | ||
TreeInode.h | ||
TreeInodeDirHandle.cpp | ||
TreeInodeDirHandle.h |