Mercurial > hg
comparison mercurial/patch.py @ 32990:1d5d7e2b7ab5
configitems: register 'patch.fuzz' as first example for 'configint'
This exercise the default value handling in 'configint'.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sat, 17 Jun 2017 13:17:10 +0200 |
parents | 66117dae87f9 |
children | d9962854a4a2 |
comparison
equal
deleted
inserted
replaced
32989:149b68224b08 | 32990:1d5d7e2b7ab5 |
---|---|
801 # ok, we couldn't match the hunk. Lets look for offsets and fuzz it | 801 # ok, we couldn't match the hunk. Lets look for offsets and fuzz it |
802 self.hash = {} | 802 self.hash = {} |
803 for x, s in enumerate(self.lines): | 803 for x, s in enumerate(self.lines): |
804 self.hash.setdefault(s, []).append(x) | 804 self.hash.setdefault(s, []).append(x) |
805 | 805 |
806 for fuzzlen in xrange(self.ui.configint("patch", "fuzz", 2) + 1): | 806 for fuzzlen in xrange(self.ui.configint("patch", "fuzz") + 1): |
807 for toponly in [True, False]: | 807 for toponly in [True, False]: |
808 old, oldstart, new, newstart = h.fuzzit(fuzzlen, toponly) | 808 old, oldstart, new, newstart = h.fuzzit(fuzzlen, toponly) |
809 oldstart = oldstart + self.offset + self.skew | 809 oldstart = oldstart + self.offset + self.skew |
810 oldstart = min(oldstart, len(self.lines)) | 810 oldstart = min(oldstart, len(self.lines)) |
811 if old: | 811 if old: |