From: Peter Baumann <waste.manager@gmx.de>
To: Avery Pennarun <apenwarr@gmail.com>
Cc: Miles Bader <miles@gnu.org>,
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 08:10:16 +0200 [thread overview]
Message-ID: <20100402061015.GC14999@m62s10.vlinux.de> (raw)
In-Reply-To: <y2j32541b131004012148w283911f8pf04a21fc307f68ed@mail.gmail.com>
On Fri, Apr 02, 2010 at 12:48:44AM -0400, Avery Pennarun wrote:
> 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.
>
If I understand you correctly, this will commit only the the merge to svn
and won't show all the commits the developer made (because of the --no-ff).
From a SVN standpoint isn't it the same as doing the following?
git checkout remotes/svn/$branch # to deatch the HEAD
git merge --squash origin/$branch
git svn dcommit
I asked because in my workflow I can't to afford lossing the single commits.
Peter
next prev parent reply other threads:[~2010-04-02 6:10 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
2010-04-02 6:10 ` Peter Baumann [this message]
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=20100402061015.GC14999@m62s10.vlinux.de \
--to=waste.manager@gmx.de \
--cc=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).