sapling/hgext
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
..
absorb Upgrade to 18.5b1 2018-05-30 02:23:58 -07:00
commitcloud commit cloud: improve error messaging for failing subprocess 2018-06-11 11:01:13 -07:00
convert Upgrade to 18.5b1 2018-05-30 02:23:58 -07:00
extlib ensure that DatapackStore::markForRefresh() actually refreshes the store 2018-06-13 19:39:12 -07:00
fastannotate Upgrade to 18.5b1 2018-05-30 02:23:58 -07:00
fastmanifest fix tests after reformat 2018-05-30 13:47:50 -07:00
fbamend switch to use command-wide template 2018-06-12 08:06:12 -07:00
fsmonitor take fsmonitor.skipignore out of facebook.rc 2018-06-08 16:20:19 -07:00
hgevents Upgrade to 18.5b1 2018-05-30 02:23:58 -07:00
hggit Upgrade to 18.5b1 2018-05-30 02:23:58 -07:00
hgsubversion rebase: use command-level template (BC) 2018-06-06 15:43:25 -07:00
highlight Upgrade to 18.5b1 2018-05-30 02:23:58 -07:00
infinitepush commitcloud: push commits stack-by-stack 2018-06-05 04:36:07 -07:00
lfs Upgrade to 18.5b1 2018-05-30 02:23:58 -07:00
p4fastimport Upgrade to 18.5b1 2018-05-30 02:23:58 -07:00
perfsuite Upgrade to 18.5b1 2018-05-30 02:23:58 -07:00
remotefilelog treemanifest: resolve the amend crash 2018-06-11 18:08:31 -07:00
repogenerator repogenerator: allow starting rev to be configured 2018-05-31 12:33:26 -07:00
treemanifest treemanifest: set a hint commit hash for resolving base trees 2018-06-13 11:49:46 -07:00
zeroconf Upgrade to 18.5b1 2018-05-30 02:23:58 -07:00
__init__.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
acl.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
age.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
amend.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
arcdiff.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
automv.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
backups.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
blackbox.py blackbox: be graceful when the log message cannot be formatted 2018-06-11 17:36:15 -07:00
bugzilla.py Upgrade to 18.5b1 2018-05-30 02:23:58 -07:00
bundle2hooks.py fb-hgext: move most of hgext3rd and related tests to core 2018-01-09 03:03:59 -08:00
catnotate.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
censor.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
checkmessagehook.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
children.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
chistedit.py Upgrade to 18.5b1 2018-05-30 02:23:58 -07:00
churn.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
cleanobsstore.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
clienttelemetry.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
clindex.pyx chg: drop "sensitive config sections" 2018-05-08 17:02:22 -07:00
clonebundles.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
commitextras.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
configwarn.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
conflictinfo.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
copytrace.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
crdump.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
debugcommitmessage.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
debuginhibit.py fb-hgext: move most of hgext3rd and related tests to core 2018-01-09 03:03:59 -08:00
debugshell.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
dialect.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
directaccess.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
dirsync.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
drop.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
edrecord.py Upgrade to 18.5b1 2018-05-30 02:23:58 -07:00
eol.py Upgrade to 18.5b1 2018-05-30 02:23:58 -07:00
errorredirect.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
extdiff.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
extorder.py Upgrade to 18.5b1 2018-05-30 02:23:58 -07:00
extutil.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
factotum.py Upgrade to 18.5b1 2018-05-30 02:23:58 -07:00
fastlog.py Upgrade to 18.5b1 2018-05-30 02:23:58 -07:00
fastpartialmatch.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
fbconduit.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
fbhistedit.py rebase: use command-level template (BC) 2018-06-06 15:43:25 -07:00
fbshow.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
fbsparse.py improve sparse extension error handling when used with eden 2018-06-08 14:51:54 -07:00
fetch.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
fixcorrupt.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
generic_bisect.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
githelp.py Upgrade to 18.5b1 2018-05-30 02:23:58 -07:00
gitlookup.py Upgrade to 18.5b1 2018-05-30 02:23:58 -07:00
gitrevset.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
gpg.py Upgrade to 18.5b1 2018-05-30 02:23:58 -07:00
graphlog.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
grepdiff.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
grpcheck.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
hgk.py Upgrade to 18.5b1 2018-05-30 02:23:58 -07:00
hgsql.py treemanifest: add root-only sqltreestrip option 2018-06-07 11:06:01 -07:00
hiddenerror.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
histedit.py Upgrade to 18.5b1 2018-05-30 02:23:58 -07:00
infinitepushbackup.py infinitepushbackup: back up commits stack-by-stack 2018-06-05 04:36:07 -07:00
inhibit.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
inhibitwarn.py fb-hgext: move most of hgext3rd and related tests to core 2018-01-09 03:03:59 -08:00
interactiveui.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
journal.py Upgrade to 18.5b1 2018-05-30 02:23:58 -07:00
linkrevcache.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
logginghelper.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
logtoprocess.py Upgrade to 18.5b1 2018-05-30 02:23:58 -07:00
lz4revlog.py Upgrade to 18.5b1 2018-05-30 02:23:58 -07:00
mergedriver.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
morecolors.py Upgrade to 18.5b1 2018-05-30 02:23:58 -07:00
morestatus.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
mq.py Upgrade to 18.5b1 2018-05-30 02:23:58 -07:00
myparent.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
nointerrupt.py Upgrade to 18.5b1 2018-05-30 02:23:58 -07:00
notify.py Update to 18.6b1 2018-06-05 22:19:55 -07:00
obsshelve.py Upgrade to 18.5b1 2018-05-30 02:23:58 -07:00
ownercheck.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
pager.py Upgrade to 18.5b1 2018-05-30 02:23:58 -07:00
patchbomb.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
patchrmdir.pyx patchrmdir: move to hgext 2018-01-08 19:25:13 -08:00
perftweaks.py Upgrade to 18.5b1 2018-05-30 02:23:58 -07:00
phabdiff.py add template for fetching reviewers 2018-06-12 20:48:50 -07:00
phabstatus.py Upgrade to 18.5b1 2018-05-30 02:23:58 -07:00
phrevset.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
progressfile.py Upgrade to 18.5b1 2018-05-30 02:23:58 -07:00
pullcreatemarkers.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
purge.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
pushrebase.py Update to 18.6b1 2018-06-05 22:19:55 -07:00
rage.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
rebase.py rebase: use command-level template (BC) 2018-06-06 15:43:25 -07:00
record.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
releasenotes.py Upgrade to 18.5b1 2018-05-30 02:23:58 -07:00
relink.py Upgrade to 18.5b1 2018-05-30 02:23:58 -07:00
remoteid.py Upgrade to 18.5b1 2018-05-30 02:23:58 -07:00
remotenames.py rebase: use command-level template (BC) 2018-06-06 15:43:25 -07:00
reset.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
sampling.py sampling: run @atexitr handlers in a try/catch, log if failure 2018-06-12 13:22:23 -07:00
schemes.py Upgrade to 18.5b1 2018-05-30 02:23:58 -07:00
share.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
shareutil.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
shelve.py Upgrade to 18.5b1 2018-05-30 02:23:58 -07:00
show.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
sigtrace.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
simplecache.py Upgrade to 18.5b1 2018-05-30 02:23:58 -07:00
smartlog.py Upgrade to 18.5b1 2018-05-30 02:23:58 -07:00
sparse.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
sshaskpass.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
stat.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
strip.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
traceprof.pyx hg: basic support for building hg using buck 2018-04-13 21:50:58 -07:00
transplant.py Upgrade to 18.5b1 2018-05-30 02:23:58 -07:00
treedirstate.py treedirstate: make debugtreedirstate support treestate migration 2018-06-13 18:17:26 -07:00
tweakdefaults.py rebase: use command-level template (BC) 2018-06-06 15:43:25 -07:00
uncommit.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
undo.py Upgrade to 18.5b1 2018-05-30 02:23:58 -07:00
upgradegeneraldelta.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
whereami.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
win32mbcs.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
win32text.py codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00