py3: convert filename to bytes in test-hardlinks.t
authorMatt Harbison <matt_harbison@yahoo.com>
Sun, 09 Dec 2018 13:33:36 -0500
changeset 40887 f79659e1e50f
parent 40886 109a267acc1e
child 40888 d3d52cc91e83
py3: convert filename to bytes in test-hardlinks.t Windows was complaining about passing str to CreateFileA() in win32.py.
tests/test-hardlinks.t
--- a/tests/test-hardlinks.t	Sat Dec 08 23:41:54 2018 -0800
+++ b/tests/test-hardlinks.t	Sun Dec 09 13:33:36 2018 -0500
@@ -3,10 +3,10 @@
   $ cat > nlinks.py <<EOF
   > from __future__ import print_function
   > import sys
-  > from mercurial import util
+  > from mercurial import pycompat, util
   > for f in sorted(sys.stdin.readlines()):
   >     f = f[:-1]
-  >     print(util.nlinks(f), f)
+  >     print(util.nlinks(pycompat.fsencode(f)), f)
   > EOF
 
   $ nlinksdir()