Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git-svn clone error: error: there are still refs under 'refs/remotes/tags'

I am trying to clone a Subversion repository to git, but it keeps giving me an error that I don't really understand:

error: there are still refs under 'refs/remotes/tags'
fatal: Cannot lock the ref 'refs/remotes/tags'.
update-ref -m r1649 refs/remotes/tags 16630eb01aa7abb331cdaa7ca07c1736656a058e: command returned error: 128

The subversion project has a lot of tags and about 15 branches. It seems to fail at a different point each time. I have cloned a number of other projects just fine, just seems to get stuck at this one.

Any ideas what this error means and how I might fix the issue?

Update:

I have found what is probably the cause of the problem, now I just need a solution. First of all it is not a different point each time it fails, it is failing at a particular revision each time. And I have checked the subversion logs at that revision and I have found that I mistakenly create a tag in branches/tags rather than in tags. This was fixed immediately, but it seems to be causing problems in git-svn.

Any ideas what I can do to get around this?

like image 757
DaveJohnston Avatar asked Jun 27 '11 14:06

DaveJohnston


1 Answers

As I said in my comments, the solution was to perform the clone in two steps by specifying a range of commits from the start to the one before the problem commit, then from the one after the problem to the end.

I was able to find out the problem commit by looking at the log of the failed attempts. You can see from my error message in the question that it was revision 1649.

You can specify the range of commits to use by specifying -r start:end Then for the rest of the commits you can specify the range as -r start:HEAD which will fetch everything from the 'start' revision number to the most recent.

like image 177
DaveJohnston Avatar answered Sep 22 '22 16:09

DaveJohnston