setup: fail if we cannot determine the version number
If running hg fails, exit the setup script unsuccessfully, rather than
proceeding to use a bogus version of "+0-". Using an invalid version number
causes various tests to fail later. Failing early makes it easier to identify
the source of the problem.
It is currently easy for setup.py to fail this way since it sets HGRCPTH to the
empty string before running "hg", which may often disable extensions necessary
to interact with the local repository.
smartset: fix generatorset.last() to not return the first element (
issue5609)
strip: respect the backup option in stripcallback
The backup option was mistakenly ignored. It should be respected.
Thanks Martin von Zweigbergk for finding this out!
py3: use r'' to prevent the addition of b'' by transformer
There are cases in opts handling in debugcommands.py where we don't need to
convert opts keys back to bytes as there are some handful cases and no other
function using opts value. Using r'', we prevent the transformer to add
a b'' which will keep the value str.