Make apply_issue.py much more verbose about what it's doing.

It's to help users figuring out what is happening.

TBR=rogerta@chromium.org
BUG=153284


Review URL: https://chromiumcodereview.appspot.com/11028002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@159504 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/patch.py b/patch.py
index 9083094..cd594f8 100644
--- a/patch.py
+++ b/patch.py
@@ -100,6 +100,10 @@
       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 @@
   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 @@
       # 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."""