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.



---
 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