Mercurial > hg
changeset 4316:6e4334be0aaa
Try to find diffstat in PATH before calling it
At least on Solaris, /bin/sh will print a "command not found" message
even if we redirect stderr.
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Sat, 07 Apr 2007 04:27:55 -0300 |
parents | bc6f5a1d8b7b |
children | 66249be9aa23 |
files | mercurial/patch.py |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/patch.py Sat Apr 07 04:27:55 2007 -0300 +++ b/mercurial/patch.py Sat Apr 07 04:27:55 2007 -0300 @@ -663,6 +663,8 @@ single(repo.lookup(rev), seqno+1, fp) def diffstat(patchlines): + if not util.find_in_path('diffstat', os.environ.get('PATH', '')): + return fd, name = tempfile.mkstemp(prefix="hg-patchbomb-", suffix=".txt") try: p = popen2.Popen3('diffstat -p1 -w79 2>/dev/null > ' + name)