configitems: register the 'largefiles.usercache' config
authorBoris Feld <boris.feld@octobus.net>
Fri, 13 Oct 2017 22:28:03 +0200
changeset 34757 8cf0a6cd1ed2
parent 34756 3f3c6d12095d
child 34758 9ea416a4b4f7
configitems: register the 'largefiles.usercache' config
hgext/largefiles/__init__.py
hgext/largefiles/lfutil.py
--- a/hgext/largefiles/__init__.py	Fri Oct 13 22:26:58 2017 +0200
+++ b/hgext/largefiles/__init__.py	Fri Oct 13 22:28:03 2017 +0200
@@ -136,6 +136,10 @@
 configitem('largefiles', 'patterns',
     default=list,
 )
+configitem('largefiles', 'usercache',
+    default=None,
+)
+
 reposetup = reposetup.reposetup
 
 def featuresetup(ui, supported):
--- a/hgext/largefiles/lfutil.py	Fri Oct 13 22:26:58 2017 +0200
+++ b/hgext/largefiles/lfutil.py	Fri Oct 13 22:28:03 2017 +0200
@@ -71,7 +71,7 @@
 
 def _usercachedir(ui):
     '''Return the location of the "global" largefiles cache.'''
-    path = ui.configpath(longname, 'usercache', None)
+    path = ui.configpath(longname, 'usercache')
     if path:
         return path
     if pycompat.iswindows: