fastannotate: make the default value for `fastannotate.useflock` dynamic
authorMatt Harbison <matt_harbison@yahoo.com>
Tue, 21 Aug 2018 21:29:10 -0400
changeset 39248 57d4754e44b8
parent 39247 f4d4bd8c8911
child 39249 aec7109aeb39
fastannotate: make the default value for `fastannotate.useflock` dynamic fcntl.flock isn't available on Windows.
hgext/fastannotate/__init__.py
--- a/hgext/fastannotate/__init__.py	Wed Aug 08 13:56:53 2018 +0300
+++ b/hgext/fastannotate/__init__.py	Tue Aug 21 21:29:10 2018 -0400
@@ -114,6 +114,7 @@
 
 from mercurial.i18n import _
 from mercurial import (
+    configitems,
     error as hgerror,
     localrepo,
     registrar,
@@ -138,7 +139,7 @@
 
 configitem('fastannotate', 'modes', default=['fastannotate'])
 configitem('fastannotate', 'server', default=False)
-configitem('fastannotate', 'useflock', default=True)
+configitem('fastannotate', 'useflock', default=configitems.dynamicdefault)
 configitem('fastannotate', 'client', default=False)
 configitem('fastannotate', 'unfilteredrepo', default=True)
 configitem('fastannotate', 'defaultformat', default=['number'])