sapling/hgext/extlib
Adam Simpkins ce351de8fb ensure that DatapackStore::markForRefresh() actually refreshes the store
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
2018-06-13 19:39:12 -07:00
..
cfastmanifest hg: disable check-code tests for C code 2018-06-05 19:21:43 -07:00
cstore ensure that DatapackStore::markForRefresh() actually refreshes the store 2018-06-13 19:39:12 -07:00
ctreemanifest cstore: add treemanifest.listdir 2018-06-12 09:23:44 -07:00
indexes cleanup: remove Cargo.lock from check-in 2018-04-21 03:42:58 -07:00
phabricator Upgrade to 18.5b1 2018-05-30 02:23:58 -07:00
pyrevisionstore fix method naming 2018-06-05 09:08:21 -07:00
pywatchman Upgrade to 18.5b1 2018-05-30 02:23:58 -07:00
watchmanclient Upgrade to 18.5b1 2018-05-30 02:23:58 -07:00
__init__.py fb-hgext: integrate rust libraries and extensions with setup.py 2018-01-08 15:26:24 -08:00
cfastmanifest.c hg: disable check-code tests for C code 2018-06-05 19:21:43 -07:00
linelog.pyx hg: basic support for building hg using buck 2018-04-13 21:50:58 -07:00
litemmap.pyx basepack: workaround Python's mmap fd limit 2018-04-13 21:51:00 -07:00
README.md READMEs: tweaks based on feedback 2018-01-12 12:35:52 -08:00
traceprofimpl.cpp hg: disable check-code tests for C code 2018-06-05 19:21:43 -07:00

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.