Mercurial > public > mercurial-scm > hg-stable
diff mercurial/patch.py @ 8778:c5f36402daad
use new style classes
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Wed, 10 Jun 2009 15:10:21 +0200 |
parents | 0289f384e1e5 |
children | ac92775b3b80 |
line wrap: on
line diff
--- a/mercurial/patch.py Wed Jun 10 03:20:20 2009 +0200 +++ b/mercurial/patch.py Wed Jun 10 15:10:21 2009 +0200 @@ -147,7 +147,7 @@ GP_FILTER = 1 << 1 # there's some copy/rename operation GP_BINARY = 1 << 2 # there's a binary patch -class patchmeta: +class patchmeta(object): """Patched file metadata 'op' is the performed operation within ADD, DELETE, RENAME, MODIFY @@ -232,7 +232,7 @@ unidesc = re.compile('@@ -(\d+)(,(\d+))? \+(\d+)(,(\d+))? @@') contextdesc = re.compile('(---|\*\*\*) (\d+)(,(\d+))? (---|\*\*\*)') -class patchfile: +class patchfile(object): def __init__(self, ui, fname, opener, missing=False): self.fname = fname self.opener = opener @@ -432,7 +432,7 @@ self.rej.append(h) return -1 -class hunk: +class hunk(object): def __init__(self, desc, num, lr, context, create=False, remove=False): self.number = num self.desc = desc @@ -782,7 +782,7 @@ return fname, missing -class linereader: +class linereader(object): # simple class to allow pushing lines back into the input stream def __init__(self, fp): self.fp = fp