Re: How to use git-svn to clone from a mirror?

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

 



Hi,

David Kastrup <dak@xxxxxxx> writes:

> Hi, I seem to be too stupid to get this right.
>
> 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<------------

- Hari

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

  Powered by Linux