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

Re: Question on branching the right way

From: Sascha Herpers <herpers_at_wiso.uni-koeln.de>
Date: 2006-04-06 07:17:05 CEST


yes, all of what you wrote is clear to me. But I still have the problem
(no matter what direction the merge goes), that parts of the directory
get overwritten, that shouldn't be overwritten.

I guess the main problem is, that I can't explain it good enough. Let's
try it with an example.

In a fresh repository I created a file "text.txt" with one line:
        string myVersion;
I commited it to the trunk and (afterwards) branched it. I added the
following line to the trunk version and committed it again:
        myVersion = "trunk";
Then I switched to the branch and applied and commit a similar change to
the file:
        myVersion = "branch";

Now comes the problem part. I decided to have another variable in both
versions. Since I don't want to make the same change twice, I want to
make it to the trunk and "somehow sync" the branch version.

So I switched to the trunk and added a new line inbetween the two
existing lines:
        int someInt;

Now I call the merge command from tsvn. I specify to merge from branch
to trunk. The unified diff shows the following:
        +int someInt;

        -myVersion = "custom";
        \ No newline at end of file
        +myVersion = "trunk";
        \ No newline at end of file

Ok, my newly added variable "someInt" would be added to the branch. But
the next changes are unwanted. The initialization of myVersion would be
replaced by the trunk version.

All I want to know is, how do I handle this problem? Is this something I
still don't understand, that is trivial to everybody else? Is it
something that can't be done with svn or is it maybe a flaw in my
development process, that could be solved by reorganizing my source code?


    Sascha Herpers
    Universität zu Köln
    Seminar für Supply Chain Management und Produktion
    50923 Köln
    E-Mail: herpers@wiso.uni-koeln.de
    Tel.:   (0221) 4 70 - 37 40
    Fax:    (0221) 4 70 - 51 40
    WWW:    http://www.scmp.uni-koeln.de
To unsubscribe, e-mail: users-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: users-help@tortoisesvn.tigris.org
Received on Thu Apr 6 07:16:03 2006

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