Open jsdalton opened 11 years ago
@jsdalton I have the same problem. Do you find any way to work around?
@markwu See the pull request I just submitted. I patched up my local copy of svn2git with that change and now when I run:
$ svn2git --rebase --nobranches
It skips the branch checking stuff that was throwing the error. The rest of the repository rebases as expected.
I am also having the same issue. However, I think I see what the issue is. In both @jsdalton example and my svn repo I have a branch and a tag with the same name. It appears that git does not like that senario and thinks the tag's revision should be the branch's or vise versa.
In @jsdalton example the wordpress plugin's svn repo has both a branch named 1.4 and a tag named 1.4.
I think the correct solution is to move either the tag or the branch to a new name. The only issue with that is if you are importing the complete history (or the history including when the bad tag/branch existed) svn2git
still needs to create the original branch/tag then move it later.
In theory I am thinking the way to fix it correctly is to svn move
the branch back on the revision it was created so basically the bad tag/branch is never created. Although, I am not really sure how to do that at the moment. Back dating a change is beyond my knowledge. Going to keep googling to see if I can find a good solution though.
I finally have a solution that works. Using the google-analyticator as an example:
svn mv http://plugins.svn.wordpress.org/google-analyticator/branches/1.4 http://plugins.svn.wordpress.org/google-analyticator/branches/1.4_branch
svn2git http://plugins.svn.wordpress.org/google-analyticator
git branch -D 1.4
git show-ref
. _This is typically 'refs/remotes/svn/git update-ref -d refs/remotes/svn/1.4
svn2git --rebase
At least that was my diagnosis when I looked at this briefly. It seems like git is getting confused by the ambiguity of "1.4".
This is for a github mirror I have for a Wordpress plugin in the Wordpress SVN repository. This is the repository directory that's giving me difficulty: http://plugins.svn.wordpress.org/google-analyticator/