configitems: register the 'convert.git.similarity' config
authorBoris Feld <boris.feld@octobus.net>
Fri, 30 Jun 2017 03:34:23 +0200
changeset 34163 ed3ff1df715f
parent 34162 15794577bcf3
child 34164 edac06f3f46d
configitems: register the 'convert.git.similarity' config
hgext/convert/__init__.py
hgext/convert/git.py
--- a/hgext/convert/__init__.py	Fri Jun 30 03:34:14 2017 +0200
+++ b/hgext/convert/__init__.py	Fri Jun 30 03:34:23 2017 +0200
@@ -61,6 +61,9 @@
 configitem('convert', 'git.saverev',
     default=True,
 )
+configitem('convert', 'git.similarity',
+    default=50,
+)
 
 # Commands definition was moved elsewhere to ease demandload job.
 
--- a/hgext/convert/git.py	Fri Jun 30 03:34:14 2017 +0200
+++ b/hgext/convert/git.py	Fri Jun 30 03:34:23 2017 +0200
@@ -81,7 +81,7 @@
                                 path)
 
         # The default value (50) is based on the default for 'git diff'.
-        similarity = ui.configint('convert', 'git.similarity', default=50)
+        similarity = ui.configint('convert', 'git.similarity')
         if similarity < 0 or similarity > 100:
             raise error.Abort(_('similarity must be between 0 and 100'))
         if similarity > 0: