mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-02 10:01:11 +02:00
45625: vcs_info svn: Detect the "working copy format is too new" error.
This commit is contained in:
parent
cb87816b0f
commit
f207fb90d8
2 changed files with 12 additions and 1 deletions
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue