git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Harris <git@peter.is-a-geek.org>
To: Josef Wolf <jw@raven.inka.de>, git@vger.kernel.org
Subject: Re: git-svn and repository hierarchy?
Date: Tue, 3 Mar 2009 14:35:28 -0500	[thread overview]
Message-ID: <eaa105840903031135o4cf72ed0oe3fffed69cb7ce03@mail.gmail.com> (raw)
In-Reply-To: <20090303185108.GA11278@raven.wolf.lan>

On Tue, Mar 3, 2009 at 1:51 PM, Josef Wolf wrote:
>  # work on clones, pull work into git-svn-repos when we're done
>  #
>  for clone in 1 2 3; do
>    (
>      cd clone$clone
>      git pull --rebase
>      for commit in 1 2 3; do
>        echo change $clone $commit >>test
>        git commit -a -m "commit $clone $commit"
>      done
>    )
>    (cd git-svn-repos; git pull --rebase ../clone$clone)
>  done

Um. This has each clone basing their commits on the work of some other
clone. This line, specifically:

>    (cd git-svn-repos; git pull --rebase ../clone$clone)

breaks the "git-svn-repos only ever pulls from subversion" model I
suggested elsewhere.

Also, this line says "rebase my changes onto those of ../clone$clone",
which isn't what you want. It will end up rebasing svn commits that
the client didn't have on top of the client's commits, and will break
git-svn's index. Don't use --rebase here.

>  # Although we have resolved the conflict, spurious conflicts are
>  # propagated to the clones

...and this is because you had clones all merge from each other (via
git-svn-repos) *before* the changes were in svn.

Worse, since the git clients don't know that their work has been
rebased, they can wind up conflicting with themselves too. Which is
why I suggested "git svn dcommit" from each client, not from the
central repository.

This can be made work if you do something more like (untested):
    (cd git-svn-repos; git pull ../clone$clone topic-branch;
    git svn dcommit)
    (cd clone$clone; git checkout master; git pull;
    have a human verify that changes to master are correct;
    git branch -D topic-branch)

instead of

>    (cd git-svn-repos; git pull --rebase ../clone$clone)

ie. throw away each topic branch as you push it to git-svn-repos, and
take the changes that have gone through git-svn back via a pull of
master.

But that starts to look to me like more work for each clone than "git
svn dcommit" - YMMV, of course.

Peter Harris

  reply	other threads:[~2009-03-03 19:37 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 [this message]
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
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=eaa105840903031135o4cf72ed0oe3fffed69cb7ce03@mail.gmail.com \
    --to=git@peter.is-a-geek.org \
    --cc=git@vger.kernel.org \
    --cc=jw@raven.inka.de \
    /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).