svn2git icon indicating copy to clipboard operation
svn2git copied to clipboard

svn:external

Open souaremsaidou opened this issue 5 years ago • 6 comments

Hello,

I want to migrate old SVN to git

the SVN repository is like:

http://svn/Sky/trunk/folder1/
http://svn/Sky/trunk/folder2/
http://svn/Sky/branches/0.1/folder1/
http://svn/Sky/branches/0.1/folder2/

...

http://svn/Sky/branches/X.Y.Z/folder1/
http://svn/Sky/branches/X.Y.Z/folder2/

but folder2 is an svn:external from http://svn/Moon/tags/18_10_2013/sources/folder2 project at a specific tag on trunk.

and

folder2 is an svn:external from http://svn/Moon/tags/01_10_2013/sources/folder2 project at a specific tag on /branches/0.1.

and so... for /branches/X.Y.Z/

How can i write the match rules in those cases?

BR

souaremsaidou avatar Jan 16 '20 10:01 souaremsaidou

afair svn:external is not yet supported and you would either need to implement it first or do some post processing of the result

Vampire avatar Jan 16 '20 12:01 Vampire

how to post process? Have you an idea to do that?

souaremsaidou avatar Jan 16 '20 12:01 souaremsaidou

No, I didn't convert any SVN repo with externals yet. You probably need to search all SVN repos where externals are modified and then edit the Git history to use some replacement like Git submodules.

Vampire avatar Jan 16 '20 14:01 Vampire

is git filter-branch a right tool to rewrite the history?

and how can i get the svn:externals for each (branches/trunk/tags) ? i have over 17000 branches and 500 tags.

souaremsaidou avatar Jan 16 '20 15:01 souaremsaidou

is git filter-branch a right tool to rewrite the history?

Probably, yes.

and how can i get the svn:externals for each (branches/trunk/tags) ? i have over 17000 branches and 500 tags.

I guess you even have to go through all commits, but as I said, no idea, never did this before.

Vampire avatar Jan 16 '20 15:01 Vampire

I vote +1 for this feature as well to either allow for registering a script for each svn:external to handle it or via a C++ callback that can be added as an example. The base case would seem to be if svn:external is referring to the same SVN repo.

s3ts avatar Oct 27 '21 20:10 s3ts