dlr@tigris.org writes:
> --- trunk/subversion/libsvn_wc/copy.c (original)
> +++ trunk/subversion/libsvn_wc/copy.c Thu Sep 15 18:55:47 2005
> @@ -516,19 +516,31 @@
> {
> svn_wc_adm_access_t *adm_access;
> svn_node_kind_t src_kind;
> - const svn_wc_entry_t *entry;
> + const svn_wc_entry_t *dst_entry, *src_entry;
> + const char *src_path_dir, *src_path_file;
>
> - SVN_ERR (svn_wc_entry (&entry, svn_wc_adm_access_path (dst_parent),
> + SVN_ERR (svn_wc_adm_probe_open3 (&adm_access, NULL, src_path, FALSE, -1,
> + cancel_func, cancel_baton, pool));
> +
> + SVN_ERR (svn_wc_entry (&dst_entry, svn_wc_adm_access_path (dst_parent),
> dst_parent, FALSE, pool));
> - if (entry->schedule == svn_wc_schedule_delete)
> + SVN_ERR (svn_path_split_if_file (src_path, &src_path_dir, &src_path_file,
> + pool));
> + SVN_ERR (svn_wc_entry (&src_entry, src_path_dir, adm_access, FALSE, pool));
> + if (strcmp (src_entry->repos, dst_entry->repos) != 0)
> + return svn_error_createf
> + (SVN_ERR_WC_INVALID_SCHEDULE, NULL,
> + _("Cannot copy to '%s', as it is not from repository '%s'"),
> + svn_path_local_style (svn_wc_adm_access_path (dst_parent), pool),
> + src_entry->repos);
> + if (dst_entry->schedule == svn_wc_schedule_delete)
> return svn_error_createf
> (SVN_ERR_WC_INVALID_SCHEDULE, NULL,
> _("Cannot copy to '%s' as it is scheduled for deletion"),
> svn_path_local_style (svn_wc_adm_access_path (dst_parent), pool));
As long as we're constructing an error anyway, perhaps it should give
the dst_entry->repos as well, so the user has all the information at
hand?
-Karl
--
www.collab.net <> CollabNet | Distributed Development On Demand
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Sep 20 04:15:30 2005