Hi, Currently the 'svn switch' command attempts to protect users from unintended switches by performing the ancestry check [1]. However, the error message for the unintended switch scenario appears to be incorrect. On my Windows machine, 'svn switch "^/" "C:\Projects\Subversion"' produces the following messages:
[[[ svn: E195012: Path '.' does not share common version control ancestry with the requested switch location. Use --ignore-ancestry to disable this check. svn: E195012: 'http://svn.apache.org/repos/asf' shares no common ancestry with 'C:/Projects' ]]] The path and the separator style in the second message both appear to be incorrect. I've attached a patch that fixes this problem (we should use svn_dirent_local_style instead of svn_dirent_dirname). [1] http://subversion.tigris.org/issues/show_bug.cgi?id=3848 Thanks and regards, Evgeny Kotkov
Properly format the error message during unintended switches. * subversion/libsvn_client/cmdline/switch.c (switch_internal): Use 'svn_dirent_local_style' instead of 'svn_dirent_dirname' when formatting the "no common ancestry" error message. Patch by: Evgeny Kotkov <evgeny.kotkov{_AT_}visualsvn.com>
Index: subversion/libsvn_client/switch.c =================================================================== --- subversion/libsvn_client/switch.c (revision 1499976) +++ subversion/libsvn_client/switch.c (working copy) @@ -239,7 +239,7 @@ switch_internal(svn_revnum_t *result_rev, return svn_error_createf(SVN_ERR_CLIENT_UNRELATED_RESOURCES, NULL, _("'%s' shares no common ancestry with '%s'"), switch_url, - svn_dirent_dirname(local_abspath, pool)); + svn_dirent_local_style(local_abspath, pool)); } wcroot_iprops = apr_hash_make(pool);