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

Problem with branch and merge

From: abcd <abcd_68_at_yahoo.co.uk>
Date: 2005-01-19 14:44:10 CET

All,

I'm new to the list so I apologise in advance if the
question is trivial. I did read the book, especially
sects. 3 (Resolve Conflicts) and 4 (Branching and
Merging), and I did browse the list archive but I'm
stuck anyway.

Problem. At rev. 140 I was faced with a major design
decision. I made up my mind and chose one way, but by
rev. 149 I began to suspect I had made the wrong
decision. So I went back to rev. 140 and created a
branch (called branches/2004-12-22). First revision of

said branch is therefore 150, as confirmed by svn log
--stop-on-copy. Svn diff between trunk@140 and
branches/2004-12-22@150 is naught, as it should be. So

far so good.

I never committed again to trunk, and kept committing
to 2004-12-22 till I reached a major milestone, at
which point I became sure that this (as opposed to
trunk's) was the right way to go. Now I want to bring
everything back to trunk. No major problem apparently,

the manual explains precisely this case (Merging a
Whole Branch to Another, sect. 4).

I've got two doubts:
1. the procedure explained in the book does not
convince me (but again this is probably my
misunderstanding). Why should I check out an *updated*

copy of the trunk (i.e., rev. 149)? I don't want to
(and I never will) incorporate changes from 140 to
149.
 The procedure that looks sensible to me is: check out

rev. 140 and merge from 150 to HEAD. I tried this
several times, does not work. Commit fails (out of
date) on a number of files (I tried individual commits

at random, a few files commit, most don't).

2. So I went the canonical way and applied (my
understanding of) the procedure in the book i.e.:

svn co file:///blah/trunk .
svn merge -r 150:HEAD file:///blah/branches/2004-12-22
.

I got a large number of conflicts that I resolved by
hand. Committed ok and went to sleep. The next day I
realised that svn had merged some files in the strict
sense of the word, "adding" the two files. Probably I
was unlucky enough to have "compatible" changes so svn

found no conflicts and happily merged the two files.
Diff-ing against an export-ed version of HEAD confirms

this. However, clearly this is *not* what I want, I
just want the latest version i.e., the one in HEAD. Of

course I could fix the situation by hand, simply
export-ing HEAD and replacing files by hand but I
refuse to believe that this is the correct way (what
if
 you have two thousand files?). There must be
something
 I'm missing here.

Conceptually what I need is to change all the URLs in
the various .svn dirs from branches/2004-12-22 to
trunk. Of course I refuse to do it by hand. I even
tried svn switch --relocate but that doesn't work
either.

Can anyone help?
Thanks a lot,
Andy

svn version 1.1.1 (r11581)
on linux debian 2.4.26-1-386

        
        
                
___________________________________________________________
ALL-NEW Yahoo! Messenger - all new features - even more fun! http://uk.messenger.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Jan 19 14:49:09 2005

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