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

Re: Common Use-Cases for Merging

From: Joe <svn_at_freedomcircle.net>
Date: 2004-12-23 02:52:12 CET

Christopher Ness wrote:

> On Wed, 2004-22-12 at 18:13 -0500, Joe wrote:
>> [cut]
>>$ cd [trunk working copy directory]
>>$ svn copy file:///svn/repo/trunk/foo.php bar.php
>>$ svn merge ???
>>$ svn commit
>
>
> If I've got this right, the file `bar.php' does not exist in /trunk/ at
> all.
>
> Technically in your second choice I don't think you should have to run
> `svn copy` since `svn merge` is more than just a patch program. It also
> knows about changes to directory structures [aka additions and
> deletions].

I understand quite well that svn merge is more than patch. However, the
problem is what two entities in the repository are to be merged. Since
bar.php doesn't yet exist in the trunk, I believe I must do a copy first
in order to let Subversion know that it is going to be added. For
example, if I try

$ svn merge file:///svn/repo/trunk/foo.php
file:///svn/repo/branches/dev/bar.php bar.php
svn: Use --force to override this restriction
svn: 'bar.php' is not under version control

When I add --force, it still gives me the same error. Here's what I
ended up doing (although I haven't committed yet):

$ svn copy file:///svn/repo/trunk/foo.php bar.php
A bar.php
$ svn merge file:///svn/repo/branches/dev/foo.php_at_9
file:///svn/repo/branches/dev/bar.php_at_10 bar.php
U bar.php

Figuring this out has been very educational. I'm glad that svn info and
svn log -v provided the info necessary to "untangle the mystery".

Regards,

Joe

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Dec 23 02:54:19 2004

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.