D271: obsolete: use bytestr() instead of str() so the node is bytes on py3
durin42 (Augie Fackler)
phabricator at mercurial-scm.org
Tue Aug 8 19:49:07 UTC 2017
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
I'm not sure this is right, since this should either be bytes or str
to match what's going on in the revlog layer.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D271
AFFECTED FILES
mercurial/obsolete.py
CHANGE DETAILS
diff --git a/mercurial/obsolete.py b/mercurial/obsolete.py
--- a/mercurial/obsolete.py
+++ b/mercurial/obsolete.py
@@ -79,6 +79,7 @@
obsutil,
phases,
policy,
+ pycompat,
util,
)
@@ -583,7 +584,8 @@
metadata = tuple(sorted(metadata.iteritems()))
- marker = (str(prec), tuple(succs), int(flag), metadata, date, parents)
+ prec = bytes(pycompat.bytestr(prec))
+ marker = (prec, tuple(succs), int(flag), metadata, date, parents)
return bool(self.add(transaction, [marker]))
def add(self, transaction, markers):
To: durin42, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list