patch: descriptive patchmeta.__repr__ to help debugging
authorMads Kiilerich <mads@kiilerich.com>
Mon, 26 Apr 2010 13:21:02 +0200
changeset 11018 17cf756ba25d
parent 11017 80b9101688ac
child 11019 4fe28bdc27be
patch: descriptive patchmeta.__repr__ to help debugging
mercurial/patch.py
--- a/mercurial/patch.py	Fri Apr 23 15:24:11 2010 +0900
+++ b/mercurial/patch.py	Mon Apr 26 13:21:02 2010 +0200
@@ -303,6 +303,9 @@
         isexec = mode & 0100
         self.mode = (islink, isexec)
 
+    def __repr__(self):
+        return "<patchmeta %s %r>" % (self.op, self.path)
+
 def readgitpatch(lr):
     """extract git-style metadata about patches from <patchname>"""