Show More
@@ -296,6 +296,9 b' def patch(patchname, ui, strip=1, cwd=No' | |||
|
296 | 296 | patcher = util.find_in_path('gpatch', os.environ.get('PATH', ''), |
|
297 | 297 | 'patch') |
|
298 | 298 | args = [] |
|
299 | if util.needbinarypatch(): | |
|
300 | args.append('--binary') | |
|
301 | ||
|
299 | 302 | if cwd: |
|
300 | 303 | args.append('-d %s' % util.shellquote(cwd)) |
|
301 | 304 | fp = os.popen('%s %s -p%d < %s' % (patcher, ' '.join(args), strip, |
@@ -793,6 +793,10 b' def linkfunc(path, fallback):' | |||
|
793 | 793 | _umask = os.umask(0) |
|
794 | 794 | os.umask(_umask) |
|
795 | 795 | |
|
796 | def needbinarypatch(): | |
|
797 | """return True if patches should be applied in binary mode by default.""" | |
|
798 | return os.name == 'nt' | |
|
799 | ||
|
796 | 800 | # Platform specific variants |
|
797 | 801 | if os.name == 'nt': |
|
798 | 802 | import msvcrt |
General Comments 0
You need to be logged in to leave comments.
Login now