# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@octobus.net>
# Date 1712152837 -7200
#      Wed Apr 03 16:00:37 2024 +0200
# Branch stable
# Node ID ee132657647d1ad207438b965ee06e5af8929cbf
# Parent  6014602a36abadeec9d5f24a1f2ba741d59233b3
setup: display return code information about failed `hg` call

This help to understand what is going wrong when things goes wrong.

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -232,6 +232,10 @@
             print("stderr from '%s':" % (' '.join(cmd)), file=sys.stderr)
             print(err, file=sys.stderr)
         if returncode != 0:
+            print(
+                "non zero-return '%s': %d" % (' '.join(cmd), returncode),
+                file=sys.stderr,
+            )
             return b''
         return out