Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH 3/3] vcs_info svn: Detect the "working copy format is too new" error.
- X-seq: zsh-workers 45625
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH 3/3] vcs_info svn: Detect the "working copy format is too new" error.
- Date: Thu, 26 Mar 2020 01:32:51 +0000
- In-reply-to: <20200326013251.21505-1-danielsh@tarpaulin.shahaf.local2>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20200326013251.21505-1-danielsh@tarpaulin.shahaf.local2>
---
Functions/VCS_Info/Backends/VCS_INFO_get_data_svn | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_svn b/Functions/VCS_Info/Backends/VCS_INFO_get_data_svn
index 6fbd673a7..786a74dcf 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,8 +23,15 @@ 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
fi
Messages sorted by:
Reverse Date,
Date,
Thread,
Author