[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: Christopher Ness <chris_at_nesser.org>
Date: 2004-12-23 03:42:06 CET

On Wed, 2004-22-12 at 20:52 -0500, Joe wrote:
> $ 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

Bingo! I did the commands below on my test repo. I don't know why svn
didn't create the file on the copy when someone tries to merge a
directory that has a copy in it.

Some of the higher ups might be able to shed some insight as to why the
merge wouldn't create the file. I would assume a delete would of a file
in a branch directory would remove that file.
Maybe it was the fact you ended up renaming the file during the copy.

[nesscg@woman trunk]$ svn cp -r10 foo.c bar.c
A bar.c
[nesscg@woman trunk]$ svn merge -r11:12 ../branch/dev/bar.c
U bar.c

Visually, it looks like this, time is left to right:

                         [changes made]
/branch --------- bar.c@11 ------------------ bar.c@12
              |[copy] |
              | |[merge]

/trunk/ --------- foo.c@10 ------------------------------------
              | |
              |[copy] |
              |-- bar.c@11 -------------------------- bar.c@13

Thanks for the mental gymnastics.
Chris

-- 
Software Engineering IV,
McMaster University
PGP Public Key: http://www.nesser.org/pgp-key/
21:22:56 up 1 day, 9:28, 3 users, load average: 0.08, 0.13, 0.06 
http://www.fsf.org/philosophy/no-word-attachments.html

Received on Thu Dec 23 03:44:34 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.