sapling/eden/fs/inodes
Michael Bolin 9e8e24d7df Create fix and test for hg merge.
Summary:
Running Mercurial's own integration tests revealed that we had a bug here:
https://www.mercurial-scm.org/repo/hg/file/tip/tests/test-histedit-arguments.t

Somewhat unsurprisingly, it was time to finally address a longstanding `TODO`
in `Dirstate.cpp`. The issue was that, after running `hg merge --tool :local`,
`hg status` was not including a merged file in the list of modified files. Because
the information from `hg status` is used to create a commit context, that meant
that when a commit was made after running `hg merge`, the commit did not
include the merged file in the list of files for the commit, which differs from
Mercurial's behavior.

Most of the implementation of `hg status` on the Eden side is done by
`EdenMount.diff()`. However, in this case, `diff()` does not categorize the
merged file by invoking one of the methods of `InodeDiffCallback` because
as far as `EdenMount` is concerned, the file has not changed because `EdenMount`
is unaware of the `Dirstate`. We already have some existing cases where we have
to do some post-processing on the result of `EdenMount.diff()` using information
in the `Dirstate` (e.g., files that are marked for addition or removal), so the fix was
to add a check for the case when the file is flagged as "needs merging" and
then including it as modified in the `hg status` output, as appropriate.

Reviewed By: wez

Differential Revision: D6005603

fbshipit-source-id: 7d4dd80e1a2e9f4b98243da80989e0e9119a566d
2017-10-09 11:55:34 -07:00
..
test Rename ConflictType::MODIFIED to ConflictType::MODIFIED_MODIFIED 2017-09-21 16:54:37 -07:00
CheckoutAction.cpp ObjectStore now returns shared_ptr<const> 2017-09-29 16:54:05 -07:00
CheckoutAction.h ObjectStore now returns shared_ptr<const> 2017-09-29 16:54:05 -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 ObjectStore now returns shared_ptr<const> 2017-09-29 16:54:05 -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 Create fix and test for hg merge. 2017-10-09 11:55:34 -07:00
Dirstate.h Add new Thrift API: hgClearDirstate(mountPoint) 2017-08-22 16:50:24 -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 CodeMod: Change #include's of wangle/concurrent/GlobalExecutor.h to use folly 2017-10-05 13:07:45 -07:00
EdenDispatcher.h Dispatcher no longer needs to know about MountPoint 2017-09-08 19:25:34 -07:00
EdenMount.cpp ObjectStore now returns shared_ptr<const> 2017-09-29 16:54:05 -07:00
EdenMount.h ObjectStore now returns shared_ptr<const> 2017-09-29 16:54:05 -07:00
FileHandle.cpp add code to serialize FileHandleMap 2017-08-30 19:20:23 -07:00
FileHandle.h add code to serialize FileHandleMap 2017-08-30 19:20:23 -07:00
FileInode.cpp prefetch inode contents when they're looked up 2017-09-19 11:10:11 -07:00
FileInode.h ObjectStore now returns shared_ptr<const> 2017-09-29 16:54:05 -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 dumb merge of MountPoint into EdenMount 2017-09-08 19:25:34 -07:00
InodeBase.h prefetch inode contents when they're looked up 2017-09-19 11:10:11 -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 prefetch inode contents when they're looked up 2017-09-19 11:10:11 -07:00
InodeMap.h prefetch inode contents when they're looked up 2017-09-19 11:10:11 -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 CodeMod: Change #include's of wangle/concurrent/GlobalExecutor.h to use folly 2017-10-05 13:07:45 -07:00
TreeInode.cpp ObjectStore now returns shared_ptr<const> 2017-09-29 16:54:05 -07:00
TreeInode.h ObjectStore now returns shared_ptr<const> 2017-09-29 16:54:05 -07:00
TreeInodeDirHandle.cpp add code to serialize FileHandleMap 2017-08-30 19:20:23 -07:00
TreeInodeDirHandle.h add code to serialize FileHandleMap 2017-08-30 19:20:23 -07:00