1

I need to convert large svn repo into git. I run git svn clone, it works about 30 hours, and then this error occurs:

fatal: update_ref failed for ref 'refs/remotes/svn/trunk@26379------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------': cannot lock ref 'refs/remotes/svn/trunk@26379------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------': Unable to create '/usr/local/svn2git_branches/repo/.git/refs/remotes/svn/trunk@26379------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------.lock': File name too long
update-ref -m r23592 refs/remotes/svn/trunk@26379------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ a68b4ec92e6f0033997c7d6242770567274c5d84: command returned error: 128

git svn fetch leads to same result.

Workaround?

Upd. I run this in Ubuntu in docker container.

max630
  • 8,762
  • 3
  • 30
  • 55
Alex T
  • 2,067
  • 4
  • 20
  • 27
  • Possible duplicate of [Filename too long in git for windows](http://stackoverflow.com/questions/22575662/filename-too-long-in-git-for-windows) – Tim Biegeleisen Nov 28 '16 at 08:25
  • But I'm run this on Ubuntu (in docker container). In windows it work very slow. – Alex T Nov 28 '16 at 08:32
  • It may be the container you are using, at least this is what the link I gave suggests. – Tim Biegeleisen Nov 28 '16 at 08:33
  • Ok. In suggested link problem about long file name that under source control. In my case it is lock file name. I'll try to use this not in container, or another file system, or may be in windows later. Also without all branches, trunk firstly, then branch by branch in different git repos, after merge that repos. May be some of this will work :) – Alex T Nov 28 '16 at 08:46
  • looks like 256 bytes (or so) [limitation for path element on Linux](http://serverfault.com/a/9548). I have no idea why git-svn tries to create such reference – max630 Nov 30 '16 at 16:38
  • Is this a one-time conversion and you only use Git from then on, or do you want to commit back to SVN from the Git clone? – Vampire Dec 01 '16 at 10:51

1 Answers1

0

Try the same conversion (assuming this is a one-time import) SubGit

It should be more robust to path length issues (even on Ubuntu).
Worst case: you can still skip a problematic revision and resume the process.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250