diff hgext/convert/__init__.py @ 35036:281214150561 stable

convert: avoid wrong lfconvert defaults by moving configitems to core The `hg lfconvert --to-normal` command uses the convert extension internally to work its magic, but that produced devel-warn messages if the convert extension wasn't loaded by the user. The test in fcd2f9b06629 (modified here) wasn't showing the warnings because the convert extension was loaded via $HGRCPATH. Most of the config options default to None/False, but 'hg.usebranchnames' and 'hg.tagsbranch' are supposed to default to True and 'default' respectively. The first iteration of this was to ui.setconfig() inside lfconvert, to force the convert extension to load. But there really is no precedent for doing this, and check-config complained that 'extensions.convert' isn't documented. Yuya suggested this alternative. This partially backs out 0d5a1175d0f9.
author Matt Harbison <matt_harbison@yahoo.com>
date Tue, 28 Nov 2017 23:20:08 -0500
parents effae88bccdb
children 7b74afec6772
line wrap: on
line diff
--- a/hgext/convert/__init__.py	Fri Nov 24 21:51:41 2017 -0500
+++ b/hgext/convert/__init__.py	Tue Nov 28 23:20:08 2017 -0500
@@ -28,103 +28,6 @@
 # leave the attribute unspecified.
 testedwith = 'ships-with-hg-core'
 
-configtable = {}
-configitem = registrar.configitem(configtable)
-
-configitem('convert', 'cvsps.cache',
-    default=True,
-)
-configitem('convert', 'cvsps.fuzz',
-    default=60,
-)
-configitem('convert', 'cvsps.logencoding',
-    default=None,
-)
-configitem('convert', 'cvsps.mergefrom',
-    default=None,
-)
-configitem('convert', 'cvsps.mergeto',
-    default=None,
-)
-configitem('convert', 'git.committeractions',
-    default=lambda: ['messagedifferent'],
-)
-configitem('convert', 'git.extrakeys',
-    default=list,
-)
-configitem('convert', 'git.findcopiesharder',
-    default=False,
-)
-configitem('convert', 'git.remoteprefix',
-    default='remote',
-)
-configitem('convert', 'git.renamelimit',
-    default=400,
-)
-configitem('convert', 'git.saverev',
-    default=True,
-)
-configitem('convert', 'git.similarity',
-    default=50,
-)
-configitem('convert', 'git.skipsubmodules',
-    default=False,
-)
-configitem('convert', 'hg.clonebranches',
-    default=False,
-)
-configitem('convert', 'hg.ignoreerrors',
-    default=False,
-)
-configitem('convert', 'hg.revs',
-    default=None,
-)
-configitem('convert', 'hg.saverev',
-    default=False,
-)
-configitem('convert', 'hg.sourcename',
-    default=None,
-)
-configitem('convert', 'hg.startrev',
-    default=None,
-)
-configitem('convert', 'hg.tagsbranch',
-    default='default',
-)
-configitem('convert', 'hg.usebranchnames',
-    default=True,
-)
-configitem('convert', 'ignoreancestorcheck',
-    default=False,
-)
-configitem('convert', 'localtimezone',
-    default=False,
-)
-configitem('convert', 'p4.encoding',
-    default=lambda: convcmd.orig_encoding,
-)
-configitem('convert', 'p4.startrev',
-    default=0,
-)
-configitem('convert', 'skiptags',
-    default=False,
-)
-configitem('convert', 'svn.debugsvnlog',
-    default=True,
-)
-configitem('convert', 'svn.trunk',
-    default=None,
-)
-configitem('convert', 'svn.tags',
-    default=None,
-)
-configitem('convert', 'svn.branches',
-    default=None,
-)
-configitem('convert', 'svn.startrev',
-    default=0,
-)
-
 # Commands definition was moved elsewhere to ease demandload job.
 
 @command('convert',