Mercurial > public > mercurial-scm > hg-stable
diff mercurial/commands.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 | a6436e9333db |
children | 3900f684a150 |
line wrap: on
line diff
--- a/mercurial/commands.py Sat May 12 21:09:29 2007 +0200 +++ b/mercurial/commands.py Sat May 12 21:09:31 2007 +0200 @@ -881,8 +881,10 @@ # patch ui.status(_("Checking patch...\n")) path = os.environ.get('PATH', '') - patcher = util.find_in_path('gpatch', path, - util.find_in_path('patch', path, None)) + patcher = ui.config('ui', 'patch') + if not patcher: + patcher = util.find_in_path('gpatch', path, + util.find_in_path('patch', path, None)) if not patcher: ui.write(_(" Can't find patch or gpatch in PATH\n")) ui.write(_(" (specify a patch utility in your .hgrc file)\n"))