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

Re: git-svn or git problem...

From
EWEric Wong <normalperson@yhbt.net>
Date
May 22, 2007, 09:16 UTC
Message-ID
<20070522091619.GA17099@muzzle>
In-Reply-To
<86abvylihb.fsf@lola.quinscape.zz>
David Kastrup <dak@gnu.org> wrote:
Show 10 quoted lines
> 
> Hi,
> 
> I have used git-svn for checking out the trunk of a large Subversion
> archive.  The .git subdirectory now sits in the /rep/texlive/trunk
> directory.
> 
> But I actually would now want to have the branches (which are pretty
> small in comparison) available in git as well, without checking the
> whole trunk out again.
> Is there a way to move the .git tracking one directory level upwards
> and get the branches into it as well, without checking out the trunk
> again (the trunk is several Gigabytes of size)?

If you're using a 1.5.1 or later version of git-svn, you can do so pretty easily by editing your .git/config:

If you already have something like:
[svn-remote "svn"]
	# url here is the repository root, and 'mpc/trunk' in fetch
	# is the relative path within the repository
        url = https://svn.musicpd.org
        fetch = mpc/trunk:refs/remotes/git-svn
You can just add the following lines to the config in the above section:
        branches = mpc/branches/*:refs/remotes/*
        tags = mpc/tags/*:refs/remotes/tags/*
If you have something like:
[svn-remote "svn"]
	# url here is the full path of what you're tracking,
        url = https://svn.musicpd.org/mpc/trunk
        fetch = :refs/remotes/git-svn

Change it to something like in the first example (assuming you have read permissions to the repository root).

If recompiling SVN is feasible for you and the branches (as a fresh checkout) are as big as trunk, I highly recommend the do_switch patch for SVN which lets you transfer only a delta between the branch/tag point of trunk:

http://svn.haxx.se/dev/archive-2007-01/0936.shtml
-- 
Eric Wong
Previous: David KastrupNext: Eric Wong
Message 2 of 3 in “git-svn or git problem...”
  1. David KastrupMay 21, 2007
  2. Eric WongMay 22, 2007
  3. do_switch()-enabled SVN binaries for git-svnEric Wong, May 22, 2007

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.