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

Re: Including local changes in one WC in merge to another

From: Brian Buesker <bbuesker_at_qualcomm.com>
Date: 2005-06-02 21:04:48 CEST

Ben Collins-Sussman wrote:

>
> On Jun 2, 2005, at 12:44 PM, Brian Buesker wrote:
>
>> I'm trying to merge changes that have been made in one working copy
>> since a specific revision (including any local changes that have not
>> been committed) to a new working copy using the perl bindings. From
>> reading the documentation for the perl bindings, it was my
>> understanding that I should be able to specify 'WORKING' as the
>> second revision for the merge. In other words, something like:
>>
>> use SVN::Client;
>>
>> my $client = new SVN::Client;
>>
>> $client->merge ('/var/tmp/trunk', 1, '/var/tmp/trunk', 'WORKING',
>> '/var/tmp/trunk-other', 1, 1, 1, 0);
>>
>> However, that does not result in anything being merged. If instead I
>> commit the first working copy, and then specify 'HEAD' as the second
>> revision for the merge, the changes are merged into the second
>> working copy.
>>
>> Is 'WORKING' as a revision not valid for a merge? If it is not
>> valid, is there some way I can do this merge without doing the
>> commit first, or will I always need to do the commit?
>>
>
> Merge takes 3 arguments: 2 URLs, and a working copy to apply the
> difference to.
>
> Merge doesn't have the ability to extract diffs from a working copy;
> it can only ask the server to compare two URLs.
>
> So when you pass two working-copy paths as the first argument to merge
> (), all you're really saying is, "hey server, please compare the two
> URLs of these working copy paths, and send me the differences." It's
> a completely different thing than what you want to do, which is to
> compare some URL with a working copy. Just not possible with merge.

Thanks, that's what I was beginning to suspect. I would have expected
merge to produce an error if I specified WORKING as the revision when
that is not allowed, but apparently it just silently maps it to HEAD.
Not that big of a deal, but it might be nice if merge raised the
$SVN::Error::CLIENT_BAD_REVISION error in this case. That way people
would know right away that WORKING cannot be used. Either that, or an
update to the perl binding documentation section that mentions WORKING
indicating that it cannot be used with merge.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Jun 2 21:07:48 2005

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

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