Mercurial > public > mercurial-scm > hg-stable
diff mercurial/patch.py @ 4435:aac150af09e8
Add ui.patch option.
ui.patch overrides the default patch/gpatch command and options.
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Sat, 12 May 2007 21:09:31 +0200 |
parents | 439b1c35348a |
children | a764edb6fc95 |
line wrap: on
line diff
--- a/mercurial/patch.py Sat May 12 21:09:29 2007 +0200 +++ b/mercurial/patch.py Sat May 12 21:09:31 2007 +0200 @@ -293,11 +293,13 @@ """patch and updates the files and fuzz variables""" fuzz = False - patcher = util.find_in_path('gpatch', os.environ.get('PATH', ''), - 'patch') args = [] - if util.needbinarypatch(): - args.append('--binary') + patcher = ui.config('ui', 'patch') + if not patcher: + patcher = util.find_in_path('gpatch', os.environ.get('PATH', ''), + 'patch') + if util.needbinarypatch(): + args.append('--binary') if cwd: args.append('-d %s' % util.shellquote(cwd))