From: Josef Wolf <jw@raven.inka.de>
To: git@vger.kernel.org
Subject: Re: git-svn and repository hierarchy?
Date: Fri, 6 Mar 2009 17:10:26 +0100 [thread overview]
Message-ID: <20090306161026.GA14554@raven.wolf.lan> (raw)
In-Reply-To: <eaa105840903051148s3515e8b7x9d7b8f9be12da735@mail.gmail.com>
On Thu, Mar 05, 2009 at 02:48:14PM -0500, Peter Harris wrote:
> On Thu, Mar 5, 2009 at 1:05 PM, Josef Wolf wrote:
> >
> > Well, actually it allows the changes for a very limited user group (that
> > is: only me 8-). While I agree that author/date should not be changed,
> > I like to be able to fix silly typos in the log. After all, we all do
> > typos now and then ;-)
>
> True, but in my experience it happens considerably less often with
> git. I find and fix most of my typos when reviewing my change-set
> before doing a "git push" or "git svn dcommit".
So you are rewriting yourself but not accept rewrites by svn ;-)
> > Maybe there's room for more improvement: Since the merge is done on a
> > scratch branch anyway, why not letting the clones _push_ into branches
> > with random names: cloneX-`uuidgen` or something. So the clones could
> > do the push whenever they have net access. The actual merge can be done
> > completely decoupled from the push operation.
>
> Indeed. Or even not-so-random names, such as cloneX/topic-name if you
> prefer.
That would have the risk of multiple clones pushing to the same branch.
I am not sure I am prepared to resolve such conflicts (yet). But you
are right, the branch name should contain the topic-name. So here's my
current favorite of the workflow:
# work on clone
#
(
cd clone$clone
# first move commits from subversion to clone
#
git checkout master
git pull --rebase
# do some work
#
git checkout -b topic-branch
for commit in 1 2 3; do
echo change $clone $commit >>test
git commit -a -m "commit $clone $commit"
done
# push the work
#
git push ../git-svn-repos topic-branch:clone-topic-branch-`uuidgen`
git checkout master
git branch -D topic-branch
)
# Integrate commits from clones an move them to subversion
#
(
cd git-svn-repos
for scratch in `git branch | grep ' clone-'` ; do
# merge client's work
#
git checkout $scratch
git svn rebase trunk
# resolve possible conflicts
#
grep change test >test.resolved
if diff test test.resolved ; then
rm test.resolved
else
mv test.resolved test
git add test
git commit -m "merge"
git rebase --skip
fi
# sync with svn repository
#
git svn dcommit
git checkout master
git svn rebase -l # fast-forward master to where scratch is
# clean up
#
git branch -d $scratch
done
)
Does that look sane?
The benefit is that work on clones and work on git-svn-repos is
decoupled.
next prev parent reply other threads:[~2009-03-06 16:15 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-24 22:34 git-svn and repository hierarchy? Josef Wolf
2009-02-25 9:26 ` Michael J Gruber
2009-02-25 23:24 ` Josef Wolf
2009-02-26 1:02 ` Peter Harris
2009-02-27 16:58 ` Josef Wolf
2009-02-27 18:11 ` Peter Harris
2009-02-27 23:58 ` Josef Wolf
2009-02-28 2:41 ` Peter Harris
2009-02-27 17:12 ` Josef Wolf
2009-02-27 17:45 ` Michael J Gruber
2009-02-27 22:05 ` Josef Wolf
2009-02-28 17:59 ` Michael J Gruber
2009-03-03 18:51 ` Josef Wolf
2009-03-03 19:35 ` Peter Harris
2009-03-03 22:36 ` Josef Wolf
2009-03-04 0:18 ` Peter Harris
2009-03-04 19:27 ` Josef Wolf
2009-03-04 22:06 ` Peter Harris
2009-03-05 18:05 ` Josef Wolf
2009-03-05 19:48 ` Peter Harris
2009-03-06 16:10 ` Josef Wolf [this message]
2009-03-06 16:58 ` Peter Harris
2009-03-06 17:57 ` Josef Wolf
2009-03-08 20:33 ` Florian Mickler
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=20090306161026.GA14554@raven.wolf.lan \
--to=jw@raven.inka.de \
--cc=git@vger.kernel.org \
/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).