You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Daniel Shahaf <d....@daniel.shahaf.name> on 2016/05/11 16:21:42 UTC

Re: Improve svn warning/error message to faciliate troubleshooting

[moving to dev@, please drop users@ on followups]

Cosmere Infahm wrote on Wed, May 11, 2016 at 14:40:53 +0200:
> Could you please improve the warning/error to include the external involved
> so that troubleshooting is easier?

I think this patch will do the trick:

[[[
Index: subversion/libsvn_client/externals.c
===================================================================
--- subversion/libsvn_client/externals.c        (revision 1743389)
+++ subversion/libsvn_client/externals.c        (working copy)
@@ -497,8 +497,10 @@ switch_file_external(const char *local_abspath,
     if (!svn_dirent_is_ancestor(wcroot_abspath, def_dir_abspath))
         return svn_error_createf(
                         SVN_ERR_WC_BAD_PATH, NULL,
-                        _("Cannot insert a file external defined on '%s' "
+                        _("Cannot insert a file external '%s' defined on '%s' "
                           "into the working copy '%s'."),
+                        svn_dirent_local_style(local_abspath,
+                                               scratch_pool),
                         svn_dirent_local_style(def_dir_abspath,
                                                scratch_pool),
                         svn_dirent_local_style(wcroot_abspath,
]]]

I don't have time to check if it passes tests, though.  I'd be glad if
someone else could pick it up...

Cheers,

Daniel
(Finding the code location generating the error message isn't black
magic; I simply grepped subversion/po/de.po for the error message.)

Re: Improve svn warning/error message to faciliate troubleshooting

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Daniel Shahaf wrote on Wed, May 11, 2016 at 16:21:42 +0000:
> Cosmere Infahm wrote on Wed, May 11, 2016 at 14:40:53 +0200:
> > Could you please improve the warning/error to include the external involved
> > so that troubleshooting is easier?
> 
> I think this patch will do the trick:
> 
> [[[
> Index: subversion/libsvn_client/externals.c
> ===================================================================
> --- subversion/libsvn_client/externals.c        (revision 1743389)
> +++ subversion/libsvn_client/externals.c        (working copy)
> @@ -497,8 +497,10 @@ switch_file_external(const char *local_abspath,
>      if (!svn_dirent_is_ancestor(wcroot_abspath, def_dir_abspath))
>          return svn_error_createf(
>                          SVN_ERR_WC_BAD_PATH, NULL,
> -                        _("Cannot insert a file external defined on '%s' "
> +                        _("Cannot insert a file external '%s' defined on '%s' "
>                            "into the working copy '%s'."),
> +                        svn_dirent_local_style(local_abspath,
> +                                               scratch_pool),
>                          svn_dirent_local_style(def_dir_abspath,
>                                                 scratch_pool),
>                          svn_dirent_local_style(wcroot_abspath,
> ]]]
> 
> I don't have time to check if it passes tests, though.  I'd be glad if
> someone else could pick it up...

Filed as https://issues.apache.org/jira/browse/SVN-4633.