[PATCH 1 of 7] patch: descriptive patchmeta.__repr__ to help debugging

Mads Kiilerich mads at kiilerich.com
Mon Apr 26 07:37:52 CDT 2010


# HG changeset patch
# User Mads Kiilerich <mads at kiilerich.com>
# Date 1272280862 -7200
# Node ID a46652b022f948601f262f2fce84767f845cb977
# Parent  4ac154fb234ab81bacd442a876a87b5f2fc83fcb
patch: descriptive patchmeta.__repr__ to help debugging

diff --git a/mercurial/patch.py b/mercurial/patch.py
--- a/mercurial/patch.py
+++ b/mercurial/patch.py
@@ -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>"""
 


More information about the Mercurial-devel mailing list