##// END OF EJS Templates
Add ui.patch option....
Patrick Mezard -
r4435:aac150af default
parent child Browse files
Show More
@@ -432,6 +432,9 b' ui::'
432 merge;;
432 merge;;
433 The conflict resolution program to use during a manual merge.
433 The conflict resolution program to use during a manual merge.
434 Default is "hgmerge".
434 Default is "hgmerge".
435 patch;;
436 command to use to apply patches. Look for 'gpatch' or 'patch' in PATH if
437 unset.
435 quiet;;
438 quiet;;
436 Reduce the amount of output printed. True or False. Default is False.
439 Reduce the amount of output printed. True or False. Default is False.
437 remotecmd;;
440 remotecmd;;
@@ -881,8 +881,10 b' def debuginstall(ui):'
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"))
@@ -293,11 +293,13 b' def patch(patchname, ui, strip=1, cwd=No'
293 """patch and updates the files and fuzz variables"""
293 """patch and updates the files and fuzz variables"""
294 fuzz = False
294 fuzz = False
295
295
296 patcher = util.find_in_path('gpatch', os.environ.get('PATH', ''),
297 'patch')
298 args = []
296 args = []
299 if util.needbinarypatch():
297 patcher = ui.config('ui', 'patch')
300 args.append('--binary')
298 if not patcher:
299 patcher = util.find_in_path('gpatch', os.environ.get('PATH', ''),
300 'patch')
301 if util.needbinarypatch():
302 args.append('--binary')
301
303
302 if cwd:
304 if cwd:
303 args.append('-d %s' % util.shellquote(cwd))
305 args.append('-d %s' % util.shellquote(cwd))
General Comments 0
You need to be logged in to leave comments. Login now