From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: zsh-workers@zsh.org
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 [thread overview]
Message-ID: <20200326013251.21505-3-danielsh@tarpaulin.shahaf.local2> (raw)
In-Reply-To: <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
prev parent reply other threads:[~2020-03-26 1:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-26 1:32 [PATCH 1/3] vcs_info: Set $rrn in all backends Daniel Shahaf
2020-03-26 1:32 ` [PATCH 2/3] vcs_info: Deduplicate calling the set-branch-format hook Daniel Shahaf
2020-03-26 1:32 ` Daniel Shahaf [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200326013251.21505-3-danielsh@tarpaulin.shahaf.local2 \
--to=d.s@daniel.shahaf.name \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).