sapling/eden/scm
Durham Goode 6e7679fb0b filesystem: compare filenode to test if disk is dirty
Summary:
Previously filesystem._compareondisk relied on ctx.cmp(). Which
inspected the size, read the content out of the store, and compared the store
contents with what's on disk.

This is expensive for a few reasons.

1) Fetching LFS file size from the store actually fetches the entire lfs blob,
due to some unfortunate API design. This means we fetch the entire lfs blob,
then look at the lfs pointer to get the size and completely ignore the blob.
Then, if the size matches we later fetch the lfs blob *again* to compare it with
what's on disk.
We can fix the API later. For now let's circumvent ctx.cmp() and go straight to
filelog.cmp() to skip the size check, since we already did a size check earlier
in the status computation.

2) remotefilelog.cmp() requires that we have the store contents, which ends up
requiring an expensive prefetch step.
In reality we can do the cmp by computing the p1+p2+text hash of the contents on
disk and comparing it with the filenode in the manifest. So let's change
remotefilelog.cmp to use this method instead. This does require a history
prefetch (so we have p1 and p2), but that's much cheaper than a content
prefetch.

Reviewed By: quark-zju

Differential Revision: D34093036

fbshipit-source-id: 4a4386e59bca178ae58b10897c5cf68d3aa15dda
2022-02-15 23:10:18 -08:00
..
contrib checkcode: remove old-style class check 2022-01-20 10:21:48 -08:00
distutils_rust codemod: update license headers 2022-01-05 14:43:32 -08:00
doc codemod: update license headers 2022-01-05 14:43:32 -08:00
edenscm filesystem: compare filenode to test if disk is dirty 2022-02-15 23:10:18 -08:00
edenscmnative drawdag: add Python bindings 2022-02-15 13:02:31 -08:00
exec remove generated thrift code and fix external CI (#26) 2022-02-09 12:21:32 -08:00
hgcache_size_logger codemod: update license headers 2022-01-05 14:43:32 -08:00
i18n codemod: update license headers 2022-01-05 14:43:32 -08:00
lib edenapi: retry on TLS receive errors 2022-02-15 21:23:03 -08:00
newdoc fix a couple of typos 2022-01-10 16:13:22 -08:00
pystubs codemod: update license headers 2022-01-05 14:43:32 -08:00
slides codemod: update license headers 2022-01-05 14:43:32 -08:00
tests filesystem: compare filenode to test if disk is dirty 2022-02-15 23:10:18 -08:00
.editorconfig
.flake8 debugrebuildchangelog: support rebuild with lazy segmented changelog 2021-05-26 19:00:01 -07:00
.gitignore add github actions for EdenFS on linux and fix Eden SCM Mac build (#106) 2022-02-14 11:56:53 -08:00
.rustfmt.toml rustfmt: set group_imports to StdExternalCrate 2021-10-19 11:07:24 -07:00
Cargo.toml remove generated thrift code and fix external CI (#26) 2022-02-09 12:21:32 -08:00
COPYING
fsprobe.sh codemod: update license headers 2022-01-05 14:43:32 -08:00
gen_version.py Add annotations to eden 2022-02-14 12:17:43 -08:00
hgeditor Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
Makefile move autocargo up one level (#101) 2022-02-08 06:07:52 -08:00
README.rst Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
setup.py add github actions for EdenFS on linux and fix Eden SCM Mac build (#106) 2022-02-14 11:56:53 -08:00

Mercurial
=========

Mercurial is a fast, easy to use, distributed revision control tool
for software developers.

Basic install::

 $ make            # see install targets
 $ make install    # do a system-wide install
 $ hg debuginstall # sanity-check setup
 $ hg              # see help

Running without installing::

 $ make local      # build for inplace usage
 $ ./hg --version  # should show the latest version

See https://mercurial-scm.org/ for detailed installation
instructions, platform-specific notes, and Mercurial user information.