diff options
author | Daniel Shahaf <d.s@daniel.shahaf.name> | 2020-03-26 01:32:51 +0000 |
---|---|---|
committer | Daniel Shahaf <d.s@daniel.shahaf.name> | 2020-03-27 01:14:42 +0000 |
commit | f207fb90d8a86c5968e1a3d702ea4cf778bd79d8 (patch) | |
tree | 067af46be3c0847a407fcf773e8ddd75f810efe7 | |
parent | cb87816b0f47367a763790adabcec1e331156ea2 (diff) | |
download | zsh-f207fb90d8a86c5968e1a3d702ea4cf778bd79d8.tar.gz zsh-f207fb90d8a86c5968e1a3d702ea4cf778bd79d8.tar.xz zsh-f207fb90d8a86c5968e1a3d702ea4cf778bd79d8.zip |
45625: vcs_info svn: Detect the "working copy format is too new" error.
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | Functions/VCS_Info/Backends/VCS_INFO_get_data_svn | 10 |
2 files changed, 12 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog index a82b46570..b21bdefed 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2020-03-26 Daniel Shahaf <d.s@daniel.shahaf.name> + * 45625: Functions/VCS_Info/Backends/VCS_INFO_get_data_svn: + vcs_info svn: Detect the "working copy format is too new" error. + * 45626: Functions/VCS_Info/Backends/VCS_INFO_get_data_bzr, Functions/VCS_Info/Backends/VCS_INFO_get_data_p4, Functions/VCS_Info/Backends/VCS_INFO_get_data_svk, diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_svn b/Functions/VCS_Info/Backends/VCS_INFO_get_data_svn index 6fbd673a7..b33efc2fb 100644 --- a/Functions/VCS_Info/Backends/VCS_INFO_get_data_svn +++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_svn @@ -10,6 +10,7 @@ local -i rc local -A svninfo parentinfo cwdinfo local -A hook_com integer -r SVN_ERR_WC_UPGRADE_REQUIRED=155036 # from /usr/local/include/subversion-1/svn_error_codes.h +integer -r SVN_ERR_WC_UNSUPPORTED_FORMAT=155021 svnbase="."; svninfo=() @@ -22,7 +23,14 @@ rc=$? if (( rc != 0 )) ; then if (( rc == 1 )) && [[ -n ${(M)dat:#"svn: E${SVN_ERR_WC_UPGRADE_REQUIRED}: "*} ]]; then hook_com=() - VCS_INFO_formats '' '?' '?' '' '' '?' 'upgrade required' + # User should run 'svn upgrade' + VCS_INFO_formats '' '?' '?' '' '' '?' 'working copy upgrade required' + return $? + elif (( rc == 1 )) && [[ -n ${(M)dat:#"svn: E${SVN_ERR_WC_UNSUPPORTED_FORMAT}: "*} ]]; then + hook_com=() + # User probably needs to install a newer svn, but we're not sure, so point + # the user to svn's error message. + VCS_INFO_formats '' '?' '?' '' '' '?' 'svn error' return $? else return 1 |