git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Josef Wolf <jw@raven.inka.de>
To: git@vger.kernel.org
Subject: Re: git-svn and repository hierarchy?
Date: Fri, 27 Feb 2009 18:12:48 +0100	[thread overview]
Message-ID: <20090227171248.GB14187@raven.wolf.lan> (raw)
In-Reply-To: <49A50EB2.80300@drmicha.warpmail.net>

On Wed, Feb 25, 2009 at 10:26:10AM +0100, Michael J Gruber wrote:
> Josef Wolf venit, vidit, dixit 24.02.2009 23:34:

> > I have set up a repository hierarchy like this:
> > 
> > 
> >          subversion-repos
> >                 |
> >            git-svn-repos
> >           /     |     \
> >       clone1  clone2  clone3
>
> Recent enough git should even warn you against doing that, "that" being
> pushing into checked out branches.

I've now tried to synchronize via pull instead of push, but I still
get conflicts.

> Your diagram above is missing important info, namely which branches you
> are pushing into. But the problem indicates that you are pushing into a
> checked out branch.

In order to get a better understanding what's going on, I've written a
small script which can be copy-pasted into some terminal window:

(
  set -ex

  # create test directory
  #
  TESTDIR=`mktemp --tmpdir=. git-svn-hierarchy-test-XXXXXXXX`
  rm -rf $TESTDIR
  mkdir -p $TESTDIR
  cd $TESTDIR

  SUBVERSION_REPOS=file://`pwd`/subversion-repos

  # create subversion repos with some history
  #
  svnadmin create subversion-repos
  svn -m "create standard layout" mkdir \
      $SUBVERSION_REPOS/trunk \
      $SUBVERSION_REPOS/branches \
      $SUBVERSION_REPOS/tags
  svn co $SUBVERSION_REPOS/trunk subversion-wc
  echo change1 >>subversion-wc/test
  svn add subversion-wc/test
  svn ci -m "commit 1" subversion-wc

  # create git-svn-repos
  #
  git svn init --stdlayout $SUBVERSION_REPOS git-svn-repos
  (cd git-svn-repos; git svn fetch)

  # create a clone and do some work on it
  #
  git clone git-svn-repos clone1
  for i in 2 3 4; do
    ( cd clone1; echo change$i >>test ; git commit -a -m "commit $i")
  done

  (cd git-svn-repos; git pull ../clone1)
  (cd git-svn-repos; git svn rebase)
  (cd git-svn-repos; git svn dcommit)
  (cd git-svn-repos; git pull ../clone1)  # if this line is executed,
  (cd git-svn-repos; git svn rebase)      # this command gives the conflict
)

When I comment out the second "git pull ../clone1", the conflict does
not happen on the last "git svn rebase", but on some later pull, rebase
or dcommit command.

Obviously, I'm doing something wrong.  But I can't figure what.  Any hints?

  parent reply	other threads:[~2009-02-27 17:22 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 [this message]
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
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=20090227171248.GB14187@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).