Mercurial > hg-stable
changeset 31536:160e7ad941e9
manifest: use node.hex instead of .encode('hex')
The latter doesn't work on Python 3.
author | Augie Fackler <augie@google.com> |
---|---|
date | Sun, 19 Mar 2017 01:11:37 -0400 |
parents | 61ff3852f6ed |
children | 326bca5477d0 |
files | mercurial/manifest.py |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/manifest.py Mon Mar 20 21:40:28 2017 -0700 +++ b/mercurial/manifest.py Sun Mar 19 01:11:37 2017 -0400 @@ -12,7 +12,10 @@ import struct from .i18n import _ -from .node import bin +from .node import ( + bin, + hex, +) from . import ( error, mdiff, @@ -355,7 +358,7 @@ self.extradata = [] def _pack(self, d): - return d[0] + '\x00' + d[1][:20].encode('hex') + d[2] + '\n' + return d[0] + '\x00' + hex(d[1][:20]) + d[2] + '\n' def text(self): self._compact()