changeset 2270:afd7c4ec000f

Fix issue240: mq: qpush fails on Solaris
author Danek Duvall <danek.duvall@sun.com>
date Thu, 11 May 2006 18:24:58 -0700
parents 8cb77698f5fd
children 90b122730d32
files hgext/mq.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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