git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* git-svn and migration
       [not found] <320075ff0712190849u2c40cc46pf01fa2a75f557482@mail.gmail.com>
@ 2007-12-19 16:50 ` Nigel Magnay
  2007-12-19 17:54   ` Steven Walter
  0 siblings, 1 reply; 5+ messages in thread
From: Nigel Magnay @ 2007-12-19 16:50 UTC (permalink / raw
  To: git

Hi there!

I've been playing around with git for a while, read the guides to
git-svn and have been successfully using it on my own to track an
upstream svn repository.

Eventually, I'd like us all to switch to git, throw out the svn
server, and replace it with a git repository that can be pushed to,
where commits that pass tests get merged into the master.

But - that's not going to happen overnight. The most likely next steps
are going to be something like migrating a couple of other developers
onto git to test the water, but in the interim most people will still
be on svn.

Has anyone got any tips as I'm sure it's a path trodden before? I've
seen examples of keeping a read-only svn, but that's not really what
I'm after. I'm considering whether to have a central git repo
regularly pull from svn so that it's up to date, and having us
possibly push to svn (or git if it's not merged to trunk) as an
interim step..

Nigel

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

* Re: git-svn and migration
  2007-12-19 16:50 ` git-svn and migration Nigel Magnay
@ 2007-12-19 17:54   ` Steven Walter
  2007-12-19 20:23     ` Miklos Vajna
  0 siblings, 1 reply; 5+ messages in thread
From: Steven Walter @ 2007-12-19 17:54 UTC (permalink / raw
  To: Nigel Magnay; +Cc: git

On Wed, Dec 19, 2007 at 04:50:30PM +0000, Nigel Magnay wrote:
> Has anyone got any tips as I'm sure it's a path trodden before? I've
> seen examples of keeping a read-only svn, but that's not really what
> I'm after. I'm considering whether to have a central git repo
> regularly pull from svn so that it's up to date, and having us
> possibly push to svn (or git if it's not merged to trunk) as an
> interim step..

Using a central git repo that is kept uptodate with svn is the approach
I've used.  git-svn isn't especially keen on this mode of operation,
however.  After every fetch, you have to reset refs/remotes/trunk to
origin/master, which it turn puts .git/svn out of date (you can blow it
away and run "git svn fetch" to regenerate it).

I wrote a script that automates most of this stuff (including doing
incremental additions to git-svn's revdb/revmap).  If there's interest,
I can see about cleaning it up for general consumption.
-- 
-Steven Walter <stevenrwalter@gmail.com>
Freedom is the freedom to say that 2 + 2 = 4
B2F1 0ECC E605 7321 E818  7A65 FC81 9777 DC28 9E8F 

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

* Re: git-svn and migration
  2007-12-19 17:54   ` Steven Walter
@ 2007-12-19 20:23     ` Miklos Vajna
       [not found]       ` <320075ff0712191246r46cd76f7r1d8edc1adf35ae57@mail.gmail.com>
  0 siblings, 1 reply; 5+ messages in thread
From: Miklos Vajna @ 2007-12-19 20:23 UTC (permalink / raw
  To: Steven Walter; +Cc: Nigel Magnay, git

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

On Wed, Dec 19, 2007 at 12:54:47PM -0500, Steven Walter <stevenrwalter@gmail.com> wrote:
> Using a central git repo that is kept uptodate with svn is the approach
> I've used.  git-svn isn't especially keen on this mode of operation,
> however.  After every fetch, you have to reset refs/remotes/trunk to
> origin/master, which it turn puts .git/svn out of date (you can blow it
> away and run "git svn fetch" to regenerate it).

an other problem is that you probably want to have a bare repo while
git-svn needs a working dir. a possible solution:

http://blogs.frugalware.org/vmiklos/2007/12/09/p320

(it works for me fine, but maybe there are problems with it so use with
care :) )

- VMiklos

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

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

* git-svn and migration
       [not found]       ` <320075ff0712191246r46cd76f7r1d8edc1adf35ae57@mail.gmail.com>
@ 2007-12-19 20:47         ` Nigel Magnay
  2007-12-19 21:14           ` Seth Falcon
  0 siblings, 1 reply; 5+ messages in thread
From: Nigel Magnay @ 2007-12-19 20:47 UTC (permalink / raw
  To: git

I was prepared to put up with it not being a bare repository (asides
the extra /.git/ in the URL it's pretty much the same).

On the git host I'd set refs/heads/trunk to be
 ref: refs/remotes/svn/trunk

And I'm hoping that a cron of git svn fetch ; git-update-server-info
will do the trick.  It appeared to keep it in sync when I fetch
downstream. I don't know if I'm being naive though expecting that to
work as I don't grok all that git-svn needs to work properly - but I'm
working on it ;-)

My current plan is for developers to push/pull to git to share amongst
the git-devs, and to push to svn when wanting to share with everyone
else..

[svn user] ---(ci/co)--->[svn] --pull--> [git]
                            ^               ^
                           |               |
                          push          push/pull
                            |               |
                           ---[git user]----




On Dec 19, 2007 8:23 PM, Miklos Vajna < vmiklos@frugalware.org> wrote:
> On Wed, Dec 19, 2007 at 12:54:47PM -0500, Steven Walter < stevenrwalter@gmail.com> wrote:
> > Using a central git repo that is kept uptodate with svn is the approach
> > I've used.  git-svn isn't especially keen on this mode of operation,
 > > however.  After every fetch, you have to reset refs/remotes/trunk to
 > > origin/master, which it turn puts .git/svn out of date (you can blow it
> > away and run "git svn fetch" to regenerate it).
>
> an other problem is that you probably want to have a bare repo while
> git-svn needs a working dir. a possible solution:
 >
> http://blogs.frugalware.org/vmiklos/2007/12/09/p320
>
> (it works for me fine, but maybe there are problems with it so use with
> care :) )
 >
> - VMiklos
 >

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

* Re: git-svn and migration
  2007-12-19 20:47         ` Nigel Magnay
@ 2007-12-19 21:14           ` Seth Falcon
  0 siblings, 0 replies; 5+ messages in thread
From: Seth Falcon @ 2007-12-19 21:14 UTC (permalink / raw
  To: Nigel Magnay; +Cc: git

"Nigel Magnay" <nigel.magnay@gmail.com> writes:

> I was prepared to put up with it not being a bare repository (asides
> the extra /.git/ in the URL it's pretty much the same).
>
> On the git host I'd set refs/heads/trunk to be
>  ref: refs/remotes/svn/trunk
>
> And I'm hoping that a cron of git svn fetch ; git-update-server-info
> will do the trick.  It appeared to keep it in sync when I fetch
> downstream. I don't know if I'm being naive though expecting that to
> work as I don't grok all that git-svn needs to work properly - but I'm
> working on it ;-)
>
> My current plan is for developers to push/pull to git to share amongst
> the git-devs, and to push to svn when wanting to share with everyone
> else..
>
> [svn user] ---(ci/co)--->[svn] --pull--> [git]
>                             ^               ^
>                            |               |
>                           push          push/pull
>                             |               |
>                            ---[git user]----

I suspect having the git users push/fetch only from svn
would be more reliable.  Won't there be problems if git users
do merges and push to the git repo?

Also, seems like it makes the transition more complicateds for git
users since they have to figure out git-svn _and_ the git push/pull.

Perhaps avoid the central git repo until everyone is on git.  Then
people have to learn not to use git-svn and to use push/pull instead.

My $0.02

+ seth

-- 
Seth Falcon | seth@userprimary.net | blog: http://userprimary.net/user/

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

end of thread, other threads:[~2007-12-19 21:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <320075ff0712190849u2c40cc46pf01fa2a75f557482@mail.gmail.com>
2007-12-19 16:50 ` git-svn and migration Nigel Magnay
2007-12-19 17:54   ` Steven Walter
2007-12-19 20:23     ` Miklos Vajna
     [not found]       ` <320075ff0712191246r46cd76f7r1d8edc1adf35ae57@mail.gmail.com>
2007-12-19 20:47         ` Nigel Magnay
2007-12-19 21:14           ` Seth Falcon

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).