6

I am migrating from an svn repository to git. This svn repository has svn-externals, to be kept on svn repositories. These external are versioned and tagged in the history, and are read only. How I can properly migrate and have the svn-externals in the new git repository properly set?

I am looking in "git svn propset", git submodules, subtree merges. But How I can set up such a repository?

2
  • I guess you can't do "git svn propset" for track svn:externals, with git, right? Commented Mar 10, 2017 at 17:12
  • git svn propset does nothing in Git, it just sets SVN properties in the tracked SVN repository. You can use it to manage the svn:externals that the SVN repo trackes, but it will have no effect on the Git clone. Commented Mar 14, 2017 at 14:38

1 Answer 1

0

Alternatively, I propose: Use a modified version of this simple old python script, that works: https://github.com/eneroth/git-externals This script would check out all svn:externals previously defined in subdirectory in a .gitexternals file Problem is the checked out version is the HEAD, and are not part of the git repository

I would use a separate file, to use to store all svn versions. This file would be stored in git. So each time we do an update, This file would be updated with the latest commited. An option in the script would allow to update this file to the latest version of externals. The script would be modified to download the version stored in such file. Branches and tags would have the version fixed for externals as well in this case. For the historical data of the migration, not sure if this approach would work.

I would use this script in the case of submodules as well, it’s quite flexible. But in that case we will have all externals mirrored in git

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.