# HG changeset patch # User Alexis S. L. Carvalho # Date 1175930875 10800 # Node ID 6e4334be0aaae0eed94ae589ef4dfb3a2281787a # Parent bc6f5a1d8b7bf163520daed1526ef94a7676bc30 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. diff --git a/mercurial/patch.py b/mercurial/patch.py --- a/mercurial/patch.py +++ b/mercurial/patch.py @@ -663,6 +663,8 @@ def export(repo, revs, template='hg-%h.p 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)