Mercurial > public > mercurial-scm > hg
comparison mercurial/manifest.py @ 31530: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 | 413b44003462 |
children | 326bca5477d0 |
comparison
equal
deleted
inserted
replaced
31529:61ff3852f6ed | 31530:160e7ad941e9 |
---|---|
10 import heapq | 10 import heapq |
11 import os | 11 import os |
12 import struct | 12 import struct |
13 | 13 |
14 from .i18n import _ | 14 from .i18n import _ |
15 from .node import bin | 15 from .node import ( |
16 bin, | |
17 hex, | |
18 ) | |
16 from . import ( | 19 from . import ( |
17 error, | 20 error, |
18 mdiff, | 21 mdiff, |
19 parsers, | 22 parsers, |
20 revlog, | 23 revlog, |
353 i += 1 | 356 i += 1 |
354 self.data = ''.join(l) | 357 self.data = ''.join(l) |
355 self.extradata = [] | 358 self.extradata = [] |
356 | 359 |
357 def _pack(self, d): | 360 def _pack(self, d): |
358 return d[0] + '\x00' + d[1][:20].encode('hex') + d[2] + '\n' | 361 return d[0] + '\x00' + hex(d[1][:20]) + d[2] + '\n' |
359 | 362 |
360 def text(self): | 363 def text(self): |
361 self._compact() | 364 self._compact() |
362 return self.data | 365 return self.data |
363 | 366 |