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

SV: Can't get merge to work as suggested

From: Tomas Sandkvist <tomas.sandkvist_at_protang.se>
Date: 2003-09-03 15:18:09 CEST

Hi Tim!!

I try to merge the branch back to the trunk. I have not been able to get
TortoiseSVN to merge at all, so all operations are performed using SVN line
commands.

These are the files:

1. The trunk file. currently at rev 59

Rad 1 - Changed
Rad 2
Rad 3
Rad 4 - Lagt till
Rad 5

2. The branch file. Currently at rev 53

Rad 1
Rad 2 - additions
Rad 3
Rad 3a
Rad 4
Rad 5
Rad 6

First I tried a diff command:

svn diff c:\svn_repository\projekt_A\trunk\Radtest.txt@59
c:\svn_repository\projekt_A\branches\branch1\Radtest.txt@53

I then get the response:

Index: Radtest.txt
==========================================================
--- Radtest.txt <revision 59>
+++ Radtest.txt <revision 53>
@@ -1,6 +1,7 @@
-Rad 1 - Changed
-Rad 2
+Rad 1
+Rad 2 - additions
 Rad 3
-Rad 4 - Lagt till
+Rad 3a
+Rad 4
 Rad 5
-
+Rad 6
\ No newline at end of file

As far as I can understand this is a correct diff response. It took me some
time to figure out the syntax that would genererate the correct diff between
the trunk and branch, I think this is what you are suggesting in you
response, the [path]@revision format.

Now I do a merge based on the diff command with current directory set to my
working directory for the trunk:

svn merge c:\svn_repository\projekt_A\trunk\Radtest.txt@59
c:\svn_repository\projekt_A\branches\branch1\Radtest.txt@53

Now the response is:

U Radtest.txt

I open the file in the current working directory and the contents are:

Rad 1
Rad 2 - additions
Rad 3
Rad 3a
Rad 4
Rad 5
Rad 6

In fact, the contents of the branch file.

Does this give you any clues? I wonder if I should learn more about diff and
merge in CVS, do you think that would be good for me to understand the
concepts better? It feels like the SVN docs is written for users that
already uses CVS, not for us without experience of that tool.

Regards,
Tomas

-----Ursprungligt meddelande-----
Från: Leeuw van der, Tim [mailto:tim.leeuwvander@nl.unisys.com]
Skickat: den 3 september 2003 14:47
Till: 'Tomas Sandkvist'; users@subversion.tigris.org
Ämne: RE: Can't get merge to work as suggested

Hiya,

Can you show us the exact commands which you are issueing?

I recall having some similar problems, which were due to TSVN giving the
wrong merge-commands.

There are 2 forms of using svn merge - I think that whichever form you're
using you should use the other form ;-) and it might work.

I *think* that what's happening, guessing from my own experience, is that
you're effectively merging the changes between branch-at-point-of-creation
and branch-at-head, and putting the result of that merge into your your
trunk-workingcopy.

So you're not merging the changes between trunk-at-head and branch-at-head.

I hope you follow me - I can't find an easy way to explain it.

With regards,

--Tim

-----Original Message-----
From: Tomas Sandkvist [mailto:tomas.sandkvist@protang.se]
Sent: woensdag 3 september 2003 14:04
To: users@subversion.tigris.org
Subject: Can't get merge to work as suggested

Hi!!

Testing out the merge function to learn how it works. I have created a trunk
and a branch of a simple text file with six lines of text.

When I try to merge the branch into the trunk it is replaced by the contents
of the branch. Any changes I've made to the trunk disapears.

A diff on these two files show all differences as it should.

Feel a bit embaressed not being able to figure this out... As far as I can
see i have done everything by the book, still I can't merge such a simple
example.

Everything runs on my local computer, SVN-0.27 is used.

Regards
Tomas Sandkvist

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Sep 3 15:17:31 2003

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.