changeset 34757:8cf0a6cd1ed2

configitems: register the 'largefiles.usercache' config
author Boris Feld <boris.feld@octobus.net>
date Fri, 13 Oct 2017 22:28:03 +0200
parents 3f3c6d12095d
children 9ea416a4b4f7
files hgext/largefiles/__init__.py hgext/largefiles/lfutil.py
diffstat 2 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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: