g.revolution
g.revolution

Reputation: 12262

git svn command crashes in the middle of cloning svn repo. How to fix that?

I have a svn repo with following structure

ProjectX
 -> trunk
 -> tags
     -> 1.0.x
     -> 1.1.x
 -> branches
     -> 1.1.1

I am trying to use git svn to convert this repo into a git repo but git svn crashes in the middle with following error:

Use of uninitialized value $resolved in scalar chomp at /Applications/Xcode.app/Contents/Developer/usr/libexec/git-core/git-svn line 1764.
Use of uninitialized value $resolved in scalar chomp at /Applications/Xcode.app/Contents/Developer/usr/libexec/git-core/git-svn line 1764.
error: there are still refs under 'refs/remotes/svn/tags'
fatal: Cannot lock the ref 'refs/remotes/svn/tags'.
update-ref -m r133452 refs/remotes/svn/tags 819b5012690ffe22208d5727ad26673e2670560e: command returned error: 128

command failed:
git svn fetch

I am not sure what's happening but it crashes right where it starts getting the tags which were done on the 1.1.x branch. How to fix this?

Upvotes: 2

Views: 788

Answers (1)

axiac
axiac

Reputation: 72177

Several suggestions:

  1. Use svnadmin verify to check the data stored in the repository. It's possible that the svn repository has errors. If you can work with it using svn (the usual operations: checkout, update, commit) then the chance to have a damaged repository is very small but it doesn't hurt to check, just to be sure. If svnadmin verify reports errors or inconsistencies then... I don't know if/how you can fix it.

  2. Use SubGit to do the conversion; it produces better results that git svn.

  3. If SubGit does not suit your needs then install a recent version of Git. The version provided by Apple is always months behind the latest version. Either download and compile the most recent version or install Homebrew and use it to install a newer version of Git.

Upvotes: 2

Related Questions