mercurial/context.py
changeset 33019 daccadd75760
parent 32904 582080a4a812
child 33022 ce96efec8112
--- a/mercurial/context.py	Thu Jun 22 03:20:11 2017 +0530
+++ b/mercurial/context.py	Thu Jun 22 03:22:30 2017 +0530
@@ -716,6 +716,12 @@
         except error.LookupError:
             return "%s@???" % self.path()
 
+    def __bytes__(self):
+        try:
+            return "%s@%s" % (self.path(), self._changectx)
+        except error.LookupError:
+            return "%s@???" % self.path()
+
     def __repr__(self):
         return "<%s %s>" % (type(self).__name__, str(self))