Patchwork [07,of,27] configitems: register the 'convert.git.findcopiesharder' config

login
register
mail settings
Submitter Boris Feld
Date Sept. 13, 2017, 6:59 a.m.
Message ID <b3e4b98ffae06431ccf5.1505285957@FB>
Download mbox | patch
Permalink /patch/23837/
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 1498786431 -7200
#      ven. juin 30 03:33:51 2017 +0200
# Node ID b3e4b98ffae06431ccf5d22e186f5eff955576c0
# Parent  750a17e8dab48e75d5920a0e54a8c7d2cd84fceb
# EXP-Topic config.register.convert
configitems: register the 'convert.git.findcopiesharder' config

Patch

diff -r 750a17e8dab4 -r b3e4b98ffae0 hgext/convert/__init__.py
--- a/hgext/convert/__init__.py	ven. juin 30 03:33:41 2017 +0200
+++ b/hgext/convert/__init__.py	ven. juin 30 03:33:51 2017 +0200
@@ -49,6 +49,9 @@ 
 configitem('convert', 'git.extrakeys',
     default=list,
 )
+configitem('convert', 'git.findcopiesharder',
+    default=False,
+)
 
 # Commands definition was moved elsewhere to ease demandload job.
 
diff -r 750a17e8dab4 -r b3e4b98ffae0 hgext/convert/git.py
--- a/hgext/convert/git.py	ven. juin 30 03:33:41 2017 +0200
+++ b/hgext/convert/git.py	ven. juin 30 03:33:51 2017 +0200
@@ -86,8 +86,7 @@ 
             raise error.Abort(_('similarity must be between 0 and 100'))
         if similarity > 0:
             self.simopt = ['-C%d%%' % similarity]
-            findcopiesharder = ui.configbool('convert', 'git.findcopiesharder',
-                                             False)
+            findcopiesharder = ui.configbool('convert', 'git.findcopiesharder')
             if findcopiesharder:
                 self.simopt.append('--find-copies-harder')