diff mercurial/util.py @ 4434:439b1c35348a

Fix issue483 - mq does not work under windows with gnu-win32 patch. Add --binary option to patch command under win32.
author Patrick Mezard <pmezard@gmail.com>
date Sat, 12 May 2007 21:09:29 +0200
parents f97b89314fb3
children 62019c4427e3
line wrap: on
line diff
--- 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