git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Raja R Harinath <rharinath@novell.com>
Cc: git@vger.kernel.org
Subject: Re: How to use git-svn to clone from a mirror?
Date: Mon, 4 Jun 2007 19:08:00 +0100 (BST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0706041906570.4046@racer.site> (raw)
In-Reply-To: <85myzfsqji.fsf@blr-RHarinath.blr.novell.com>

Hi,

On Mon, 4 Jun 2007, Raja R Harinath wrote:

> David Kastrup <dak@gnu.org> writes:
> 
> > I have used something like
> >
> > git-svn clone -T trunk -b branches -t tags file:///tmp/rsync-mirror
> >
> > to clone an rsync mirror of an SVN repository.  Now I want to have 
> > fetch revert to pulling from the upstream repository in future. 
> > However, if I change the respective line in .git/config to 
> > svn://the.svn.link/whatever, git-rebase will fetch the right updates, 
> > but then says that it can't work with the objects in the git 
> > repository.
> >
> > Changing the config back will make git-rebase -l work.
> >
> > So what would be the right procedure to shift the SVN source from an
> > rsync mirror to the original, without git-svn breaking?
> 
> I think you'll have to
> 
> -------------8<------------
>   # remove stored revision db, since we're going to change all the commit ids
>   rm .git/svn/git-svn/.rev_db.*
> 
>   # rewrite git-svn-id: lines
>   cg-admin-rewritehist \
> 	--msg-filter \
> 	'sed "s,file:///tmp/rsync-mirror,svn://the.svn.link/whatever,"'
> 
>   # recreate new revision db, and fetch updates, if any
>   git-svn rebase
> -------------8<------------

<shameless plug>
	Or you use the just-rewritten version of it, git-filter-branch.
</shameless>

Ciao,
Dscho

  parent reply	other threads:[~2007-06-04 18:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-02 12:54 How to use git-svn to clone from a mirror? David Kastrup
2007-06-04 15:11 ` Raja R Harinath
2007-06-04 16:55   ` Does git-svn-id need repository path? (Re: How to use git-svn to clone from a mirror?) Jan Hudec
2007-06-04 18:08   ` Johannes Schindelin [this message]
2007-06-05  6:41     ` How to use git-svn to clone from a mirror? David Kastrup
2007-06-05 10:41       ` 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=Pine.LNX.4.64.0706041906570.4046@racer.site \
    --to=johannes.schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=rharinath@novell.com \
    /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).