Patchwork [11,of,27] configitems: register the 'convert.git.similarity' config

login
register
mail settings
Submitter Boris Feld
Date Sept. 13, 2017, 6:59 a.m.
Message ID <d9edf9dd29eaf07f7516.1505285961@FB>
Download mbox | patch
Permalink /patch/23844/
State Accepted
Headers show

Comments

Boris Feld - Sept. 13, 2017, 6:59 a.m.
# HG changeset patch
# User Boris Feld <boris.feld@octobus.net>
# Date 1498786463 -7200
#      ven. juin 30 03:34:23 2017 +0200
# Node ID d9edf9dd29eaf07f75165e28fdbf13702d29ee55
# Parent  9610a6b85481b82d7285ef984b8007f89e97fd00
# EXP-Topic config.register.convert
configitems: register the 'convert.git.similarity' config

Patch

diff -r 9610a6b85481 -r d9edf9dd29ea hgext/convert/__init__.py
--- a/hgext/convert/__init__.py	ven. juin 30 03:34:14 2017 +0200
+++ b/hgext/convert/__init__.py	ven. juin 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.
 
diff -r 9610a6b85481 -r d9edf9dd29ea hgext/convert/git.py
--- a/hgext/convert/git.py	ven. juin 30 03:34:14 2017 +0200
+++ b/hgext/convert/git.py	ven. juin 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: