[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: 301 error on merge

From: John Szakmeister <john_at_szakmeister.net>
Date: 2003-12-30 00:38:25 CET

On Saturday 20 December 2003 07:28, John Szakmeister wrote:
> [snip]
>
> if (! strcmp (targetpath, ""))
> {
> char *sp1_basename, *sp2_basename;
> sp1_basename = svn_path_basename (sourcepath1, pool);
> sp2_basename = svn_path_basename (sourcepath2, pool);
>
> if (! strcmp (sp1_basename, sp2_basename))
> {
> svn_node_kind_t kind;
> SVN_ERR (svn_io_check_path (sp1_basename, &kind, pool));
> if (kind == svn_node_file)
> {
> targetpath = sp1_basename;
> }
> }
> }
>
> It appears we need to do some better checking here, but I'm not sure how to
> proceed with this since it has some impact on how the command line client
> can be used. Therefore, I've moved this to the dev@ list to get some more
> input from other developers. I currently have a small patch that adds an
> explicit target flag to make sure this doesn't happen even if target_path
> is "". The problem is that 'svn merge -r X:Y url::/to/a/file ." will no
> longer work. How does the rest of the community feel about that? Any other
> suggestions on how to fix this problem?

I've looked at this problem a little more, and I've come to the following
conclusion: I think we need to drop support for implicit targets. The
current algorithm doesn't always pick the correct target, and I don't think
that it can always be made to Do The Right Thing, at least not from the
command line client front-end (which is currently where the target is
computed). I've toyed with the idea of moving this process into
svn_client_merge() and I don't think that would be any better. We could at
least verify that the source URLs point to object of the same type as the
target (we should do this anyways) and try a different approach if they don't
match, but I think we'll still end up with the same (or at least similar)
problem. At the very least, I think that if I put '.' as the target for the
merge operation on the command line, that we should treat that as an explicit
target and not try to compute an implicit target. I think this gives users a
more reasonable workaround than having to type 'svn merge URL1 URL2 ../
name_of_current_directory'.

Does anyone else have some input? Should I file an issue for this problem?

-John

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Dec 30 00:18:53 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.