On Wed, Jan 30, 2008 at 12:01:41AM +0100, Philippe Bruhat (BooK) wrote:
> On Tue, Jan 29, 2008 at 06:43:58PM +0100, Miklos Vajna wrote:
> > On Tue, Jan 29, 2008 at 05:59:31PM +0100, "Philippe Bruhat (BooK)" <[EMAIL 
> > PROTECTED]> wrote:
> > > I'm looking for tutorials or examples regarding one step migration from
> > > CVS to another SCM, keeping branch/merge history if possible.
> > 
> > if you want to use tailor to convert bnraches, you have to do them one
> > my one, so if you want to even detect branch points, probably you want
> > some other tool.

One consideration that may be worth knowing: I already knew that
tailor was orders of magniture slower than git-cvsimport for a full
repository conversion (and that is not supposed to change until we
implement/use a cvs client that keeps the connexion alive, like
git-cvsimport does).  But what is new to me, is that on my repo at
work, incremental updates with tailor are twice as fast than with
git-cvsimport...


> Finding the branch points doesn't seem too hard (but I'm an optimist),

Yes, it's quite easy if they are tags on the trunk.  There seems to be
some issues with tags on branches not being all converted, though.

Naming tags as branchpoints curently requires the following patch:

--- tailor-0.9.30/vcpx/repository/git/__init__.py     2007-11-06 
12:49:26.000000000 +0100
+++ /usr/lib/python2.4/site-packages/vcpx/repository/git/__init__.py 2008-01-24 
11:12:08.000000000 +0100
@@ -112,7 +103,7 @@
             # initialization of a new branch in single-repository mode
             mkdir(join(self.basedir, self.METADIR))

-            bp = self.runCommand(['rev-parse', self.branch_point])[0]
+            bp = self.runCommand(['rev-parse', '%s^{commit}' % 
self.branch_point])[0]
             self.runCommand(['read-tree', bp])
             self.runCommand(['update-ref', self.branch_name, bp])
             #self.runCommand(['checkout-index'])


> and it seems the merge points have a special log message I should be
> able to detect easily too.

I don't think we have support for mergepoints yet.  See my notes for
future development at
http://progetti.arstecnica.it/tailor/wiki/GitRepository


> What is the proper way to convert a branch? Should I first import the
> whole trunk and then add the branches one by one (and how?), or should I
> import the trunk up to a branch point, then import each changeset in the
> appropriate place?

Here is a sample config I use.  Be aware that 0.9.30 breaks several
things, so you may want to stick to 0.9.29 (or revert commits #1434
and #1447 as shown by trac).


[DEFAULT]
root-directory=/homelocal/ydirson/test/root
patch-name-format=%(firstlogline)s
remove-first-log-line=True
#verbose=True

projects=trunk-pull

#################

[trunk-pull]
source=cvs:myproject
target=git:trunk-in
start-revision=INITIAL
subdir=trunk-in

[v30-pull]
source=cvs:myproject
target=git:v30-in
start-revision=myproject_V3_0_0_HEAD INITIAL
subdir=v30-in

[cvs:myproject]
repository=:ext:gforge:/export/gforge/cvs/myproject
module=myproject

[git:trunk-in]
repository=../myproject-cvs.git

[git:v30-in]
repository=../myproject-cvs.git
branch=v30
#branchpoint=myproject_V3_0_0
branchpoint=759284b01046e0881ebf86c49b5f7ad2b24cd7b6
_______________________________________________
Tailor mailing list
[email protected]
http://lists.zooko.com/mailman/listinfo/tailor

Reply via email to