[Kde-scm-interest] svn2git submodule support: hackish implementation

Merlijn van Deen valhallasw at arctus.nl
Sat Jun 22 13:13:49 UTC 2013


Hello all,

For the pywikibot project, I've been working on svn to git migration using
the KDE svn2git tool. Thanks to all who have helped write this useful tool!

In our case, we wanted to split off a subdirectory in SVN to a seperate git
repository, which would then be imported using git submodules. To do this,
I implemented two things:
  - creating a .gitmodules file at a given revision
  - updating the submodule after a commit to the parent repository

The diff can be seen here: [1]. [2] (submodule) and [3] (main repository)
show the resulting commits.

As you can see, everything is hard-coded at the moment - my Qt4-fu is too
weak to make everything configurable... The implementation is also quite
hackish, but I think this is acceptable for a one-time convert tool :-)

Best,
Merlijn

[1]
https://github.com/pywikibot/svn2git/compare/47ae01fd36d224f4777f8cb162be8ed4012f581c...master#diff-2
[2]
https://github.com/wikimedia/pywikibot-i18n/commit/5c9f1375148885cd97c872c1a6732cfd5e762dc0
[3]
https://github.com/wikimedia/pywikibot-core/commit/db46d4be1bc2ea4547b19816746360b3dc95140e
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-scm-interest/attachments/20130622/eb2defa6/attachment.html>


More information about the Kde-scm-interest mailing list