| Index: patch.py
|
| diff --git a/patch.py b/patch.py
|
| index 9083094e834dac7f3cd8fce4bb33669389f65048..cd594f8e485055a14b0e7963d13c621245301706 100644
|
| --- a/patch.py
|
| +++ b/patch.py
|
| @@ -100,6 +100,10 @@ class FilePatchBase(object):
|
| out += '%s->' % self.source_filename_utf8
|
| return out + self.filename_utf8
|
|
|
| + def dump(self):
|
| + """Dumps itself in a verbose way to help diagnosing."""
|
| + return str(self)
|
| +
|
|
|
| class FilePatchDelete(FilePatchBase):
|
| """Deletes a file."""
|
| @@ -123,6 +127,9 @@ class FilePatchBinary(FilePatchBase):
|
| def get(self):
|
| return self.data
|
|
|
| + def __str__(self):
|
| + return str(super(FilePatchBinary, self)) + ' %d bytes' % len(self.data)
|
| +
|
|
|
| class Hunk(object):
|
| """Parsed hunk data container."""
|
| @@ -491,6 +498,10 @@ class FilePatchDiff(FilePatchBase):
|
| # We're done.
|
| return
|
|
|
| + def dump(self):
|
| + """Dumps itself in a verbose way to help diagnosing."""
|
| + return str(self) + '\n' + self.get(True)
|
| +
|
|
|
| class PatchSet(object):
|
| """A list of FilePatch* objects."""
|
|
|