1

I'm trying to clone a Subversion repository with:

git svn clone svn://adress/repo --stdlayout

I get a error around r119:

error

I tried to checkout branches/Mikael at r119, and TortoiseSVN tells me that it does not exist.

If I look at the log I can see:

119 : /branches/Mikael added (en empty folder)
120 : /branches/Mikael deleted
121 : /branches/Mikael/file.txt added

What can I do?

Edit: I tried with other versions of Git, 1.7.8, 1.7.9, 1.7.10 and 1.7.11, starting from nothing and with the same command, they all failed at r119 for the same reason.

Will
  • 24,082
  • 14
  • 97
  • 108
Heetola
  • 5,791
  • 7
  • 30
  • 45
  • Seems like `git-svn` bug. Have you tried with the newest version `git-svn`? – FooF Sep 27 '12 at 09:47
  • I'm using the git bash from mySisGit-1.7.11 – Heetola Sep 27 '12 at 09:49
  • I tried `git diff v1.7.11..master git-svn.perl` in my cloned `git` source tree, and the diff is over 3500 lines of text (much of it due to `git-svn` being modularized, moving a lot of stuff to reusable modules since version 1.7.11 - there are many `uses Git:SVN:xxx` clauses now). – FooF Sep 27 '12 at 09:59
  • just tried with git 1.7.8, 1.7.9, 1.7.10, same thing =c (may be because I took back from where I was) – Heetola Sep 27 '12 at 10:18
  • 1
    I would suggest giving a newest `git-svn` a chance, and updating your question about the success. The modularization of `git-svn` would suggest that there is some intention for updating the `git-svn` in some significant way. Maybe git mailing list could also help, if the newer `git-svn` is not up to the task either. If getting the newest (`git clone`d) `git` / `git-svn` working in Windows is too much trouble, maybe you could use Linux for this test (e.g. run in a virtual machine). – FooF Sep 27 '12 at 10:29
  • I think the problem is caused by case-sensivity (mikael<->Mikael) --- SVN is case-sensitive, Git is not (if the filesystem is not case-sensitive). You may try to clone a revisions range that includes only one of these branches or use server-side translation tools. – Dmitry Pavlenko Sep 27 '12 at 10:44
  • I tried a "git svn clone svn://adress/repo --stdlayout" it's still bugging at the same step. @Dimitry, my bad, I wrote mikael but it's Mikael – Heetola Sep 27 '12 at 12:21

1 Answers1

0

Try with --preserve-empty-dirs, since it's clear that the dir was empty. Also, git svn has improved quite a bit in recent times; I ran into a problem that still existed in 2.2.x, worked with the developers and applied a patch, then it was fixed in late-2.2.x (IIRC). Another thing to keep in mind, is that git expects to be operating on a case-sensitive filesystem (well, if the SVN repo was hosted on a case-sensitive filesystem, at least--case-sensitive is always the safe bet). So if you're on Windows or Mac, you may need to create a case-sensitive filesystem, or just do the conversion on a linux machine or in a VM. If you're logged changes to that branch, showing it was deleted and then modified, your SVN repo might somehow be corrupted. You may need to skip the revision where it was deleted. If you've tried everything else, and want to try skipping a revision, see this post.

Community
  • 1
  • 1
Will
  • 24,082
  • 14
  • 97
  • 108