Re: A little suggestion about ASM Project
Oliver Horn <[email protected]> Mon, 24 Apr 2017 13:17:00 +0200
| Newsgroups | gmane.comp.java.objectweb.asm |
|---|---|
| Message-ID | <CAKtP5vPDsKRAxD44LPGsyfrbExWWqYQEyF5JbRhqBNHyj6=ROw@mail.gmail.com> |
Hi Remi,
> BTW, here there is a hero that understand svngit in depth,
> our current configuration script is
> [svn-remote "svn"]
> url = svn://svn.forge.objectweb.org/svnroot/asm
> fetch = trunk:refs/remotes/svn/trunk
> branches = branches/*:refs/remotes/svn/branches/*
> tags = tags/*:refs/remotes/svn/tags/*
> but the branches of the resulting git repo are all the same :(
Your configuration maps the whole trunk against a single branch. But
your trunk contains several sub-project folders (asm, asmdex etc.).
Do you really want one single big Git repository containing all your
sub-projects? This isn't the best approach for Git. Several
repositories would fit better. Especially since each of your svn
branches and tags covers only one sub-project.
Second, the structure of your branches and tags folders is
inconsistent: A lot of branches/tags contain the named subfolder for
the sub-project in question. E.g. ASM_6_FUTURE and ASM_6_0_ALPHA
contain the "asm" subfolder. But some branches/tags like ASM_5_FUTURE
and ASM_5_2 lack the intermediate subfolder. They contain the
sub-project files directly.
The following configuration should cope with both scenarios. However,
please note that this solution maps exactly one sub-project. So it
will not help if you want to convert all sub-projects into a single
Git repository.
# Map trunk sub-project
fetch = trunk/asm:refs/remotes/svn/trunk
# Map branches and tags with sub-project folder
branches = branches/*/asm:refs/remotes/svn/*
tags = tags/*/asm:refs/remotes/svn/tags/*
# Map branches and tags without intermediate folder by enumerating them
branches = branches/{ASM_4_FUTURE_2,ASM_5_FUTURE,VALHALLA_VALUETYPE,invokedynamic}:refs/remotes/svn/*
tags = tags/{ASM_3_2,ASM_4_2,ASM_5_0_3,ASM_5_2,ASM_4_1,ASM_5_1,ASM_5_0_ALPHA,ASM_5_0_1,ASM_4_0,ASM_4_0_RC2,ASM_3_3,ASM_5_0_4,ASM_3_3_1,ASM_3_3_2,ASM_5_0,ASM_5_0_2,ASM_5_0_BETA,ASM_4_0_RC1}:refs/remotes/svn/tags/*
I hope this will help.
PS: As Benoit pointed out, git-svn is maybe not the best choice for
migrating from SVN to Git. If you are open to alternatives, I've had
a good experience with reposurgeon
(http://www.catb.org/esr/reposurgeon/).
Best regards,
Oliver
--
You receive this message as a subscriber of the [email protected] mailing list.
To unsubscribe: mailto:[email protected]
For general help: mailto:[email protected]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws