changeset 14217:71d5287351e9

patchfile: use real Booleans instead of 0/1
author Martin Geisler <mg@aragost.com>
date Fri, 06 May 2011 11:12:55 +0200
parents e3da95f84bcd
children 202ff575d49b
files mercurial/patch.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/patch.py	Fri May 06 11:11:55 2011 +0200
+++ b/mercurial/patch.py	Fri May 06 11:12:55 2011 +0200
@@ -406,7 +406,7 @@
             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 @@
             else:
                 self.lines[:] = h.new()
                 self.offset += len(h.new())
-                self.dirty = 1
+                self.dirty = True
             return 0
 
         horig = h
@@ -567,7 +567,7 @@
             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 @@
                         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 "