mq: fix up statusentry to be both repr()-able and bytes()-able
Differential Revision: https://phab.mercurial-scm.org/D1901
--- a/hgext/mq.py Wed Jan 17 22:07:09 2018 -0500
+++ b/hgext/mq.py Wed Jan 17 22:04:34 2018 -0500
@@ -148,9 +148,13 @@
class statusentry(object):
def __init__(self, node, name):
self.node, self.name = node, name
- def __repr__(self):
+
+ def __bytes__(self):
return hex(self.node) + ':' + self.name
+ __str__ = encoding.strmethod(__bytes__)
+ __repr__ = encoding.strmethod(__bytes__)
+
# The order of the headers in 'hg export' HG patches:
HGHEADERS = [
# '# HG changeset patch',