rewind: make __rewind-hash__ extra field be bytes stable
authorAnton Shestakov <av6@dwimlabs.net>
Fri, 27 Mar 2020 17:37:34 +0700
branchstable
changeset 5214 d7aed9675db6
parent 5213 d5544ebf5836
child 5215 3d7cd43d591a
rewind: make __rewind-hash__ extra field be bytes
hgext3rd/evolve/rewind.py
--- a/hgext3rd/evolve/rewind.py	Fri Mar 27 17:37:03 2020 +0700
+++ b/hgext3rd/evolve/rewind.py	Fri Mar 27 17:37:34 2020 +0700
@@ -196,7 +196,7 @@
     if date is None:
         date = compat.makedate()
     noise = b"%s\0%s\0%d\0%d" % (ctx.node(), user, date[0], date[1])
-    extra[b'__rewind-hash__'] = hashlib.sha256(noise).hexdigest()
+    extra[b'__rewind-hash__'] = hashlib.sha256(noise).hexdigest().encode('ascii')
 
     p1 = ctx.p1().node()
     p1 = rewindmap.get(p1, p1)