--- a/hgext/automv.py Sat Jul 01 20:58:34 2017 +0200
+++ b/hgext/automv.py Fri Jun 30 03:27:24 2017 +0200
@@ -32,10 +32,18 @@
copies,
error,
extensions,
+ registrar,
scmutil,
similar
)
+configtable = {}
+configitem = registrar.configitem(configtable)
+
+configitem('automv', 'similarity',
+ default=95,
+)
+
def extsetup(ui):
entry = extensions.wrapcommand(
commands.table, 'commit', mvcheck)
@@ -48,7 +56,7 @@
renames = None
disabled = opts.pop('no_automv', False)
if not disabled:
- threshold = ui.configint('automv', 'similarity', 95)
+ threshold = ui.configint('automv', 'similarity')
if not 0 <= threshold <= 100:
raise error.Abort(_('automv.similarity must be between 0 and 100'))
if threshold > 0: