开发者

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

开发者 https://www.devze.com 2023-03-15 21:38 出处:网络
I am trying to clone a Subversion repository to git, but it keeps giving me an error that I don\'t really understand:

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?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消