mercurial/patch.py
changeset 4434 439b1c35348a
parent 4325 aa26759c6fb3
child 4435 aac150af09e8
equal deleted inserted replaced
4433:ba22e867cb23 4434:439b1c35348a
   294         fuzz = False
   294         fuzz = False
   295 
   295 
   296         patcher = util.find_in_path('gpatch', os.environ.get('PATH', ''),
   296         patcher = util.find_in_path('gpatch', os.environ.get('PATH', ''),
   297                                     'patch')
   297                                     'patch')
   298         args = []
   298         args = []
       
   299         if util.needbinarypatch():
       
   300             args.append('--binary')
       
   301                                     
   299         if cwd:
   302         if cwd:
   300             args.append('-d %s' % util.shellquote(cwd))
   303             args.append('-d %s' % util.shellquote(cwd))
   301         fp = os.popen('%s %s -p%d < %s' % (patcher, ' '.join(args), strip,
   304         fp = os.popen('%s %s -p%d < %s' % (patcher, ' '.join(args), strip,
   302                                            util.shellquote(patchname)))
   305                                            util.shellquote(patchname)))
   303 
   306