git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Avery Pennarun <apenwarr@gmail.com>
To: Miles Bader <miles@gnu.org>
Cc: Raymond Auge <raymond.auge@liferay.com>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: are hashes calculated from data
Date: Fri, 2 Apr 2010 00:48:44 -0400	[thread overview]
Message-ID: <y2j32541b131004012148w283911f8pf04a21fc307f68ed@mail.gmail.com> (raw)
In-Reply-To: <buozl1mbi0o.fsf@dhlpc061.dev.necel.com>

On Fri, Apr 2, 2010 at 12:22 AM, Miles Bader <miles@gnu.org> wrote:
> Avery Pennarun <apenwarr@gmail.com> writes:
>> At work, we have a cronjob that basically does most of these steps for
>> us.  Then there's a central git repo that corresponds to the svn repo;
>> people who want to use git can use that repo and not worry about
>> git-svn.
>
> Do you happen to have the cron script available for perusal anywhere?
>
> I imagine many of the details would need to be changed for other
> installations, but just looking at a working concrete example could be
> very helpful...

Unfortunately the particular script we're using is about 99% local
stuff and 1% useful stuff, so posting it won't really help.  The
pseudocode is something like this:

       # configure your git-svn so that all its branches are under remotes/svn/*
       git fetch origin
       git svn fetch --fetch-all
       for each branch in remotes/svn/*
           git checkout remotes/svn/$branch   # detaches HEAD
           git merge --no-ff origin/$branch
           git svn dcommit   # replaces merge commit
           git checkout origin/$branch
           git merge remotes/svn/$branch
           git push origin HEAD:$branch
       git push origin refs/remotes/svn/*:refs/heads/svn/*

And then people who want to push into svn can push into the 'origin'
repository, wherever that may be.  With some tweaking, you could make
the git-svn repo and the origin repo the same.  It's a little annoying
because git-svn absolutely insists on its branches being in
refs/remotes/ somewhere, which means they don't normally get fetched
when other people grab from your repo.

Also consider setting [merge]summary=true in your .gitconfig, so that
the svn commit will have *some* useful information about what got
committed.

Hope this helps.

Avery

  reply	other threads:[~2010-04-02  4:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-02  2:31 are hashes calculated from data Raymond Auge
2010-04-02  2:50 ` Avery Pennarun
2010-04-02  4:22   ` Miles Bader
2010-04-02  4:48     ` Avery Pennarun [this message]
2010-04-02  6:10       ` Peter Baumann
2010-04-02  6:49         ` Avery Pennarun
2010-04-02  7:08           ` Peter Baumann

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=y2j32541b131004012148w283911f8pf04a21fc307f68ed@mail.gmail.com \
    --to=apenwarr@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=miles@gnu.org \
    --cc=raymond.auge@liferay.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).