git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Cloning of git-svn repos?
@ 2007-04-18  9:29 Robin H. Johnson
  2007-04-18 17:21 ` Steven Grimm
  2007-04-19 13:03 ` Sam Vilain
  0 siblings, 2 replies; 3+ messages in thread
From: Robin H. Johnson @ 2007-04-18  9:29 UTC (permalink / raw)
  To: Git Mailing List

[-- Attachment #1: Type: text/plain, Size: 775 bytes --]

(This is completely unrelated to my previous posts about using git for
Gentoo, it's not the only placing I'm looking at implementing Git).

Is there a sane and git-recommended way to clone repos created with
git-svn?

If I do: 'git-svn clone ....', and then git-clone of that directory, the
second clone cannot use git-svn to follow the original SVN or feed stuff
back to the original SVN.

If I create them separately (or by plain copying the first one to create
the second), then pulling between them works fine.

The copying just feels messy compared to the initial git-clone
functionality.

-- 
Robin Hugh Johnson
Gentoo Linux Developer & Council Member
E-Mail     : robbat2@gentoo.org
GnuPG FP   : 11AC BA4F 4778 E3F6 E4ED  F38E B27B 944E 3488 4E85

[-- Attachment #2: Type: application/pgp-signature, Size: 321 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Cloning of git-svn repos?
  2007-04-18  9:29 Cloning of git-svn repos? Robin H. Johnson
@ 2007-04-18 17:21 ` Steven Grimm
  2007-04-19 13:03 ` Sam Vilain
  1 sibling, 0 replies; 3+ messages in thread
From: Steven Grimm @ 2007-04-18 17:21 UTC (permalink / raw)
  To: Robin H. Johnson; +Cc: Git Mailing List

Robin H. Johnson wrote:
> Is there a sane and git-recommended way to clone repos created with
> git-svn?
>
> If I do: 'git-svn clone ....', and then git-clone of that directory, the
> second clone cannot use git-svn to follow the original SVN or feed stuff
> back to the original SVN.
>   

There is some git-svn-specific data in the .git directory that isn't 
copied by git clone. You could perhaps get away with just copying that 
(some stuff in .git/config, and the .git/svn subdirectory) into a cloned 
child.

What I usually do instead is make a parent repository with git-svn, then 
clone that as needed. I have a cron job that does "git-svn fetch" in the 
parent periodically, so the child repositories can just update from the 
parent to stay current. When I want to commit to svn, I push to the 
parent repo (be careful here since git-svn can't create non-bare 
repositories, so don't ever push to the currently checked-out branch in 
the parent), git-reset the parent to whatever svn branch I want to check 
into, merge the just-pushed change into the parent's current branch, 
then do my git-svn dcommit.

That workflow could undoubtedly be made simpler. In particular, one 
could use hooks in the parent repository to automatically do the 
reset-merge-dcommit dance. If you had that, then pushing to the parent 
would immediately commit those changes to svn and there'd be little 
reason to want to do svn operations from the cloned children.

-Steve

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Cloning of git-svn repos?
  2007-04-18  9:29 Cloning of git-svn repos? Robin H. Johnson
  2007-04-18 17:21 ` Steven Grimm
@ 2007-04-19 13:03 ` Sam Vilain
  1 sibling, 0 replies; 3+ messages in thread
From: Sam Vilain @ 2007-04-19 13:03 UTC (permalink / raw)
  To: Robin H. Johnson; +Cc: git

Robin H. Johnson wrote:
> (This is completely unrelated to my previous posts about using git for
> Gentoo, it's not the only placing I'm looking at implementing Git).
>
> Is there a sane and git-recommended way to clone repos created with
> git-svn?
>
> If I do: 'git-svn clone ....', and then git-clone of that directory, the
> second clone cannot use git-svn to follow the original SVN or feed stuff
> back to the original SVN.
>   

You need to make sure to clone the remotes/ refs as well.  See
http://utsl.gen.nz/talks/git-svn/intro.html#howto-track-svn

Sam.

> If I create them separately (or by plain copying the first one to create
> the second), then pulling between them works fine.
>
> The copying just feels messy compared to the initial git-clone
> functionality.
>
>   

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-04-19 13:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-18  9:29 Cloning of git-svn repos? Robin H. Johnson
2007-04-18 17:21 ` Steven Grimm
2007-04-19 13:03 ` Sam Vilain

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).