sapling/hgext
Gregory Szorc 35538a441a fsmonitor: warn when fsmonitor could be used
fsmonitor can significantly speed up operations on large working
directories. But fsmonitor isn't enabled by default, so naive users
may not realize there is a potential to make Mercurial faster.

This commit introduces a warning to working directory updates when
fsmonitor could be used.

The following conditions must be met:

* Working directory is previously empty
* New working directory adds >= N files (currently 50,000)
* Running on Linux or MacOS
* fsmonitor not enabled
* Warning not disabled via config override

Because of the empty working directory restriction, most users will
only see this warning during `hg clone` (assuming very few users
actually do an `hg up null`).

The addition of a warning may be considered a BC change. However, clone
has printed warnings before. Until recently, Mercurial printed a warning
with the server's certificate fingerprint when it wasn't explicitly
trusted for example. The warning goes to stderr. So it shouldn't
interfere with scripts parsing meaningful output.

The OS restriction was on the advice of Facebook engineers, who only
feel confident with watchman's stability on the supported platforms.

.. feature::

   Print warning when fsmonitor isn't being used on a large repository

Differential Revision: https://phab.mercurial-scm.org/D894
2017-10-18 22:57:15 +02:00
..
convert codemod: use pycompat.iswindows 2017-10-12 23:30:46 -07:00
fsmonitor fsmonitor: warn when fsmonitor could be used 2017-10-18 22:57:15 +02:00
highlight highlight: put pygments import inside demandimport.deactivated 2017-06-18 23:05:54 -04:00
largefiles configitems: register the 'largefiles.usercache' config 2017-10-13 22:28:03 +02:00
zeroconf zeroconf: do not crash if socket being read is closed by another thread 2017-10-02 20:23:25 -07:00
__init__.py hgext: officially turn 'hgext' into a namespace package 2016-02-27 12:56:26 +01:00
acl.py acl: make sure the extensions is enabled when the acl-hooks run 2017-10-14 01:16:03 +02:00
amend.py amend: add a flag -n/--note to store note with amend 2017-10-15 19:29:56 +05:30
automv.py configitems: register the 'automv.similarity' config 2017-06-30 03:27:24 +02:00
blackbox.py configitems: register the 'blackbox.maxfiles' config 2017-10-11 22:51:23 +02:00
bugzilla.py bugzilla: remove superfluous pass statements 2017-09-29 11:55:26 -04:00
censor.py revlog: rename constants (API) 2017-05-17 19:52:18 -07:00
children.py commands: move templates of common command options to cmdutil (API) 2017-05-14 16:19:47 +09:00
churn.py churn: use the non-deprecated template option in the examples 2017-05-08 23:05:01 -04:00
clonebundles.py clonebundles: fix missing newline character 2017-05-24 22:59:59 -04:00
commitextras.py commitextras: make sure keys are not empty 2017-07-30 12:19:46 +05:30
eol.py eol: ensure the eol extensions is loaded when hooks run 2017-10-14 01:09:46 +02:00
extdiff.py configitems: register the 'extdata.*.diffargs' config 2017-10-14 00:34:46 +02:00
factotum.py configitems: register the 'factotum.service' config 2017-06-30 03:42:15 +02:00
fetch.py fetch: remove shorthand of --edit colliding against -e/-ssh in remoteopts (BC) 2017-06-24 02:39:13 +09:00
gpg.py configitems: register the 'gpg' arbitraty key section 2017-10-13 23:26:16 +02:00
graphlog.py commands: move templates of common command options to cmdutil (API) 2017-05-14 16:19:47 +09:00
hgk.py configitems: register the 'hgk.path' config 2017-06-30 03:42:35 +02:00
histedit.py histedit: remove the nonexistant config 'histeditng' 2017-10-16 12:15:00 -07:00
journal.py codemod: register core configitems using a script 2017-07-14 14:22:40 -07:00
keyword.py configitems: register the 'keywordset.svn' config 2017-06-30 03:42:50 +02:00
logtoprocess.py codemod: use pycompat.iswindows 2017-10-12 23:30:46 -07:00
mq.py mq: use the newcommitphase utility 2017-10-09 17:33:03 +02:00
notify.py configitem: register the 'notify.changegroup' config 2017-10-13 21:50:43 +02:00
pager.py configitems: register the 'pager.attend-.*' options 2017-10-11 02:26:09 +02:00
patchbomb.py configitems: register the 'patchbomb.reply-to' config 2017-10-13 23:07:12 +02:00
purge.py commands: move templates of common command options to cmdutil (API) 2017-05-14 16:19:47 +09:00
rebase.py rebase: add support to output nodechanges 2017-10-18 04:31:46 +05:30
record.py commands: move templates of common command options to cmdutil (API) 2017-05-14 16:19:47 +09:00
releasenotes.py releasenotes: show a warning if fuzzywuzzy is not present 2017-10-16 22:46:37 +05:30
relink.py extensions: change magic "shipped with hg" string 2016-08-23 11:26:08 -04:00
schemes.py codemod: use pycompat.iswindows 2017-10-12 23:30:46 -07:00
share.py share: move the implementation of 'unshare' to the 'hg' module 2017-10-17 21:48:56 -04:00
shelve.py configitems: register the 'shelve.maxbackups' config 2017-06-30 03:44:19 +02:00
show.py configitems: register the 'commands.show.aliasprefix' config 2017-10-08 20:16:09 +02:00
sparse.py sparse: require [section] in sparse config files (BC) 2017-07-15 13:21:23 -07:00
strip.py strip: take branch into account when selecting update target (issue5540) 2017-10-05 16:13:05 +02:00
transplant.py configitems: register the 'transplant.log' config 2017-06-30 03:44:30 +02:00
uncommit.py configitems: register the 'experimental.uncommitondirtywdir' config 2017-10-12 00:38:18 +02:00
win32mbcs.py codemod: use pycompat.iswindows 2017-10-12 23:30:46 -07:00
win32text.py configitems: register the 'win32text.warn' config 2017-06-30 03:45:56 +02:00