hgext/mq.py
changeset 2270 afd7c4ec000f
parent 2185 5acd648770d0
child 2299 dacf718e1d48
--- a/hgext/mq.py	Thu May 11 14:46:24 2006 -0700
+++ b/hgext/mq.py	Thu May 11 18:24:58 2006 -0700
@@ -281,7 +281,8 @@
                 message = '\n'.join(message)
 
             try:
-                f = os.popen("patch -p1 --no-backup-if-mismatch < '%s'" % (pf))
+                pp = util.find_in_path('gpatch', os.environ.get('PATH', ''), 'patch')
+                f = os.popen("%s -p1 --no-backup-if-mismatch < '%s'" % (pp, pf))
             except:
                 self.ui.warn("patch failed, unable to continue (try -v)\n")
                 err = 1