Pergunta

Note: I've seen questions about this happening with the CLI git/git-svn, but nothing with TortoiseGit.

I downloaded and installed Git and TortoiseGit. I already have a remote SVN repository, and TortoiseSVN installed, if that makes any difference.

After creating an empty directory, I use the right context menu as follows:

  • Git Clone
  • Enter the URL of my SVN repository
  • Enter the local directory I just created
  • Click "From SVN Repository"
  • Deselect Tags and Branch since my SVN repository doesn't have them
  • Leave the From: box unchecked (more on this later)

When I hit OK, a window pops up, says it's connecting to the repository, and it scrolls through all the revisions, up to r 1693, which is my latest. It shows "Success", and my local folder has a .git directory in it. But there are no files.

I've fiddled with it as follows:

  • Fetch
  • SVN Fetch
  • SVN Rebase
  • Pull
  • Change revision number to 0
  • Change revision number to 1
  • Change revision number to my latest

SVN Fetch seems like the obvious choice. When I change the revision number, the Clone operation fails with the message:

git did not exit cleanly (exit code 1) (16078 ms @ 12/16/2013 10:31:27 AM)

I'm going to start fiddling with the CLI, but I suspect I will have the same problems. It's a very basic operation, after all. Your help is appreciated.

Foi útil?

Solução

The problem, for anyone else who sees this, is that I had the "trunk" option checked, but my svn repository was set up in such a way that there was no trunk/ directory at my target. You have to assume things about the way git-svn is determining the path, or look further in the documentation than I reached.

Outras dicas

I had the same symptoms as described though I had a trunk folder in my SVN repository, however it was named 'Trunk' (note the capitalization). When cloning from an SVN repository if you need to specify a trunk directory you must make sure you are specifying the exact (case sensitive) name.

I also encountered this same problem on Linux with a repository that did not follow the SVN folder convention. Basically in theses cases the trunk folder must always be specified, otherwise no files or folders are cloned. In the command line this is made with the -T parameter, e.g.:

 git svn clone file:///home/svn/my_project -T trunk_folder --stdlayout --prefix=origin/ my_project.git
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top