# HG changeset patch # User Pierre-Yves David # Date 1675101011 -3600 # Node ID ac93876ea2dff400ab05097ee5c32da210b7c395 # Parent 8d390a13474d34c6fa8c05a1d385cd333be2b075 setup: treat error output and non-zero return code differently Choking on Mercurial's stderr mean armless warning can derails the whole install process. We do like to be able to issue warning to people so we stop considering any stderr is a fatal mistake. This allow us to actually boostrap a version of Mercurial without loosing to many sanity point. For example in case where evolve is not loaded, something that happens when the recorded version is malformatted. Creating a wonderful ouroboros. diff -r 8d390a13474d -r ac93876ea2df setup.py --- a/setup.py Mon Jan 30 18:41:59 2023 +0100 +++ b/setup.py Mon Jan 30 18:50:11 2023 +0100 @@ -221,9 +221,10 @@ cmd = self.cmd + args returncode, out, err = runcmd(cmd, self.env) err = filterhgerr(err) - if err or returncode != 0: + if err: print("stderr from '%s':" % (' '.join(cmd)), file=sys.stderr) print(err, file=sys.stderr) + if returncode != 0: return b'' return out