On 06/24/2011 09:07 AM, Stephan Bergmann wrote:
On Jun 23, 2011, at 10:55 PM, Herbert Duerr wrote:
PS: I wonder, was there history lost as part of the past move
to Hg? I had the sense it was preserved, but am now unsure.
History was fully preserved, and full history is very important
if you want to work on the code.
During both the CVS->SVN and the SVN->HG migration only the trunk
got imported and the evolution on the branches was forgotten. Since
all the good branches were merged into trunk anyway no code was
lost, but the history became barely usable, because the work of a
each CWS was merged as one huge patch: e.g.
http://hg.services.openoffice.org/DEV300/rev/3d0fcd312 So
individual commits and their comments were drowned in that big
resulting patch.
History only got fully preserved in the sense that after the
migrations both CVS and SVN servers were still readable but not in
the sense that the conversion result contained the history.
Right, I almost forgot. When SVN merges a branch back into trunk, it
does not reflect the detailed history of the branch in the trunk. As
the branch history is still available in the SVN repository, this is
no real data loss, just a loss in usability (for my taste, at
least).
Which gets me thinking of the next topic, how exactly to import the
current OOo Hg repository into SVN. While Hg has the concept that a
revision can have two parents (so the revision graph need not be
linear), SVN only supports a single parent per revision (so has a
strictly linear graph). Import of Hg into SVN will have to map the
non-linear graph to a linear one. I think an automatic approach
(which is the only feasible one) in general can only work as follows:
Walking backwards from the head (assuming there is only one),
transfer the current revision to SVN and proceed to its first parent
(if there is one; otherwise we reached the bottom and are done).
Since CWS have (hopefully) always been merged into the master as the
second parent of a merge revision (if a merge was necessary), this
will loose the detailed history of most CWS. (And if a CWS ever got
merged as the first parent of a merge revision, and master as second,
we will loose history big time.)
Most of the time the CWS is the second parent. Unfortunately there is no
way that we can rely on that. I'm almost certain that there are cases
where first and second parent are switched.
So from a history-preserving point
of view, moving from Hg to SVN is bad. Or am I missing something?
Actually I wouldn't even try to do it with a history preserving
approach. Just import it flat and have a hg repository on the side for
reference. That way we get rid of all problems regarding
broken/missing/wrong copyrights of old files. If there ever was a time
to do a clean start, it's now. Remember, we did the same thing when we
open sourced OOo back in 2000.
There was some confusion here about what has been preserved over the
last migrations:
2000: import in CVS without StarOffice history.
2008: import of CVS trunk in SVN. I've filtered out all files which were
no longer active (have been deleted in CVS). Filtered out all old
versions of binaries, only the last version has been taken over into
SVN. The filtering reduced the size of the resulting SVN repository from
~90GB to ~7GB if I remember this right. Historical milestone information
has been dropped.
2009: import of SVN trunk in HG. No CWS branch in SVN has been migrated
as Herbert remarked correctly.
Heiner
--
Jens-Heiner Rechtien