Make tor versions sortable, by adding the commit number to EXTRA_INFO
In #30899 (moved), sbws starts using the PEP 440 sortable version scheme:
The version previous to this commit was 1.1.1-dev0, after this commit, it becomes 1.1.0+xx.gyyyyyyyy, ie. xx commits after 1.1.0 plus the git short hash (yyyyyyyy).
PEP440 is specified here: https://www.python.org/dev/peps/pep-0440/
We should do something similar in tor, so that we can sort all tor versions lexically, even unreleased versions.
The current format is:
EXTRA_INFO is currently:
git rev-parse --short=16 HEAD
But we could use:
git describe --tags --dirty --broken --always --match "tor-*"
Possibly with some post-processing. We should also add a prefix that sorts after any versions in the previous format. (The prefix will only matter for 0.4.4.0-alpha-dev.)
Here's the relevant part of the current version spec: https://gitweb.torproject.org/torspec.git/tree/version-spec.txt#n22
Or we could just use python-versioneer to generate a version script for tor: https://github.com/warner/python-versioneer
We might need this change for Sponsor 55, so that chutney knows which unreleased tor versions have bridge authority fixes (see #33407 (moved))