##// END OF EJS Templates
patchfile: use real Booleans instead of 0/1
Martin Geisler -
r14217:71d52873 default
parent child Browse files
Show More
@@ -406,7 +406,7 b' class patchfile(object):'
406 self.ui.warn(_("unable to find '%s' for patching\n") % self.fname)
406 self.ui.warn(_("unable to find '%s' for patching\n") % self.fname)
407
407
408 self.hash = {}
408 self.hash = {}
409 self.dirty = 0
409 self.dirty = False
410 self.offset = 0
410 self.offset = 0
411 self.skew = 0
411 self.skew = 0
412 self.rej = []
412 self.rej = []
@@ -539,7 +539,7 b' class patchfile(object):'
539 else:
539 else:
540 self.lines[:] = h.new()
540 self.lines[:] = h.new()
541 self.offset += len(h.new())
541 self.offset += len(h.new())
542 self.dirty = 1
542 self.dirty = True
543 return 0
543 return 0
544
544
545 horig = h
545 horig = h
@@ -567,7 +567,7 b' class patchfile(object):'
567 else:
567 else:
568 self.lines[start : start + h.lena] = h.new()
568 self.lines[start : start + h.lena] = h.new()
569 self.offset += h.lenb - h.lena
569 self.offset += h.lenb - h.lena
570 self.dirty = 1
570 self.dirty = True
571 return 0
571 return 0
572
572
573 # ok, we couldn't match the hunk. Lets look for offsets and fuzz it
573 # ok, we couldn't match the hunk. Lets look for offsets and fuzz it
@@ -592,7 +592,7 b' class patchfile(object):'
592 self.lines[l : l + len(old)] = newlines
592 self.lines[l : l + len(old)] = newlines
593 self.offset += len(newlines) - len(old)
593 self.offset += len(newlines) - len(old)
594 self.skew = l - orig_start
594 self.skew = l - orig_start
595 self.dirty = 1
595 self.dirty = True
596 offset = l - orig_start - fuzzlen
596 offset = l - orig_start - fuzzlen
597 if fuzzlen:
597 if fuzzlen:
598 msg = _("Hunk #%d succeeded at %d "
598 msg = _("Hunk #%d succeeded at %d "
General Comments 0
You need to be logged in to leave comments. Login now