# HG changeset patch # User Augie Fackler # Date 1539418822 14400 # Node ID da1629c7dda17853c8cbaad0ef14a899af6e9361 # Parent 6519f5aee06fab3c55b865b4b645b7221fb7b79e f: fix a Python 3 bytes/string issue I suspect we should test this tool in isolation, but we don't yet. Oh well. Differential Revision: https://phab.mercurial-scm.org/D5061 diff -r 6519f5aee06f -r da1629c7dda1 tests/f --- a/tests/f Sun Oct 14 08:55:30 2018 -0400 +++ b/tests/f Sat Oct 13 04:20:22 2018 -0400 @@ -88,9 +88,11 @@ if opts.newer: # mtime might be in whole seconds so newer file might be same if stat.st_mtime >= os.stat(opts.newer).st_mtime: - facts.append(b'newer than %s' % opts.newer) + facts.append(b'newer than %s' % opts.newer.encode( + 'utf8', 'replace')) else: - facts.append(b'older than %s' % opts.newer) + facts.append(b'older than %s' % opts.newer.encode( + 'utf8', 'replace')) if opts.md5 and content is not None: h = hashlib.md5(content) facts.append(b'md5=%s' % binascii.hexlify(h.digest())[:opts.bytes])