Julian Foad wrote on Fri, Jan 14, 2022 at 14:52:52 +0000:
> How would it work with 'multi-wc-format' branch included?
> =========================================================
⋮
> - old client, new-format WC (pristines-on-demand)
> - errors out (cleanly)
> > svn diff
> > svn: E155021: This client is too old to work with the working copy at
> '/.../wc' (format 32). You need to get a newer [...]
That's SVN_ERR_WC_UNSUPPORTED_FORMAT.
> How it could work without a WC format bump and DB change?
> =========================================================
⋮
> - old client, WC with missing pristines
> - errors out on some operations
> > svn diff
> > svn: E000002: Can't open file
> '/.../wc/.svn/pristine/03/03xxxx..xxxx.svn-base': No such file or directory
> - [CHECK] Are there any scenarios that could involve data loss?
That's ENOENT.
>
> Differences
> ===========
>
> Essentially not much. In both cases an old client can work with an old
> WC but would error out on a pristines-on-demand WC. In both cases a
> newer client could work with both WCs without forcing upgrade.
> Differences in the error message don't seem significant. Is there
> anything I'm missing?
I think the difference in the error message _is_ significant.
- If the error message is seen by a human, the SVN_ERR_WC_UNSUPPORTED_FORMAT
error message is a high-level ("porcelain") error message that
advises what to do, while ENOENT is a low-level ("plumbing") error
message that, because it includes an implementation detail (the full
path to a particular .svn-base file), looks more like an invitation to
file a bug.
- If the error is seen by a script, ditto. A script that sees ENOENT
has few choices other than to give up. A script that sees
SVN_ERR_WC_UNSUPPORTED_FORMAT can actually do something about it, such
as run «svn upgrade» (if that makes sense in that script's use-case)
or print an informative error message.
FWIW, there's at least one script that looks for that particular error
code:
https://gitlab.com/zsh-org/zsh/-/blob/af0f497247150f55963e908097d04e543da55a4b/Functions/VCS_Info/Backends/VCS_INFO_get_data_svn#L24-37
So, +1 to doing a proper format bump.
Cheers,
Daniel