Mercurial > hg
comparison setup.py @ 44603:bda050bc9987 stable
py3: make setup.py's hgcommand() consistently return bytes
Before this patch, it returned unicode when the command failed. That
made e.g. `make local PYTHON=python3` fail on an obsolete commit.
Differential Revision: https://phab.mercurial-scm.org/D8331
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Wed, 25 Mar 2020 18:25:58 -0700 |
parents | bb58931d0c4f |
children | e147748f750b 539490756a72 |
comparison
equal
deleted
inserted
replaced
44594:c23877cb25a5 | 44603:bda050bc9987 |
---|---|
272 returncode, out, err = runcmd(cmd, self.env) | 272 returncode, out, err = runcmd(cmd, self.env) |
273 err = filterhgerr(err) | 273 err = filterhgerr(err) |
274 if err or returncode != 0: | 274 if err or returncode != 0: |
275 printf("stderr from '%s':" % (' '.join(cmd)), file=sys.stderr) | 275 printf("stderr from '%s':" % (' '.join(cmd)), file=sys.stderr) |
276 printf(err, file=sys.stderr) | 276 printf(err, file=sys.stderr) |
277 return '' | 277 return b'' |
278 return out | 278 return out |
279 | 279 |
280 | 280 |
281 def filterhgerr(err): | 281 def filterhgerr(err): |
282 # If root is executing setup.py, but the repository is owned by | 282 # If root is executing setup.py, but the repository is owned by |