diff --git a/hggit/hg2git.py b/hggit/hg2git.py
index 2ea7881bddbcd2621cb2f329e2ef2b395bc1908f_aGdnaXQvaGcyZ2l0LnB5..f5b322889bded576313b92ff641c238893d97f18_aGdnaXQvaGcyZ2l0LnB5 100644
--- a/hggit/hg2git.py
+++ b/hggit/hg2git.py
@@ -36,7 +36,11 @@
     ...     def configbool(*args):
     ...         return False
     ...     def warn(self, s):
-    ...         print(s)
+    ...         if pycompat.ispy3:
+    ...             import sys
+    ...             print(s.decode(sys.__stdout__.encoding))
+    ...         else:
+    ...             print(s)
     >>> u = fakeui()
     >>> audit_git_path(u, b'foo/git~100/wat')
     ... # doctest: +ELLIPSIS