Re: git-svn: cloning an SVN repo with sub-branches and sub-tags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



You can make this work, but it is very fragile, doesn't scale well, and it only works on recent versions of git. For example, from the LLVM clang project:

ignore-refs = ^refs/remotes/svn/(Apple|ggreif|misc/Apple/williamson-llvm|misc/Apple/Necropolis|tags/Apple|tags/RELEASE_29|tags/RELEASE_30|tags/checker|tags/cremebrulee)
fetch = cfe/trunk:refs/remotes/svn/trunk
branches = cfe/branches/*:refs/remotes/svn/*
branches = cfe/branches/Apple/*:refs/remotes/svn/misc/Apple/*
branches = cfe/branches/Apple/Necropolis/*:refs/remotes/svn/misc/AppleNecropolis/*
branches = cfe/branches/ggreif/*:refs/remotes/svn/misc/ggreif/*
tags = cfe/tags/*:refs/remotes/svn/tags/*
tags = cfe/tags/Apple/*:refs/remotes/svn/tags2/Apple/*
tags = cfe/tags/RELEASE_29/*:refs/remotes/svn/tags2/RELEASE_29/*
tags = cfe/tags/RELEASE_30/*:refs/remotes/svn/tags2/RELEASE_30/*
tags = cfe/tags/checker/*:refs/remotes/svn/tags2/checker/*
tags = cfe/tags/cremebrulee/*:refs/remotes/svn/tags2/cremebrulee/*



On Mar 29, 2012, at 6:47 AM, Daniel Pocock <daniel@xxxxxxxxxxxxx> wrote:

> 
> 
> 
> I'm trying to use git-svn to clone a repo that has sub-branches and sub-tags
> 
> The SVN layout is like this:
> 
> branches/user1/workitem1
> branches/user1/workitem2
> branches/user2/workitem1
> branches/user2/workitem2
> 
> tags/v1.0
> tags/v1.1
> tags/debian/v1.0-1
> tags/debian/v1.1-1
> tags/debian/v1.1-2
> 
> In git, I would like to have branches with the same names, e.g.
> 
> branches/user1/workitem1
> branches/user1/workitem2
> branches/user2/workitem1
> branches/user2/workitem2
> 
> and tags like this:
> 
> 1.0  (notice I don't want to keep the v1.0, drop the v)
> 1.1
> debian/1.0-1
> debian/1.1-1
> debian/1.1-2
> 
> However, if I run
> 
> git svn clone \
>  -T trunk \
>  -t tags \
>  -b branches \
>  https://flactag.svn.sourceforge.net/svnroot/flactag \
>  flactag-git1
> 
> I don't get any of the branches or tags, and I get numerous warnings like this:
> 
> W: -empty_dir: branches/d_pocock/autotools/HTTPFetch.cc
> W: -empty_dir: branches/d_pocock/autotools/HTTPFetch.h
> W: Cannot find common ancestor between f475b655c10b55b36df8376a396c0d9534418617 and 7e277bfd626a1caa84681e93a7af73e0160eb2eb. Ignoring merge info.
> W: Cannot find common ancestor between f475b655c10b55b36df8376a396c0d9534418617 and a82cd9bd2197a89303558af9aad43fa0c23d1ddb. Ignoring merge info.
> 
> I have the impression that git-svn does not like the repository layout, and it is not clear from the manual page how to make it work.  Can anyone share any advice about this?
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]