diff mercurial/patch.py @ 4325:aa26759c6fb3

Merge with crew-stable.
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Sat, 07 Apr 2007 04:45:27 -0300
parents 47ba52121433 6e4334be0aaa
children 439b1c35348a
line wrap: on
line diff
--- a/mercurial/patch.py
+++ b/mercurial/patch.py
@@ -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)