mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 00:45:18 +03:00
9e8e24d7df
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 |
||
---|---|---|
.. | ||
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 |