diff -r 2cf1e5207fdf -r 2912b06905dc mercurial/sslutil.py --- a/mercurial/sslutil.py Wed Feb 22 10:14:18 2017 -0800 +++ b/mercurial/sslutil.py Mon Feb 20 18:40:42 2017 +0530 @@ -720,7 +720,8 @@ # to load the system CA store. If we're running on Apple Python, use this # trick. if _plainapplepython(): - dummycert = os.path.join(os.path.dirname(__file__), 'dummycert.pem') + dummycert = os.path.join( + os.path.dirname(pycompat.fsencode(__file__)), 'dummycert.pem') if os.path.exists(dummycert): return dummycert