Question

I'm in the process of writing a general-purpose svn -> git migration script, which allows for a lot more than the standard git svn clone, and during one stage of my script I'm checking the output of git svn show-externals and git svn show-ignore for every branch in the migrating repository, and taking various steps depending on the output of those commands.

My problem now is that while the rest of my script follows through pretty fast, these two commands in particular seem to be taking up the vast majority of my running time. In some cases, git svn show-externals is taking upwards of 10 minutes to run (on a repo containing around 5000 files). When running on a repository of this size with 10 or more branches, you can imagine this adding up considerably.

Why does this operation take so long to execute? Is there anything I can do to speed up it's execution?

Was it helpful?

Solution

"git svn show-ignore" performs an additional SVN request per directory.

For migration purposes maybe you would like to have a look at SubGit tool. It translates svn:ignore -> .gitignore for every revision (and also it translates svn:eol-style, tags and so on). The only restriction: it requires local access SVN to repository. So it might be used in combination with svnrdump tool. If you have the SVN repostiory locally, the migration is performed in one step:

$ subgit install path/to/svn/repo
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top