# HG changeset patch # User Martin Geisler # Date 2011-05-06 09:12:55 # Node ID 71d5287351e908552e8c339ef891c4848d54bb92 # Parent e3da95f84bcd2a5939ed9ec67088b6fe162fcf12 patchfile: use real Booleans instead of 0/1 diff --git a/mercurial/patch.py b/mercurial/patch.py --- a/mercurial/patch.py +++ b/mercurial/patch.py @@ -406,7 +406,7 @@ class patchfile(object): self.ui.warn(_("unable to find '%s' for patching\n") % self.fname) self.hash = {} - self.dirty = 0 + self.dirty = False self.offset = 0 self.skew = 0 self.rej = [] @@ -539,7 +539,7 @@ class patchfile(object): else: self.lines[:] = h.new() self.offset += len(h.new()) - self.dirty = 1 + self.dirty = True return 0 horig = h @@ -567,7 +567,7 @@ class patchfile(object): else: self.lines[start : start + h.lena] = h.new() self.offset += h.lenb - h.lena - self.dirty = 1 + self.dirty = True return 0 # ok, we couldn't match the hunk. Lets look for offsets and fuzz it @@ -592,7 +592,7 @@ class patchfile(object): self.lines[l : l + len(old)] = newlines self.offset += len(newlines) - len(old) self.skew = l - orig_start - self.dirty = 1 + self.dirty = True offset = l - orig_start - fuzzlen if fuzzlen: msg = _("Hunk #%d succeeded at %d "