[PATCH] setup: print subprocess stderr if there is any

Bryan O'Sullivan bos at serpentine.com
Fri Nov 9 18:06:16 CST 2012


# HG changeset patch
# User Bryan O'Sullivan <bryano at fb.com>
# Date 1352505972 28800
# Node ID 123560a9b0f5b45858feb54d95ee5d6da5730783
# Parent  fb14a5dcdc62987512820531fe60719d650491b6
setup: print subprocess stderr if there is any

I just spent 1.5 days trying to debug a failing buildbot because
setup.py was silently dropping the errors that were being printed
by in-place hg.

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -151,6 +151,8 @@ def runhg(cmd, env):
            if not e.startswith(b('Not trusting file')) \
               and not e.startswith(b('warning: Not importing'))]
     if err:
+        print >> sys.stderr, 'stderr from %r:' % (' '.join(cmd))
+        print >> sys.stderr, '\n'.join(['  ' + e for e in err])
         return ''
     return out
 


More information about the Mercurial-devel mailing list