git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sam Vilain <sam@vilain.net>
To: martin f krafft <madduck@madduck.net>
Cc: git discussion list <git@vger.kernel.org>
Subject: Re: reviving a git-svn clone
Date: Tue, 21 Apr 2009 18:51:52 +1200	[thread overview]
Message-ID: <1240296712.3424.8.camel@maia.lan> (raw)
In-Reply-To: <20090420104316.GA11433@lapse.rw.madduck.net>

On Mon, 2009-04-20 at 12:43 +0200, martin f krafft wrote:
> I am now trying to revive the clone, but git-svn remains "unable to
> determine the upstream SVN information from the working tree
> history". This baffles me.
> 
> Here are my steps:

> -8<--8<--8<-
> alioth:~|master|% git clone /git/collab-maint/hibernate.git hibernate-svnsync
> Initialized empty Git repository in /srv/alioth.debian.org/chroot/home/users/madduck/hibernate-svnsync/.git/
> 
> alioth:~|master|% cd hibernate-svnsync
> 
> alioth:~/hibernate-svnsync|master|% git branch --no-track upstream origin/upstream
> 
> alioth:~/hibernate-svnsync|master|% cat >> .git/config <<_eof
> heredoc> [svn-remote "svn"]
> heredoc>        url = svn+ssh://svn.suspend2.net/svn/hibernate-script
> heredoc>        fetch = trunk:refs/remotes/upstream/trunk
> heredoc>        branches = branches/*:refs/remotes/upstream/*
> heredoc>        tags = tags/*:refs/remotes/upstream/tags/*
> heredoc> _eof

for git-svn to resume, it needs the refs all in the right place.  If you
clone a git-svn repository they will be in the wrong place.

eg for this use case something like this to copy the
refs/remotes/origin/* refs to refs/remotes/upstream/*:

  git for-each-ref --format="%(refname)" refs/remotes/origin/* |
     perl -le '$x = $_; $x =~ s{origin}{upstream};
       system "git update-ref $x $_"'

It's a bit hard to test without access to the upstream svn!

Good luck,
Sam.

  reply	other threads:[~2009-04-21  6:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-20 10:43 reviving a git-svn clone martin f krafft
2009-04-21  6:51 ` Sam Vilain [this message]
2009-04-21  8:14   ` martin f krafft
2009-04-21  9:09   ` Deskin Miller
2009-04-21 11:58     ` martin f krafft
2009-04-21 17:06       ` switching a git-svn clone to a different URL (was: reviving a git-svn clone) martin f krafft

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=1240296712.3424.8.camel@maia.lan \
    --to=sam@vilain.net \
    --cc=git@vger.kernel.org \
    --cc=madduck@madduck.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).