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

[TSVN] RESOLVED: TSVN Merge issue vs. "Feature Branches" in SVN book

From: Dave Peterson <dpeterson_at_enthought.com>
Date: 2005-01-13 21:51:28 CET

Dave Peterson <dpeterson <at> enthought.com> writes:

> > Can you give us a reproduction recipe?
>
> I will get back to you on that one (as soon as I finish reading the rest of the
> replies to my post.)

So I've spent the last couple hours or so playing around with TSVN merge and SVN
merge. My abbreviated story follows -- sorry that it is long, but I want to be
accurate with my descriptions.

BTW, IT WORKS! I had a problem with what I was doing rather than there being a
bug in TSVN. If you're interested in the SHORT SUMMARY just skip to the bottom.

1) Created the following structure and added it to an existing SVN repository as
revision #112.

   -+ mergetest
    |
    +--+ trunk
    | |
    | +--- existingfile1.txt
    | |
    | ---+ existingdir
    |
    +--+ branches

2) Created a branch off the ...mergetest/trunk using TSVN's Branch/Tag command.
 My "To URL" was "....mergetest/branches/dmp". This was revision #113.

3) Commited changes (revision #114) to the trunk to make it look like:

   -+ mergetest/trunk
    |
    +--- existingfile1.txt ** modified in this revision **
    |
    +--- newfile1.txt ** new in this revision **
    |
    +--+ existingdir
    | |
    | ---- newfile2.txt ** new in this revision **
    |
    +--+ newdir ** new in this revision **
       |
       ---- newfile3.txt ** new in this revision **

4) Commited change (revision #115) to the "dmp" branch to make it look like:

   -+ mergetest/branches/dmp
    |
    +--- existingfile1.txt
    |
    +--- newfile4.txt ** new in this revision **
    |
    ---+ existingdir

5) Merged changes in trunk down into the "dmp" branch using TSVN's Merge...
command against the "dmp" folder. Set "From:" to ....mergetest/trunk and the
revision # to 113. The "To:" was left at 'Use "From:" URL' and the Head Revision
radio button was selected. Committed the result to the dmp branch as revision
#116.

6) Commited change (revision #117) to the "dmp" branch to make make it now look
like:

   -+ mergetest/trunk
    |
    +--- existingfile1.txt ** modified in this revision **
    |
    +--- newfile1.txt
    |
    +--- newfile4.txt
    |
    +--+ existingdir
    | |
    | +--- newfile2.txt
    | |
    | ---- newfile5.txt ** new in this revision **
    |
    +--+ newdir
       |
       ---- newfile3.txt

At this point, I did a dry run at a command prompt with the local working copy
of the trunk as the current directory as follows:
   svn merge --dry-run ...mergetest/branches/dmp ...mergetest/trunk
This resulted in a list of changes matching the 3 files I had modified in my
branch.

I then attempted the same thing using TSVN's Merge... command. I set the
"From:" to the url ....mergetest/branches/dmp and the head revision. I set the
"To: to the url ...mergetest/trunk and the head revision. And I selected the
"Dry Run" checkbox. I got back a list of changes that included EVERYTHING that
had been changed in either the trunk or branch since revision #113. Uh oh.

BUT THEN I tried to do both without the dry run switch and found that neither
SVN nor TSVN would actually make any changes to the local working copy of the
trunk. What the?!?! Oh wait, I'm a moron - the command line changes all said
"skipping" so it must be the diff being calculated between the trees is going
the wrong way.

Well, it turns out that once I swapped my URLs so that "From" was
...mergetest/trunk and "To" was ...mergetest/branches/dmp, things appear to be
working. Yes, TSVN lists more changes in its pop-up then does the command line
(as Stefan said it would), but once that finishes and you do a "Check for
Modifications", the only listed changes to your working copy are those that were
committed to the branch. Sweet!

--------------
SHORT SUMMARY:
--------------
In short, it works. When promoting from the feature branch to the trunk I just
needed to swap my "From" and "To" urls so that "From" was the trunk and "To" was
the feature branch. The target path is always the local working copy of the
trunk. This was necessary no matter whether I was using TSVN or SVN.

Sorry for the false alarm.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Thu Jan 13 21:58:29 2005

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.