nirvdrum / svn2git

Ruby tool for importing existing svn projects into git.
MIT License
2.11k stars 443 forks source link

Allow multiple --tags options #34

Open bulletmark opened 12 years ago

bulletmark commented 12 years ago

The svn repo I am trying to migrate has 2 "tags" directories. The "git svn clone" command allows specification of multiple --tags options to handle this but unfortunately svn2git does not accept this.

nirvdrum commented 12 years ago

I'll have to double-check, but I don't think git-svn allows that. And svn2git is mostly just a nice wrapper around git-svn.

bulletmark commented 12 years ago

My git version 1.7.8.1 git help svn says "You can specify more than one --tags and/or --branches options, in case your Subversion repository places tags or branches under multiple paths."

nirvdrum commented 12 years ago

Nifty. I was unaware of that. Did you happen to pull together something that would work? If so, a pull request would be much appreciated.

bulletmark commented 12 years ago

I ended up hacking up my own shell script, based initially on http://github.com/JohnAlbin/git-svn-migrate, to do what I wanted. Not much use to you sorry.

lbreuss commented 12 years ago

I've got the fix for that. It processes multiple --tags and --branches and forwards that to git-svn.

I'm a noob to Github. I'll investigate how to fork svn2git and send you a pull request once I've pushed my fix.

nirvdrum commented 12 years ago

Awesome. If you push from a branch, you can go to that branch in GitHub to issue the pull request.

lbreuss commented 12 years ago

Awesome! I like the capabilities of github. It even shows my pull request here, just because I referened this issue in the request.

sajidali commented 11 years ago

When is this issue going to be fixed, I need to convert an svn project with multiple tags directories.

JeromeGill commented 10 years ago

There has been a PR for this issue open for 2 years. We have hit this problem also, any chance of a merge?

Zitrax commented 8 years ago

I hit this too, is this maintained still ? Last commit on master April 2015 while there are quite a lot of issues and pull requests.

nirvdrum commented 8 years ago

The project is maintained, it's just nearly every PR I receive breaks something on someone else or adds a pet feature that I don't want to include. What PR addresses this issue? I'll take another look.

Zitrax commented 8 years ago

@nirvdrum Thanks - good to know.

I tried the PR referenced above after squashing and rebasing on current master and it seemed to work for me. Here is my commit: https://github.com/Zitrax/svn2git/commit/1005cbd231e6805e1427303cf908811e7cdadf07

However I have not verified the output very carefully yet - for example I am curious how it would handle multiple tags/branches with the same name.

And I noticed that there were more branches and tags than I expected. When I looked at them they were branches and tags that had been deleted in svn. I guess that is expected (?) - but I would have to think a bit if that pollution is really what I want since we have a lot of them.