sapling/eden/integration/hg
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
..
lib Fix hg grep so it works when run from a subdirectory. 2017-09-13 12:57:40 -07:00
add_test.py update integration tests to support multiple hg configs 2017-08-23 18:49:33 -07:00
branch_test.py update integration tests to support multiple hg configs 2017-08-23 18:49:33 -07:00
commit_test.py update integration tests to support multiple hg configs 2017-08-23 18:49:33 -07:00
copy_test.py Add integration test for hg move. 2017-08-24 14:23:38 -07:00
diff_test.py update integration tests to support multiple hg configs 2017-08-23 18:49:33 -07:00
graft_test.py Fixed a bug in how we update the dirstate upon a snapshot change. 2017-09-08 19:25:34 -07:00
grep_test.py Fix hg grep so it can be run over the entire repo. 2017-09-13 17:51:19 -07:00
histedit_test.py adjust test expectations for fixed typo 2017-08-25 21:57:28 -07:00
merge_test.py Create fix and test for hg merge. 2017-10-09 11:55:34 -07:00
move_test.py Add integration test for hg move. 2017-08-24 14:23:38 -07:00
README.md move integration tests to eden/integration 2017-01-31 14:41:14 -08:00
rebase_test.py Fixed a bug in how we update the dirstate upon a snapshot change. 2017-09-08 19:25:34 -07:00
revert_test.py update integration tests to support multiple hg configs 2017-08-23 18:49:33 -07:00
rm_test.py update integration tests to support multiple hg configs 2017-08-23 18:49:33 -07:00
rollback_test.py Update RollbackTest to reflect error message change in Mercurial. 2017-09-19 19:14:43 -07:00
split_test.py Fix for hg split in Eden. 2017-09-06 21:20:45 -07:00
status_test.py update integration tests to support multiple hg configs 2017-08-23 18:49:33 -07:00
TARGETS don't run all integration tests in both build modes 2017-07-07 16:01:33 -07:00
update_test.py update integration tests to support multiple hg configs 2017-08-23 18:49:33 -07:00

Integration tests in this directory are specific to the Eden extension for Mercurial.

Most tests will want to subclass HgExtensionTestBase.