On Thursday 01 January 2004 07:41, Greg Hudson wrote:
> On Mon, 2003-12-29 at 18:38, John Szakmeister wrote:
> > On Saturday 20 December 2003 07:28, John Szakmeister wrote:
> > > if (! strcmp (targetpath, ""))
> > > {
>
> ["If source1 and source2 are files with the same basename, then..."]
>
> > > targetpath = sp1_basename;
> >
> > The current algorithm doesn't always pick the correct target...
>
> I haven't seen the users thread; can you elaborate on that? It would
> seem to depend on what "correct" is.
Take a look at:
http://subversion.tigris.org/servlets/ReadMsg?list=users&msgNo=3816.
In summary, if the URLs point to a directory (i.e., the goal here is merge
changes at a directory level), but that directory happens to have the same
name as a file in that directory and you haven't specified the target
explicitly, then this algorithm fails.
> > 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.
>
> Agreed, but...
>
> > I think this gives users a more reasonable workaround than having to
> > type 'svn merge URL1 URL2 ../name_of_current_directory'.
>
> I'm missing something. If URL1 and URL2 are both files, when would this
> ever produce anything but an error?
The problem is that if the merge fails like it did in user thread, and you
type 'svn merge URL1 URL2 .', the '.' is treated as an implicit target rather
than an explicit one and we try to compute the target of the merge operation
exactly the same way as if we had typed 'svn merge URL1 URL2'. I tend to
think that if I explicity tell you the target of the merge, that's what you
should try to do. Unfortunately, in the case you have to use a command like
'svn merge URL1 URL2 ../name_of_current_directory' to prevent the command
line client from attempting to compute the target of the merge.
> (It certainly seems more appropriate to generate an error on "svn merge
> url-of-file1 url-of-file2 ." than it is to try to merge into
> basename-of-file1, so I agree that it's a bug. But more of an
> "unpredictable behavior in the corner case" bug than a usability bug.)
I guess I see 2 bugs. "svn merge url-of-file1 url-of-file2 ." treat my
explicit target the same as if I had not specified it at all. And I see the
case where the basename of the URL you're using matches the name of a file in
your WC and the target of the merge is the directory, but we erroneously
compute the target as being the file instead of the current directory.
I hope that helps in understanding the problem a little more.
-John
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Jan 1 15:49:30 2004