CLI: standardize how commands get a workspace
This fixes debusine collection subcommands, which took a workspace as a positional argument. No announcement needed, as they were not released yet.
The refactoring involved many commands, and I tried to maintain compatibility as much as possible. I documented the behavioural changes in the release notes, which I copy below. I hope they're acceptable, and I'm happy to work out together ways to improve things if needed.
CLI: uniform behaviour of ``--workspace``.
Arguments that require a workspace now take a ``--workspace`` argument, defaulting to:
* ``Playground`` for ``localhost``
* ``developers`` for ``debusine.debian.net``
* ``sandbox`` for ``debusine.freexian.com``
* ``System`` for all other cases
``debusine setup`` can now be used to configure a different default workspace
for each server.
This introduces a uniform handling, but adds some subtle differences in behaviour:
* ``debusine asset create``: ``--workspace`` changes from mandatory to optional.
* ``debusine workspace inheritance`` now takes a ``--workspace`` argument,
deprecating its positional version, which becomes optional. The
positional argument for a workspace, if given, overrides the ``--workspace``
one (or its default).
* ``debusine task-config pull`` does not require ``--workspace`` to be set for
a first checkout, as it uses the configured default server. However, if a
checkout exists and ``--workspace`` is provided, it raises an error if the
argument provided does not match the workspace in the checkout metadata.
* In all other cases when ``--workspace`` was optional, the server assigned a
default value taken from the settings on the remote site. Now the client
assigns a default value, as described above.
Edited by Colin Watson