2166 'context': get('unified', getter=ui.config), |
2166 'context': get('unified', getter=ui.config), |
2167 } |
2167 } |
2168 |
2168 |
2169 if git: |
2169 if git: |
2170 buildopts['git'] = get('git') |
2170 buildopts['git'] = get('git') |
|
2171 |
|
2172 # need to inspect the ui object instead of using get() since we want to |
|
2173 # test for an int |
|
2174 hconf = ui.config('experimental', 'extendedheader.index') |
|
2175 if hconf is not None: |
|
2176 hlen = None |
|
2177 try: |
|
2178 # the hash config could be an integer (for length of hash) or a |
|
2179 # word (e.g. short, full, none) |
|
2180 hlen = int(hconf) |
|
2181 except ValueError: |
|
2182 # default value |
|
2183 if hconf == 'short' or hconf == '': |
|
2184 hlen = 12 |
|
2185 elif hconf == 'full': |
|
2186 hlen = 40 |
|
2187 elif hconf != 'none': |
|
2188 msg = _("invalid value for extendedheader.index: '%s'\n") |
|
2189 ui.warn(msg % hconf) |
|
2190 finally: |
|
2191 if hlen < 0 or hlen > 40: |
|
2192 msg = _("invalid length for extendedheader.index: '%d'\n") |
|
2193 ui.warn(msg % hlen) |
|
2194 buildopts['index'] = hlen |
|
2195 |
2171 if whitespace: |
2196 if whitespace: |
2172 buildopts['ignorews'] = get('ignore_all_space', 'ignorews') |
2197 buildopts['ignorews'] = get('ignore_all_space', 'ignorews') |
2173 buildopts['ignorewsamount'] = get('ignore_space_change', |
2198 buildopts['ignorewsamount'] = get('ignore_space_change', |
2174 'ignorewsamount') |
2199 'ignorewsamount') |
2175 buildopts['ignoreblanklines'] = get('ignore_blank_lines', |
2200 buildopts['ignoreblanklines'] = get('ignore_blank_lines', |