Mercurial > public > mercurial-scm > hg-stable
diff mercurial/patch.py @ 25631:2748bf78a5bf
patch: add fuzz config flag (issue4697)
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 18 Jun 2015 15:42:40 -0500 |
parents | fb04372d7b38 |
children | c99f9715cc9a |
line wrap: on
line diff
--- a/mercurial/patch.py Fri Jun 19 11:17:11 2015 -0700 +++ b/mercurial/patch.py Thu Jun 18 15:42:40 2015 -0500 @@ -773,7 +773,7 @@ for x, s in enumerate(self.lines): self.hash.setdefault(s, []).append(x) - for fuzzlen in xrange(3): + for fuzzlen in xrange(self.ui.configint("patch", "fuzz", 2) + 1): for toponly in [True, False]: old, oldstart, new, newstart = h.fuzzit(fuzzlen, toponly) oldstart = oldstart + self.offset + self.skew