mercurial/util.py
changeset 4434 439b1c35348a
parent 4405 f97b89314fb3
child 4482 62019c4427e3
--- a/mercurial/util.py
+++ b/mercurial/util.py
@@ -793,6 +793,10 @@ def linkfunc(path, fallback):
 _umask = os.umask(0)
 os.umask(_umask)
 
+def needbinarypatch():
+    """return True if patches should be applied in binary mode by default."""
+    return os.name == 'nt'
+
 # Platform specific variants
 if os.name == 'nt':
     import msvcrt