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

Re: svn commit: rev 2409 - trunk/subversion/include trunk/subversion/libsvn_client trunk/subversion/clients/cmdline trunk/subversion/tests/clients/cmdline trunk/subversion/tests/clients/cmdline/svntest

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2002-07-04 08:35:53 CEST

sussman@tigris.org writes:

> Author: sussman
> Date: Thu, 04 Jul 2002 01:20:05 -0500
> New Revision: 2409
>
> Fix issue #748: "svn merge only happens in '.' "
>
> 'svn merge' now actually pays attention to the third argument:
>
> svn merge source1@X source2@Y [wc-target]
> or svn merge -rX:Y source [wc-target]

By the way, there is a special-case "nice" behavior that Karl and I
discussed, that we probably still need to implement in 'svn merge'.

The general form of 'svn merge' is

   'svn merge source1 source2 wc-target'

Typically, all three arguments are of the same node_kind... either all
files or dirs. If there are any mismatches, we'll most certainly get
an error. (For example, how can you diff a file and a dir? Or how
can you merge the diffs of two dirs into a file?)

But in this *one* special case, if I cd into libsvn_wc and run

   'svn merge -rX:Y update_editor.c'

Then it's obvious what I want to happen; at the moment, I'll get an
error because it's trying to merge the diffs between two files into a
default "." target. But instead, it *should* be intelligently trying
to locate the basename of the two sources within ".", and then apply
the diffs to that.

Here's a summary of behaviors in table form:

source1 source2 target behavior

fileX fileY fileZ apply diffs to fileZ
fileX fileX fileZ same.
dirA dirB dirC apply diffs within dirC
dirA dirA dirC same.

fileX fileY dir error.
dirA dirB file error.
file dir -- error.
dir file -- error.

fileX fileX dir ** try to apply diffs to dir/basename(fileX)

So the new special rule would be:

      if the sources are both the same file and wc-target is a dir,
         look for the sources' basename within target:
            apply diffs to *that*.
         else:
            error.

I'll file a bite-sized issue on this. In the meantime, people will
have to be a tad over-specific to get the behavior they want:

   'svn merge -rX:Y update_editor.c update_editor.c'

Not a showstopper or anything, just very picky. :-)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Jul 4 08:42:03 2002

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.