git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: SVN to Git: trunk moved during repository history

From
Bradley Wagner <bradley.wagner@hannonhill.com>
Date
Apr 27, 2010, 19:55 UTC
Message-ID
<v2l2f0f6ced1004271255m6d4a7f70o87be795c87fb66e5@mail.gmail.com>
In-Reply-To
<o2i2f0f6ced1004191418i6a144652sd9ac38b07fb7b661@mail.gmail.com>
So, I tried to clone the repository with this command:
git svn clone -T trunk -t tags/6.x -b branches/6.x <svn_url>/<proj_name>

After it completed, I went it to the .git/config file and added a few more branches/tags from other locations:

[svn-remote "svn"]
        url = https://<svn_url>/<proj_name>
        fetch = <proj_name>/trunk:refs/remotes/trunk
        branches = <proj_name>/branches/{6.x,5.x}/*:refs/remotes/*
        branches = <proj_name>/branches/*:refs/remotes/*
        tags = <proj_name>/tags/{3.7.x,4.x,5.x,6.x,old-releases}/*:refs/remotes/tags/*

Is my syntax even correct? Can I have more than one "branches" property? How do I tell git-svn to re-sync with the latest branch/tag locations?

Thanks!

On Mon, Apr 19, 2010 at 5:18 PM, Bradley Wagner <bradley.wagner@hannonhill.com> wrote:

Show 16 quoted lines
> I'm trying to port an SVN project to Git. We have gone through
> multiple layouts for our SVN repository. It started off with just a
> mainline branch in the root folder. Then we went to the standard
> layout (branches, trunk, tags).
>
> The problem is that when I do a "git svn clone --stdlayout" of the
> repository, it's not picking up any of the revisions from when the
> trunk previously resided in the root directory.
> Is there any way to specify that the trunk had multiple paths the way
> you can specify multiple branch folders with -b flag? What would be
> the best course of action for reporting an SVN repo who's layout had
> changed during its history?
>
> Thanks,
> Bradley
>
Previous: Ulrich Spörlein
Message 5 of 5 in “SVN to Git: trunk moved during repository history”
  1. Bradley WagnerApr 19, 2010
  2. Stephen KellyApr 20, 2010
  3. Bradley WagnerApr 21, 2010
  4. Ulrich SpörleinApr 23, 2010
  5. Bradley WagnerApr 27, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.