comparison 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
comparison
equal deleted inserted replaced
4434:439b1c35348a 4435:aac150af09e8
879 problems += 1 879 problems += 1
880 880
881 # patch 881 # patch
882 ui.status(_("Checking patch...\n")) 882 ui.status(_("Checking patch...\n"))
883 path = os.environ.get('PATH', '') 883 path = os.environ.get('PATH', '')
884 patcher = util.find_in_path('gpatch', path, 884 patcher = ui.config('ui', 'patch')
885 util.find_in_path('patch', path, None)) 885 if not patcher:
886 patcher = util.find_in_path('gpatch', path,
887 util.find_in_path('patch', path, None))
886 if not patcher: 888 if not patcher:
887 ui.write(_(" Can't find patch or gpatch in PATH\n")) 889 ui.write(_(" Can't find patch or gpatch in PATH\n"))
888 ui.write(_(" (specify a patch utility in your .hgrc file)\n")) 890 ui.write(_(" (specify a patch utility in your .hgrc file)\n"))
889 problems += 1 891 problems += 1
890 else: 892 else: