From: Chris Shoemaker <c.shoemaker@cox.net>
To: Asheesh Laroia <asheesh@asheesh.org>
Cc: Steven Grimm <koreth@midwinter.com>, git@vger.kernel.org
Subject: Re: [PATCH] Teach git-svn how to catch up with its tracking branches
Date: Thu, 8 May 2008 04:21:41 -0400 [thread overview]
Message-ID: <20080508082141.GB2197@pe.Belkin> (raw)
In-Reply-To: <alpine.DEB.1.00.0805072332300.6948@swallowtail>
On Wed, May 07, 2008 at 11:48:17PM -0700, Asheesh Laroia wrote:
> On Wed, 7 May 2008, Steven Grimm wrote:
>
>> In environments where a lot of people are sharing an svn repository using
>> git-svn, everyone has identical, but individually maintained, tracking
>> branches.
>
> To further muddy the waters, let me talk about my setup, also one with a
> "central git repository" from which all developers clone, and also one
> based on a Subversion tree.
>
> The way I handle it is that, hidden somewhere, I have an account with a
> cron job that does this:
>
> $ git svn fetch
> $ git push origin refs/remotes/*:refs/heads/*
> $ git push origin refs/remotes/trunk:refs/heads/master
>
> The first push synchronizes "origin" to have the same branches as this
> git-svn copy of the git repository, and the second updates "origin" so that
> it has a "master"; without that second step, "git clone" will error out
> when it get to its checkout phase.
This got me thinking about a potential design for a git-svnserver.
[Warning: engineering hack ahead, proceeed with caution.]
Instead of re-implementing any part of svn, just use a stock svn repo
+ server. From the svn post-commit hook, update a git-svn repo as
above. From the git post-commit, do a git-svn rebase. Of course, you
need a shared lock between the two pairs of pre/post commit hooks.
The problem of attribution in svn from git-svn is probably easier to
solve from within the context of a post-commit hook. The problem of
having to round-trip git commits through svn in a way that changes
their ids remains. Effectively, that means commits have to be
considered "unpublished" (for the purpose of not basing other work
upon them) until they are pushed to the git-half of the git+svn.
Still, this scenario is a pretty gentle migration path from svn to git
- one that allows regular git users to use only git-core, not git-svn,
and still allows svn clients to work. Maybe some git-alias magic
could hide the fact that a git push has to really become a push +
fetch.
-chris
prev parent reply other threads:[~2008-05-08 8:22 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-08 1:39 [PATCH] Teach git-svn how to catch up with its tracking branches Steven Grimm
2008-05-08 1:55 ` Junio C Hamano
2008-05-08 2:17 ` Steven Grimm
2008-05-08 1:58 ` Chris Shoemaker
2008-05-08 2:08 ` Steven Grimm
2008-05-08 2:25 ` Chris Shoemaker
2008-05-08 7:38 ` Karl Hasselström
2008-05-08 7:43 ` Karl Hasselström
2008-05-08 7:58 ` Steven Grimm
2008-05-08 8:13 ` Karl Hasselström
2008-05-08 4:19 ` [PATCH v2] " Steven Grimm
2008-05-11 8:27 ` Eric Wong
2008-05-08 6:48 ` [PATCH] " Asheesh Laroia
2008-05-08 7:33 ` Steven Grimm
2008-05-08 7:48 ` Chris Shoemaker
2008-05-08 8:21 ` Chris Shoemaker [this message]
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=20080508082141.GB2197@pe.Belkin \
--to=c.shoemaker@cox.net \
--cc=asheesh@asheesh.org \
--cc=git@vger.kernel.org \
--cc=koreth@midwinter.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).