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

File ancestry lost in merge

From: Neill <NSSmith2007_at_gmail.com>
Date: Fri, 2 May 2008 17:46:45 -0700 (PDT)

Two large related projects were ported last year from VSS to SVN, and
I manage them with TortoiseSVN. I lost file ancestry info during my
first very use of TSVN Merge, and I don't understand why. I've tried
to carefully follow the online help for TSVN, but I am totally
confused as to what is happening. This is a long post because I can't
figure out a short way to define my problem. The structure of the two
projects is (highly abbreviated)

TJ FM
  | |
  |--TJexe |-- FMexe
  |--TJdll |-- FMlib
  |-- TJlib |-- FMCore
  |-- TJCore

TJCore and FMcore are identical libraries except for two include file
INC1 and INC2 that HAVE to be different between the two projects.
Under VSS any new/modified files were ported back and forth between
TJCore and FMcore using manual copies and manual updates of version
comments at checkin. In essence, FMCore was treated as a development
branch for TJCore, TJCore was treated as a development branch for
FMCore, and I just ping-ponged back and forth between them.

This process was continued under TSVN until a large number of new/
modified files were produced in TJCore last month. At that point I
decided to try TSVN's Merge tool after carefully studying Section
5.17.2. Merging Two Different Trees of the TSVN online help. TJCore
and FMCore were identical except for TJCore's new/modified files and
the two include files INC1 and INC2 that have to be different between
TJCore and FMCore. Following Section 5.17.2 of the online help I
merged TJCore into FMCore treating FMCore as the "trunk" and TJCore as
the "branch" (I did a dry run first), and it seemed to go OK. For one
of the typical MODIFIED TJCore files merged into FMCore -- /FM/FMCore/
DVeh -- I got the following from TSVN Show Log (highly abbreviated)

Revision Actions Message
Path Copy from path
4606 Replacing Merge of all TJCore ... /FM/FMCore/DVeh /TJ/
TJCore/DVeh
3752 Modified Removed INCLUDE ...
1732 Added Port from VSS ...

The corresponding TSVN Show Log for /TJ/TJCore/DVeh was

Revision Actions Message
Path Copy from path
3752 Modified Removed INCLUDE ... /TJ/TJCore/DVeh
1732 Added Port from VSS ... /TJ/TJCore/DVeh

You can see that the log for /FM/FMCore/DVeh clearly shows its
ancestry from the TJCore subproject.

A build of the FM project after the merged failed because the two
include files INC1 and INC2 were now TJCore versions. I reverted INC1
and INC2 back to their FMCore versions, but the FM build failed again
because the modified DVeh file from TJCore wouldn't work with the
FMCore-version INC1 and INC2 files. A slight additional mod to DVeh
fixed it so it would work with either FMCore- or TJCore-versions of
INC1 and INC2. The FM project now would successfully build, and the
TSVN Show Log for /FM/FMCore/DVeh showed

Revision Actions Message
Path Copy from path
4613 Modified Added INCLUDE ... /FM/FMCore/DVeh
4606 Replacing Merge of all TJCore ... /FM/FMCore/DVeh /TJ/
TJCore/DVeh
3752 Modified Removed INCLUDE ...
1732 Added Port from VSS ...

I now needed to put the FMCore-modified DVeh back in TJCore. Since
TSVN doesn't provide single file merging (at least I can't figure out
how to do it), I had to merge FMCore back into TJCore. Again following
Section 5.17.2 of the online help I merged FMCore into TJCore by now
treating TJCore as the "trunk" and FMCore as the "branch". I did a dry
run first, and it indicated that only three files would be merged --
the modified DVeh and INC1 and INC2 as expected. The dry run indicated
that INC1 and INC2 would be merged via Delete/Add while DVeh would be
merged with a Replace. I don't understand the difference here, and I
don't understand why TSVN choose two different methods for merging
these three files from FMCore back into TJCore.

The merge went successfully, and a build of the TJ project failed (as
expected) because the INC1 and INC2 files in TJCore were now FMCore
versions. I reverted INC1 and INC2 to their TJCore versions, and the
TJ project build was now successful.

Sorry for this long post, but we now arrive at the crux of my
confusion. The TSVN Show Log for /TJ/TJCore/DVeh now shows

Revision Actions Message
Path Copy from path
4636 Modified Merge of FMCore ... /TJ/TJCore/DVeh
3752 Modified Removed INCLUDE ... /TJ/TJCore/DVeh
1732 Added Port from VSS ... /TJ/TJCore/DVeh

I EXPECTED it to show

Revision Actions Message
Path Copy from path
4636 Replacing Merge of FMCore ... /TJ/TJCore/DVeh /
FM/FMCore/DVeh
4613 Modified Added INCLUDE ... /FM/FMCore/DVeh
4606 Replacing Merge of all TJCore ... /FM/FMCore/DVeh /TJ/
TJCore/DVeh
3752 Modified Removed INCLUDE ...
1732 Added Port from VSS ...

What happened? Why was the very critical piece of file ancestry at
Revision 4613 where DVeh was modified in /FM/FMCore/ to make it work
with either set of INC files lost on the merge back to /TJ/TJCore/? I
was expecting and planning on file ancestry to be preserved as long as
I used TSVN Merge to ping-pong back and forth between TJCore and
FMCore.

Thanks for your patience on this long post.

Neill

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_tortoisesvn.tigris.org
For additional commands, e-mail: users-help_at_tortoisesvn.tigris.org
Received on 2008-05-03 07:51:10 CEST

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