Re: reviving a git-svn clone

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

 



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.

--
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]