mirror of
https://github.com/facebook/sapling.git
synced 2024-10-08 07:49:11 +03:00
configitems: register 'patch.fuzz' as first example for 'configint'
This exercise the default value handling in 'configint'.
This commit is contained in:
parent
4579a8de56
commit
414fa65e17
@ -36,6 +36,9 @@ def coreconfigitem(*args, **kwargs):
|
||||
|
||||
# Registering actual config items
|
||||
|
||||
coreconfigitem('patch', 'fuzz',
|
||||
default=2,
|
||||
)
|
||||
coreconfigitem('ui', 'quiet',
|
||||
default=False,
|
||||
)
|
||||
|
@ -803,7 +803,7 @@ class patchfile(object):
|
||||
for x, s in enumerate(self.lines):
|
||||
self.hash.setdefault(s, []).append(x)
|
||||
|
||||
for fuzzlen in xrange(self.ui.configint("patch", "fuzz", 2) + 1):
|
||||
for fuzzlen in xrange(self.ui.configint("patch", "fuzz") + 1):
|
||||
for toponly in [True, False]:
|
||||
old, oldstart, new, newstart = h.fuzzit(fuzzlen, toponly)
|
||||
oldstart = oldstart + self.offset + self.skew
|
||||
|
Loading…
Reference in New Issue
Block a user