mercurial/patch.py
changeset 25631 2748bf78a5bf
parent 25483 fb04372d7b38
child 25644 c99f9715cc9a
equal deleted inserted replaced
25630:c88082baf693 25631:2748bf78a5bf
   771         # ok, we couldn't match the hunk. Lets look for offsets and fuzz it
   771         # ok, we couldn't match the hunk. Lets look for offsets and fuzz it
   772         self.hash = {}
   772         self.hash = {}
   773         for x, s in enumerate(self.lines):
   773         for x, s in enumerate(self.lines):
   774             self.hash.setdefault(s, []).append(x)
   774             self.hash.setdefault(s, []).append(x)
   775 
   775 
   776         for fuzzlen in xrange(3):
   776         for fuzzlen in xrange(self.ui.configint("patch", "fuzz", 2) + 1):
   777             for toponly in [True, False]:
   777             for toponly in [True, False]:
   778                 old, oldstart, new, newstart = h.fuzzit(fuzzlen, toponly)
   778                 old, oldstart, new, newstart = h.fuzzit(fuzzlen, toponly)
   779                 oldstart = oldstart + self.offset + self.skew
   779                 oldstart = oldstart + self.offset + self.skew
   780                 oldstart = min(oldstart, len(self.lines))
   780                 oldstart = min(oldstart, len(self.lines))
   781                 if old:
   781                 if old: