public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Eric Wong <normalperson@yhbt•net>
To: David Kastrup <dak@gnu•org>
Cc: git@vger•kernel.org
Subject: Re: git-svn or git problem...
Date: Tue, 22 May 2007 02:16:19 -0700	[thread overview]
Message-ID: <20070522091619.GA17099@muzzle> (raw)
In-Reply-To: <86abvylihb.fsf@lola.quinscape.zz>

David Kastrup <dak@gnu•org> wrote:
> 
> 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

  reply	other threads:[~2007-05-22  9:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-21  7:54 git-svn or git problem David Kastrup
2007-05-22  9:16 ` Eric Wong [this message]
2007-05-22  9:36   ` do_switch()-enabled SVN binaries for git-svn Eric Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070522091619.GA17099@muzzle \
    --to=normalperson@yhbt$(echo .)net \
    --cc=dak@gnu$(echo .)org \
    --cc=git@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox