Open PeterGrandcourt opened 2 years ago
The consequence of this problem is that the contents of a branch does not match the history of the branch. I think this is a critical issue as if you cannot rely on branch history, and you care about branch history, then the converted repository is unusable. If, on the other hand you don't care about history, then you don't need convert a repository with all its history.
For most people migrating svn, with a standard ( or relatively standard repository) svn git will be a better choice as that records the branch history correctly.
svn git however is problematic if repository is very big (it is quite slow) and if you have moved branches around (including moving trunk around) or just have a lot of branches then the follow parents (default behaviour) causes it to recurs the history until it finds the parent. If you have many branches, and a big repo then this takes a lot of time. Switching off follow parents causes means that branch history is not connected to branch-parent history.
svn-all-fast-export is a great tool, but this problem makes it unusable at the moment for some use cases and I hope this issue can be resolved.
update: added missing merge step in the SVN operations.
Hello, I have an issue where svn merged of specific revisions to branches, are interpreted by the conversion as full merges. The equivalent of an svn merge of specific revisions is a cherry pick in git.
Is there a way of overriding this behaviour?
Take the following example
SVN operations
Set up the repo
add file_1.txt to trunk
add file_2.txt to trunk
Branch v_1 from trunk on revision 2
Merge revision 3 that added file_2.txt to v_1)
Convert svn to git
rules
convert
docker run --rm -it -v
pwd/workdir:/workdir -v /u02/svnroot/test:/tmp/svn -v
pwd/conf:/tmp/conf svn2git /usr/local/svn2git/svn-all-fast-export --identity-map /tmp/conf/authors-transform.txt --rules /tmp/conf/rules --add-metadata --svn-branches --debug-rules --svn-ignore --empty-dirs /tmp/svn/
check the results
clone and check out v_1
look at the history of the v_1 branch
expected
svn revision 3 adding file_2 to the trunk should not be visible in branch v_1 in git this is a revision from the trunk and we didn't merged this revision in svn.
actual
svn revision 3 adding file_2 to the trunk is visible in branch v_1 in git does svn-all-fast-export interpret all merges as full instead of performing a cherry-pick?