[[TOC]] = Migrating GRASS code repository from SVN to git = == Background and aims == SVN has served the GRASS project well as a version control system for numerous years now. The project has established routines and infrastructure (code repository, ticketing system, developer wiki) connected to SVN. However, with an increasing number of Open Source developers using git (and here especially the success of !GitHub), interest in moving from SVN to git has been expressed. Reasons to consider moving from SVN to git are to: * increase the number of contributors and thus contributions due of the popularity of git * make features and functionality of git available for developing GRASS and thus * make the current GRASS developers happy that prefer git (even if git can already be used against SVN: https://trac.osgeo.org/grass/wiki/HowToMaintainGrassWorkflowUsingGit) Other OSGeo projects already moved (even if some only partly) * **GDAL** moved to github (https://trac.osgeo.org/gdal/wiki/rfc71_github_migration) * **QGIS** code has been on github for a while issues are in redmine, discussion of moving also issues (including moving everything to gitlab) ongoing (https://github.com/qgis/QGIS/wiki/QGISbugtracker and https://github.com/qgis/QGIS/wiki/QGIS-Platform-migration-plan) * **Proj.4** moved to github (https://github.com/OSGeo/proj.4) * **GEOS** is on gitea (https://git.osgeo.org/gitea/geos/geos.git, provided by OSGeo, with github mirror) * ... * See e.g.: * https://git.osgeo.org/gitea/strk/trac2gogs Other relevant projects: * **Python**.org moved to github, see https://www.python.org/dev/peps/pep-0512/ * **Spring** Framework moved to github, see https://spring.io/blog/2019/01/15/spring-framework-s-migration-from-jira-to-github-issues GRASS GIS has already a git-mirror-repository for CI: * https://github.com/GRASS-GIS (used for Travis CI, in sync, see https://travis-ci.org/GRASS-GIS/grass-ci) In addition GRASS has a (yet unused) team within the OSGeo organisation on github.com: * https://github.com/orgs/OSGeo/teams/grass-gis Possible migration of GRASS GIS source code to git has been **discussed** at community sprints in 2017 and 2018. At the community Sprint in Bonn 2018 first tools for moving content from trac (SVN) to git were developed (mainly by Martin Landa): https://trac.osgeo.org/grass/browser/grass-addons/tools/svn2git?order=name See also: https://trac.osgeo.org/grass/ticket/3722 == Choosing a git platform == Moving to git involves the question which git platform to move to. So, in addition to technical work, strategical decisions have to be made. === Available options === Most common options / git platforms are: * github (still the most popular, yet proprietary, system with online hosting service) * gitlab (another platform with online hosting service and increasing popularity esp. after Microsoft acquired github) * bitbucket (another popular platform with online hosting service) * gitea/gogs ("painlessly selfhosted" platform, hosted by OSGeo SAC) Yet, there are plenty of other options: https://wiki.osgeo.org/wiki/GitHostingSoftware And there are several comparisons of available git platforms available online: * https://wiki.osgeo.org/wiki/GitInfrastructureComparison * https://ethercalc.org/choose-the-git-host.html (August 2016) * https://www.reddit.com/r/devops/comments/8nro34/gitlab_vs_github_whats_the_right_hosting_platform/ * https://www.linuxjournal.com/content/opinion-github-vs-gitlab * https://about.gitlab.com/devops-tools/github-vs-gitlab.html !GitLab compared to other !DevOps tools * https://about.gitlab.com/devops-tools/ === Risk of "vendor lock in" === See this gitlab-ticket regarding migration from trac to gitlab: https://gitlab.com/gitlab-com/support-forum/issues/2765 And see this manual for moving from SVN to gitlab: https://docs.gitlab.com/ee/user/project/import/ It seems also possible / relatively straight forward to (e.g. later) move from gitlab.com to a selfhosted gitlab instance: https://docs.gitlab.com/ee/user/project/import/gitlab_com.html === Requirements and criteria === Anyway, a first step in order to chose from the available options is to define a list of criteria (here requirements and features) of the git platform to move to. For OSGeo a list of requirements has been compiled: https://wiki.osgeo.org/wiki/GitServiceRequirement Yet, that list does not necessarily reflect all or the most important requirements of the GRASS project and the motivation for moving to git... * Sign in using OSGeo Userid * Autonomously create and manage teams * Autonomously create and manage repositories * Create private repositories (for software vulnerability testing, etc.) * Import tickets from Trac * Import tickets from Redmine * Comment tickets via email * Comment/close tickets via commit log * SVN->GIT sync - (Mirroring existing SVN repository) see:/ticket/1654 * Integration with CI service (hosted eg. Travis-CI, !AppVeyor, !GitLab CI), self-hosted (e.g. !Buildbot, ?)) Extra link: * ~~ New !GitHub API for importing issues: https://gist.github.com/jonmagic/5282384165e0f86ef105 ~~ (we didn't know about it in time) == Next steps Feb 2019 == === User Survey === 5 Feb 2019: * User survey posted at https://docs.google.com/forms/d/1BoTFyZRNebqVX98A3rh5GpUS2gKFfmuim78gbradDjc * deadline 12 Feb 2019; deadline later extended to 15 Feb 2019 20 Feb 2019: * Results available here: https://docs.google.com/forms/d/1BoTFyZRNebqVX98A3rh5GpUS2gKFfmuim78gbradDjc/viewanalytics === git test migration === 5 Feb 2019: * svn -> git test migration ongoing, see #3722 For the "final" repos, see * https://github.com/grass-svn2git/ (will be moved under OSGeo organization later upon PSC vote) === PSC vote === * RFC 6 * https://trac.osgeo.org/grass/wiki/RFC/6_MigrationGitHub * Motion on RFC 6: 18 Apr 2019 * https://lists.osgeo.org/pipermail/grass-psc/2019-April/002026.html * Result: motion carried 22 Apr 2019 * https://lists.osgeo.org/pipermail/grass-psc/2019-April/002034.html == Implementation of migration from OSGeo SVN and trac to !GitHub == === Transfer to repo to OSGeo organization within !GitHub === One option is to update the existing draft migration (https://github.com/grass-svn2git/) uner the existing OSGeo organization on !GitHub: * https://help.github.com/en/articles/transferring-a-repository === Migration of trac issues === * ... === New labels in the !GitHub issue tracker === * c.f. also current QGIS cleanup "Migrating issues from Redmine to GitHub" * https://github.com/qgis/QGIS-Enhancement-Proposals/issues/141 === Migration of trac wiki === * ... === Setup of Gitlab mirror === * Import your project from !GitHub to !GitLab: https://docs.gitlab.com/ee/user/project/import/github.html * how to mirror !GitHub issues? == Future plans not being part of initial migration == * Usage of github backporting application * https://github.com/apps/backporting (already used by GDAL, PROJ, QGIS, ...) * DOI support through zenodo by connecting repos on !GitHub with Zenodo: * https://guides.github.com/activities/citable-code/ * Release of GRASS GIS 8.0.0 (or earlier) from !GitHub