D1901: mq: fix up statusentry to be both repr()-able and bytes()-able
durin42 (Augie Fackler)
phabricator at mercurial-scm.org
Thu Feb 1 20:43:14 UTC 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG0ba365937220: mq: fix up statusentry to be both repr()-able and bytes()-able (authored by durin42, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D1901?vs=4908&id=5071
REVISION DETAIL
https://phab.mercurial-scm.org/D1901
AFFECTED FILES
hgext/mq.py
CHANGE DETAILS
diff --git a/hgext/mq.py b/hgext/mq.py
--- a/hgext/mq.py
+++ b/hgext/mq.py
@@ -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',
To: durin42, #hg-reviewers, pulkit, indygreg
Cc: yuja, mercurial-devel
More information about the Mercurial-devel
mailing list