debugindex: introduce a concept of "verbose-only" column
We are about to add a bunch of new column and most of them are probably only
relevant to --verbose.
We add some more testing of the `--verbose` mode in a sidedata context.
debugindex: move to a flexible column
Each column is now declared as a decorated function. This will make it much
simpler to add more new column in the future.
debugindex: rename the parent column to mention nodeid
We will add new columns with the "revnum" version of the parent. It will be
useful in case we need to inspect a corrupted revlog index.
debugindex: align column name on the right
It will be simpler to align everything on the same side, and the right seems a
better side as it match the value alignment.
debugindex: move the logic into its own module
Adding more information will significantly increase the amount of code. So we
move the code into its own module before making it more complex.
debugindex: rename to debugindex debug-revlog-index
The command dump some content of the revlog index and omit a lot of
information. I am going to make it display the missing information.
For clarity, we rename the command to explicitly mention revlog.
node: stop converting binascii.Error to TypeError in bin()
Changeset
f574cc00831a introduced the wrapper, to make bin() behave like on
Python 2, where it raised TypeError in many cases. Another previous approach,
changing callers to catch binascii.Error in addition to TypeError, was backed
out after negative review feedback [1].
However, I think it’s worth reconsidering the approach. Now that we’re on
Python 3 only, callers have to catch only binascii.Error instead of both.
Catching binascii.Error instead of TypeError has the advantage that it’s less
likely to cover a programming error (e.g. passing an int to bin() raises
TypeError). Also, raising TypeError never made sense semantically when bin()
got an argument of valid type.
As a side-effect, this fixed an exception in test-http-bad-server.t. The TODO
was outdated: it was not an uncaught ValueError in batch.results() but uncaught
TypeError from the now removed wrapper. Now that bin() raises binascii.Error
instead of TypeError, it gets converted to a proper error in
wirepeer.heads.<locals>.decode() that catches ValueError (superclass of
binascii.Error). This is a good example of why this changeset is a good idea.
Catching TypeError instead of ValueError there would not make much sense.
[1] https://phab.mercurial-scm.org/D2244
revlog: make try block smaller
Making try blocks as small as possible is generally a good idea, especially
when catching very general errors like TypeError.
rust: relax im-rc dependency to allow minor updates
This "15.0.*" requirement came from
0d99778af68a and is now replaced with plain
"15.0".
AFAICS, it really should allow (but not necessarily require) im-rc 15.1 .
Narrow requirement requirements with wildcard in the version is not used in
other places.