I have a SVN project and I want to clone to either Git or Mercurial. The cloning to both VCS' works fine, except for one major problem - I always get only the last revision, no any other history whatsoever.
I can clearly see that the root of the problem is that the SVN project was recently renamed (renaming is the last revision, the only one I manage to get). Using SVN I can see all the history behind the project without any issues.
The weirdest thing is, when I use git-svn clone, I can see it going through numerous revisions, supposedly importing them, but I still get only one revision in the end. Mercurial, which works backwards, unlike Git, just takes the last revision and is done with the cloning.
Also, it is important to note, that this last SVN project renaming/moving is not the only one. There were at least two other renames prior to that, and I do need the complete project history, just like I see it using SVN.
CodePudding user response:
Ideas
Since it is impossible clone non-existent svn-URL with PEG-revision
hg clone http://mayorat.ursinecorner.ru:8088/svn/Hello/branches/Greetings@16
abort: HTTP Error 404: Not Found
even if
svn ls http://mayorat.ursinecorner.ru:8088/svn/Hello/branches/Greetings@16
Hello.txt
you can try to clone repo, using parent od renamed directory as root. You'll get a lot of irrelevant changeset s for sibling paths, but (if rename was fair svn move
) I hope, all chagesets for path-in-question will be in repo: you have only clean-up history
- Split and merge
Dump SVN-repo, split it with svndumpfilter into separate dumps (dump per changed directory name), load dumps into separate svn-repos, clone every svn-repo into own Mercurial repo (repo can't have more than one subversion origin), pull repos into common, fix history
CodePudding user response:
For mercurial, I'm seeing this guide which may prove helpful. There are enough other question on the right related to git-svn to solve your problem.
I'm assuming you saw this, a tutorial on git-svn done by the Parrot project. It further appears that you need to do a git rebase after git log to determine the revision hash code you'd like to use. As before, if you need further information, leave a comment.