changeset 34163:ed3ff1df715f

configitems: register the 'convert.git.similarity' config
author Boris Feld <boris.feld@octobus.net>
date Fri, 30 Jun 2017 03:34:23 +0200
parents 15794577bcf3
children edac06f3f46d
files hgext/convert/__init__.py hgext/convert/git.py
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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: