mercurial/commands.py
changeset 4435 aac150af09e8
parent 4394 a6436e9333db
child 4438 3900f684a150
--- 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"))