# HG changeset patch
# User Augie Fackler <au...@google.com>
# Date 1500907059 14400
#      Mon Jul 24 10:37:39 2017 -0400
# Node ID f50da59f7977c7d796850b95ac7c80a4fd92bd18
# Parent  8b22554199879f80a13ddee556bc540ddcb65a94
obsolete: use bytestr() instead of str() so the node is bytes on py3

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.

diff --git a/mercurial/obsolete.py b/mercurial/obsolete.py
--- a/mercurial/obsolete.py
+++ b/mercurial/obsolete.py
@@ -79,6 +79,7 @@ from . import (
     obsutil,
     phases,
     policy,
+    pycompat,
     util,
 )
 
@@ -583,7 +584,8 @@ class obsstore(object):
 
         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):
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to