mirror of
https://github.com/facebook/sapling.git
synced 2024-10-12 01:39:21 +03:00
ce351de8fb
Summary: This fixes how DatapackStore::refresh() computes if it needs to perform a refresh. Previously this code was using `clock()`, which returns the amount of CPU time used by the program. This seems like an undesirable metric to use: the amount of CPU used by the current program doesn't seem like it should be relevant to whether the files on disk need to be re-examined or not. If the program has slept for an hour we probably still want to refresh the files even though no CPU time has been consumed. As a result of how the computation was performed, markForRefresh() also would not trigger a refresh if the program has used less than 100ms of CPU time so far. This was breaking some of the eden tests which create a repository pull some packs into it, and then immediately refresh the store. If all of this happens in less than 100ms the DatapackStore code would not actually refresh the store. Reviewed By: chadaustin Differential Revision: D8410266 fbshipit-source-id: f08d317b261ccfe89cff45bf3e511a2b87cf9fb5 |
||
---|---|---|
.. | ||
cfastmanifest | ||
cstore | ||
ctreemanifest | ||
indexes | ||
phabricator | ||
pyrevisionstore | ||
pywatchman | ||
watchmanclient | ||
__init__.py | ||
cfastmanifest.c | ||
linelog.pyx | ||
litemmap.pyx | ||
README.md | ||
traceprofimpl.cpp |
extlib
Code that extensions depend on, but aren't themselves extensions, should go here. Both native (C/C++/Cython/Rust) and Python code is allowed. Code that depends on Python is also allowed.
In theory, this code should slowly disappear as extension code gets folded into
mainline Mercurial. (The native bits should go into lib/
or mercurial/cext
),
the Python code into mercurial/
itself.)
See also lib/README.md
, mercurial/cext/README.md
.