git/list[1] front-page[2] threads[3] people[4] search[5] about
 

git-svn not fetching all revisions

From
Marcus Better <marcus@better.se>
Date
Nov 10, 2009, 18:08 UTC
Message-ID
<4AF9AC1A.5000100@better.se>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,

I have trouble cloning a SVN repository with a somewhat weird history. Its layout has been reorganised, and is currently using a standard layout like this:

  project/
    trunk/
    branches/
    tags/
  otherproject/
    ...

The problem is that the trunk was replaced by a branch at some point. When I do "git svn clone -s svn://host/repo/project" it only fetches the "old" trunk up to the time of the switch, and then stops. Newer revisions of the "new" trunk are not fetched and cannot be seen with "find-rev".

The history of the repo is something like this: Initial layout is
  trunk/
    project/
    otherstuff/
  branches/
Then we had the following sequence:
1. commit stuff to trunk/project/...
2. create "branches/mybranch" from trunk/project
3. some commits on trunk and branches
4. moved trunk/project to branches/old_trunk
5. moved trunk/otherstuff to /otherstuff. /trunk is now empty (***)
6. removed /trunk directory
7. create /project
8. move branches/mybranch to project/trunk
9. commit stuff on project/trunk
(***) last commit seen in clone.

Now step 5 is the last revision that appears in the git svn clone. It shows up as the last commit on remotes/trunk.

Apparently git svn has failed to follow the move from branches/mybranch to trunk. The last commit seen on remotes/mybranch in the clone is from before the move to trunk (step 3).

I have tried replaying the above steps with some variations in a new svn repository, but apparently I'm missing something because I couldn't reproduce the issue. I cannot publish the real svn repo.

I use git and git-svn 1.6.5.2 (Debian amd64 packages).
Cheers,
Marcus
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkr5rBkACgkQXjXn6TzcAQnRZQCgrAsQ72wLw/iWx33lHQHi6Di7 wWkAnioEAxJyM/vr802+vzRXq+ZeWjeA =TW7j -----END PGP SIGNATURE-----

Next: Sam Vilain
Message 1 of 4 in “git-svn not fetching all revisions”
  1. Marcus BetterNov 10, 2009
  2. Sam VilainNov 11, 2009
  3. Marcus BetterNov 19, 2009
  4. Sam VilainNov 20, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.