implement "borg version", fixes #7829 #8053
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Since long, we have borg --version to display the borg (client) version string in its very detailed form provided by setuptools_scm, e.g.:
borg 1.4.0.dev119+gc7cef548.d20240119
Now there is an additional new command "borg version ", which shows the client / server version, e.g.:
1.4.0a / 1.2.7
If a local repo is given, the client code directly accesses the repository, thus we show the client version also as the server version.
If a remote repo is given (e.g. ssh:), the remote borg is queried and its version is displayed as the server version.
Due to the version tuple format used in borg client/server negotiation, only a simplified version is displayed (as provided by borg.version.format_version).