# HG changeset patch # User Kevin Bullock # Date 1508873998 18000 # Node ID 0b4144897f738b780eaaa2aa7c108b14fd6eb287 # Parent 88db6948a5a8a9cb4d4cc215dc88e6390e1e18e5 config: register git.similarity diff -r 88db6948a5a8 -r 0b4144897f73 hggit/compat.py --- a/hggit/compat.py Tue Oct 24 14:37:55 2017 -0500 +++ b/hggit/compat.py Tue Oct 24 14:39:58 2017 -0500 @@ -70,6 +70,7 @@ 'debugextrainmessage': False, # test only -- do not document this! 'intree': None, 'mindate': None, + 'similarity': 0, }, 'hggit': { 'mapsavefrequency': 0, diff -r 88db6948a5a8 -r 0b4144897f73 hggit/git_handler.py --- a/hggit/git_handler.py Tue Oct 24 14:37:55 2017 -0500 +++ b/hggit/git_handler.py Tue Oct 24 14:39:58 2017 -0500 @@ -1548,7 +1548,7 @@ @hgutil.propertycache def _rename_detector(self): # disabled by default to avoid surprises - similarity = self.ui.configint('git', 'similarity', default=0) + similarity = compat.config(self.ui, 'int', 'git', 'similarity') if similarity < 0 or similarity > 100: raise hgutil.Abort(_('git.similarity must be between 0 and 100')) if similarity == 0: