{"thread":{"id":"12329","subject":"git svn: Cannot rebuild rev_map with --rewrite-root","startedAt":"2008-02-26T13:47:48Z","lastAt":"2008-02-26T13:47:48Z","messageCount":1,"participants":["Eric Kidd"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"69993","messageId":"431341160802260547p5b02fa60ka124d636451cae50@mail.gmail.com","threadId":"12329","inReplyTo":null,"subject":"git svn: Cannot rebuild rev_map with --rewrite-root","fromName":"Eric Kidd","fromEmail":"emk.lists@randomhacks.net","sentAt":"2008-02-26T13:47:48Z","receivedAt":"2008-02-26T13:47:48Z","isPatch":false,"sender":{"key":"emk.lists@randomhacks.net","avatar":null},"body":"Good morning! I'm trying to understand git svn's --rewrite-root\nargument, and I'm confused.\n\nIn the following example, I have a Subversion repo named 'foo-svn',\ncontaining a single (empty) project named 'foo'. This project has the\nusual trunk/branches/tags layout, but no content.\n\nWhen I run the following script:\n\n  GIT_SVN_ARGS=\"-s --rewrite-root svn://svn.foo.org/ file://`pwd`/foo-svn/foo\"\n\n  git svn clone $GIT_SVN_ARGS foo1\n  git clone foo1 foo2\n  cd foo2\n  git config --add remote.origin.fetch '+refs/remotes/*:refs/remotes/*'\n  git fetch\n  git svn init $GIT_SVN_ARGS\n  git svn fetch\n\n...it gives me the following error:\n\nUsing higher level of URL:\nfile:///Users/emk/src/git/git-svn-rewrite-root-test/foo-svn/foo =>\nfile:///Users/emk/src/git/git-svn-rewrite-root-test/foo-svn\nRebuilding .git/svn/trunk/.rev_map.6d4f8df3-8fea-4595-8e57-7b909cefc69c ...\nDone rebuilding .git/svn/trunk/.rev_map.6d4f8df3-8fea-4595-8e57-7b909cefc69c\nRebuilding .git/svn/trunk/.rev_map.6d4f8df3-8fea-4595-8e57-7b909cefc69c ...\nDone rebuilding .git/svn/trunk/.rev_map.6d4f8df3-8fea-4595-8e57-7b909cefc69c\nRebuilding .git/svn/trunk/.rev_map.6d4f8df3-8fea-4595-8e57-7b909cefc69c ...\nDone rebuilding .git/svn/trunk/.rev_map.6d4f8df3-8fea-4595-8e57-7b909cefc69c\nRebuilding .git/svn/trunk/.rev_map.6d4f8df3-8fea-4595-8e57-7b909cefc69c ...\nDone rebuilding .git/svn/trunk/.rev_map.6d4f8df3-8fea-4595-8e57-7b909cefc69c\nLast fetched revision of refs/remotes/trunk was r2, but we are about\nto fetch: r2!\n\nYou can find the Subversion repository and the script here:\n\n  http://www.randomhacks.net/tmp/git-svn-rewrite-root-test.tar.gz\n\nOther things I've tried:\n\n 1) If I remove --rewrite-root from GIT_SVN_ARGS, it works fine.\n 2) If I omit the 'git config --add remote.origin.fetch' step, it works fine.\n 3) If I add more revisions to foo/trunk, I get an error of the form:\n\nLast fetched revision of refs/remotes/trunk was $LAST_REV, but we are\nabout to fetch: $FIRST_REV!\n\n 4) The following versions of git-svn all behave the same way:\n\n    git-svn HEAD on MacOS X 10.5\n    git-svn 1.5.3.7 on MacOS X 10.5\n    git-svn 1.5.4 on Cygwin\n\n 5) If I access the Subversion repository using svn+ssh://..., I get\nthe same error.\n\nIf I run 'git svn --version', I get:\n\n    git-svn version 1.5.4.3.220.g99d8e (svn 1.4.4)\n\nAlso, a possibly related error was mentioned here by a user upgrading\nfrom 1.5.3.4.452.g09149 to 1.5.4.1:\n\nhttp://thread.gmane.org/gmane.comp.version-control.git/73661/focus=73664\n\nSo, am I abusing --rewrite-root, and suffering a well-deserved\nfailure? Or is this unexpected behavior?\n\nThank you for any advice you can provide!\n\nCheers,\nEric\n"}]}