git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Eric Kidd" <emk.lists@randomhacks.net>
To: git@vger.kernel.org
Subject: git svn: Cannot rebuild rev_map with --rewrite-root
Date: Tue, 26 Feb 2008 08:47:48 -0500	[thread overview]
Message-ID: <431341160802260547p5b02fa60ka124d636451cae50@mail.gmail.com> (raw)

Good morning! I'm trying to understand git svn's --rewrite-root
argument, and I'm confused.

In the following example, I have a Subversion repo named 'foo-svn',
containing a single (empty) project named 'foo'. This project has the
usual trunk/branches/tags layout, but no content.

When I run the following script:

  GIT_SVN_ARGS="-s --rewrite-root svn://svn.foo.org/ file://`pwd`/foo-svn/foo"

  git svn clone $GIT_SVN_ARGS foo1
  git clone foo1 foo2
  cd foo2
  git config --add remote.origin.fetch '+refs/remotes/*:refs/remotes/*'
  git fetch
  git svn init $GIT_SVN_ARGS
  git svn fetch

...it gives me the following error:

Using higher level of URL:
file:///Users/emk/src/git/git-svn-rewrite-root-test/foo-svn/foo =>
file:///Users/emk/src/git/git-svn-rewrite-root-test/foo-svn
Rebuilding .git/svn/trunk/.rev_map.6d4f8df3-8fea-4595-8e57-7b909cefc69c ...
Done rebuilding .git/svn/trunk/.rev_map.6d4f8df3-8fea-4595-8e57-7b909cefc69c
Rebuilding .git/svn/trunk/.rev_map.6d4f8df3-8fea-4595-8e57-7b909cefc69c ...
Done rebuilding .git/svn/trunk/.rev_map.6d4f8df3-8fea-4595-8e57-7b909cefc69c
Rebuilding .git/svn/trunk/.rev_map.6d4f8df3-8fea-4595-8e57-7b909cefc69c ...
Done rebuilding .git/svn/trunk/.rev_map.6d4f8df3-8fea-4595-8e57-7b909cefc69c
Rebuilding .git/svn/trunk/.rev_map.6d4f8df3-8fea-4595-8e57-7b909cefc69c ...
Done rebuilding .git/svn/trunk/.rev_map.6d4f8df3-8fea-4595-8e57-7b909cefc69c
Last fetched revision of refs/remotes/trunk was r2, but we are about
to fetch: r2!

You can find the Subversion repository and the script here:

  http://www.randomhacks.net/tmp/git-svn-rewrite-root-test.tar.gz

Other things I've tried:

 1) If I remove --rewrite-root from GIT_SVN_ARGS, it works fine.
 2) If I omit the 'git config --add remote.origin.fetch' step, it works fine.
 3) If I add more revisions to foo/trunk, I get an error of the form:

Last fetched revision of refs/remotes/trunk was $LAST_REV, but we are
about to fetch: $FIRST_REV!

 4) The following versions of git-svn all behave the same way:

    git-svn HEAD on MacOS X 10.5
    git-svn 1.5.3.7 on MacOS X 10.5
    git-svn 1.5.4 on Cygwin

 5) If I access the Subversion repository using svn+ssh://..., I get
the same error.

If I run 'git svn --version', I get:

    git-svn version 1.5.4.3.220.g99d8e (svn 1.4.4)

Also, a possibly related error was mentioned here by a user upgrading
from 1.5.3.4.452.g09149 to 1.5.4.1:

http://thread.gmane.org/gmane.comp.version-control.git/73661/focus=73664

So, am I abusing --rewrite-root, and suffering a well-deserved
failure? Or is this unexpected behavior?

Thank you for any advice you can provide!

Cheers,
Eric

                 reply	other threads:[~2008-02-26 13:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=431341160802260547p5b02fa60ka124d636451cae50@mail.gmail.com \
    --to=emk.lists@randomhacks.net \
    --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).