sapling/eden
Xavier Deguillard f613702fef doctor: re-enable check_hg_status_match_hg_diff
Summary:
When this check was previously enabled, we saw 2 issues from users:
 - The check failing due to status taking more than 5s,
 - The check having false positive.

The first one can be fixed by increasing the timeout on the Thrift client, the
second one is anything but clear at first sight. Digging a bit deeper, one
issue became apparent. In:
    if modified_file not in diff:
The type of `modified_file` is a `Path`, while the type of `diff` was a
`Set[str]` (the type annotation was wrong). If we manually test this, here is
what we get:

  % python3
  Python 3.8.6 (default, Feb 10 2023, 17:15:29)
  [GCC 11.x 20221024 (Facebook) 11.2.1+] on linux
  Type "help", "copyright", "credits" or "license" for more information.
  >>> from pathlib import Path
  >>> a = {"a/b.c", "c/d.c"}
  >>> a
  {'c/d.c', 'a/b.c'}
  >>> Path('c/d.c') in a
  False
  >>> a = {Path("a/b.c"), Path("c/d.c")}
  >>> Path('c/d.c') in a
  True
  >>>

The check would have thus failed, which would have led to false positives.

Lastly, this also fixes a potential false negative, where the number of
modified files could be the same as the files in diff when the latter includes
an added/remove file but is missing one of the modified file. Removing the
check comparing both is sufficient to avoid this issue.

Reviewed By: chadaustin

Differential Revision: D44558090

fbshipit-source-id: 0cc83a87758a5feeff78c38b210ebd91fa5d58f5
2023-04-04 09:51:41 -07:00
..
fs doctor: re-enable check_hg_status_match_hg_diff 2023-04-04 09:51:41 -07:00
integration Add integration test for ProjFS enumeration 2023-03-29 18:34:52 -07:00
locale
mononoke caching_ext: add bypass for filling no-op memcache 2023-04-03 13:48:10 -07:00
scm Update eden/scm/edenscm/ext/hgsql.py to resolve 3.10 DeprecationWarning 2023-04-04 09:37:33 -07:00
test_support Enable StartFakeEdenFSTest 2023-03-14 13:25:16 -07:00
test-data
testlib ui: don't default username to <user>@<fqdn> 2023-03-02 22:10:45 -08:00
.clang-tidy clang-tidy: disable facebook-hte-ContextDependentStaticInit 2022-11-04 15:33:50 -07:00
.gitignore
.mononoke_test_file
Eden.project.toml