comparison mercurial/patch.py @ 30806:e2796f193f06

patch: add similarity config knob in experimental section This config knob will control whether or not to show the similarity calculation in the diff output: diff --git a/README.md b/foo.md similarity index 88% rename from README.md rename to foo.md --- a/README.md +++ b/foo.md
author Sean Farley <sean@farley.io>
date Mon, 09 Jan 2017 10:51:44 -0800
parents dbcc10cf7f8d
children 6381a6dbc325
comparison
equal deleted inserted replaced
30805:0ae287eb6a4f 30806:e2796f193f06
2167 } 2167 }
2168 2168
2169 if git: 2169 if git:
2170 buildopts['git'] = get('git') 2170 buildopts['git'] = get('git')
2171 2171
2172 # since this is in the experimental section, we need to call
2173 # ui.configbool directory
2174 buildopts['showsimilarity'] = ui.configbool('experimental',
2175 'extendedheader.similarity')
2176
2172 # need to inspect the ui object instead of using get() since we want to 2177 # need to inspect the ui object instead of using get() since we want to
2173 # test for an int 2178 # test for an int
2174 hconf = ui.config('experimental', 'extendedheader.index') 2179 hconf = ui.config('experimental', 'extendedheader.index')
2175 if hconf is not None: 2180 if hconf is not None:
2176 hlen = None 2181 hlen = None