0

I am following this guide On step 2 the clone/checkout just stops with no error. If I rerun the command it stops again. Any idea what is the problem? I have trunk, tags, branches, everything standard for SVN.

EDIT: Is it possible to migrate only the trunk and after that to migrate each branch one by one? If yes please give me a hint or link.

mynkow
  • 4,408
  • 4
  • 38
  • 65
  • does it hang or are you returned to the command line? – Michael Durrant Jan 24 '12 at 12:46
  • I am returning to the command line. I can do fetch and the tool starts checking back the revisions but when it comes to the problematic revision it stops again. Doing the fetch it can return to the command line at random revision several times until it reach the problematic revision. – mynkow Jan 24 '12 at 12:59
  • If I do git svn fetch --ignore-refs 'refs/remotes/' it will skip the problem and continue fetching data from svn, but it will randomly return to the command line. – mynkow Jan 24 '12 at 13:02

2 Answers2

0

Consider just going forward with git.
In that case git init in the directory top level and you are off.
Doesn't keep all the old svn history so this will only be an answer if you don't need that.

Michael Durrant
  • 93,410
  • 97
  • 333
  • 497
  • well, I need all the history. And we are talking about 20000 revisions with 20 branches and 50 tags. :| – mynkow Jan 24 '12 at 12:56
  • Despite the errors, the svn history was there except the history from branches, but we are OK with that. The annoying thing was that I had to be on my PC for 50 hours to press continue. Sad story... – mynkow Feb 09 '12 at 11:57
0

It is absolutely possible to just check out the trunk. From that guide, replace the git clone command with the following, which will pick up the trunk and nothing else:

git svn clone {SVN repository URL} -A authors-transform.txt -T trunk

Note that this drops the --no-metadata option; without the metadata, you won't be able to run a later fetch.

To add other directories later, you'll need to edit the .git/config file. Add one of the following lines to the [svn-remote "svn"] section, depending on what you want to have access to:

  • To add a new single folder (like trunk), add `fetch = {folder path}:refs/remotes/{local branch name}
  • To add a folder of branches (like the normal "branches" folder), add branches = {folder path}/*:refs/remotes/*.
  • To add a folder of tags (like the normal "tags" folder), add tags = {folder path}/*:refs/remotes/tags/*.

Once you've updated the .git/config file, just run git svn fetch again, and it'll pull down the new directories.

That all said, I would recommend just leaving your git svn operation going for a while (ie overnight): git svn initialization can be very slow, particularly if there're a lot of files, commits or large binary files involved.

me_and
  • 15,158
  • 7
  • 59
  • 96