diff -r 730cbd26552c -r 79639a44dd23 mercurial/patch.py --- a/mercurial/patch.py Wed Apr 04 02:28:29 2007 -0300 +++ b/mercurial/patch.py Wed Apr 04 03:09:26 2007 -0300 @@ -635,6 +635,8 @@ def export(repo, revs, template='hg-%h.p single(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)