Date: Thu, 28 Mar 2024 18:54:28 +0000 (UTC) Message-ID: <2026238069.76064.1711652068137@cwiki-he-fi.apache.org> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_76063_34599185.1711652068137" ------=_Part_76063_34599185.1711652068137 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
Tracked under SLING-3987 - Move from Subversion to Git Closed
We will split current SVN repository located at https://svn.apache.org/repos/asf/sling/trunk/ into = multiple git repositories hosted on the ASF git servers. We will opt in to = the Git "Dual Master" system which will allow us to push directly to Github= . Direct access to Github and the possibility of directly merging pull requ= ests can be a booster for community participation.
We will not enable other Github features, such as wikis, features, and p= rojects.
The rule of the thumb for selecting what ends up in a git repository is =
a releasable Maven unit. The naming of git repositories will be sling=
-${sanitizedArtifactId
} . The santizied artifactId is composed from =
the Maven artifact id where all dots are replaced by slashed. See
Commit history will be preserved as we will convert the projects using g= it-svn, followed by git filter-branch. However, this has limitations when t= he project has been moved across multiple directories. We have detected it = so far for the repoinit modules. We consider this acceptable, as the full h= istory also resides in SVN. There are no confirmed alternatives that can pr= oduce better results. Trying to import the whole ASF SVN repository to expe= riment with the reposurgeon tool is taking too much time - still not done a= fter five days.
The following directories will not be split to individual modules:
We will not migrate the attic as there will be no further work done on t= he modules in there.
The following non-Maven directories will be migrated as separate reposit= ories
We will create the special 'repo' sling which will contain one or more&n=
bsp;repo
manifests which will allow viewing and editing multip=
le repositories at once.
As part of the gitbox setup, the repositories can be accessed both via G= itHub and gitbox.apache.org . Since there is a strong requirement to cut re= leases from ASF servers, all pom references will point to gitbox instead of= GitHub. Of course, committers are free to use GitHub as a remote for pushi= ng, just releases are affected.
If an individual repository needs to be migrated, usually because it was=
missed from the initial migration, the following steps are needed (assumin=
g we need to migrate contrib/scripting/esx
:
$ git clone h= ttps://github.com/apache/sling-old-svn-mirror # clone the old svn which wil= l be used as a source for the migration $ cd sling-old-svn-mirror $ echo contrib/scripting/esx > repo-candidates.txt # file name is not im= portant, but it's helpful to have the name(s) stores in a central place $ ./tooling/scm/scripts/migrate-to-git.sh -c < repo-candidates.txt # con= verts the repositories locally in ../sling-modules/ $ ./tooling/scm/scripts/migrate-to-git.sh -r < repo-candidates.txt # pro= visions the git repository on github/gitbox . Github permissions take 30-60= minutes to sync, you will not be able to push to this repo immediately $ cp LICENSE ../sling-modules/sling-org-apache-sling-scripting-esx/ &&a= mp; cd ../sling-modules/sling-org-apache-sling-scripting-esx/ && gi= t add LICENSE && git commit -m 'Added LICENSE file' && cd - $ ./tooling/scm/scripts/migrate-to-git.sh -p < repo-candidates.txt # aft= er verifying that the repository is writable on github
Once the repository is provisioned add it to the sl= ing-aggregator repo by following the instructions from the aggregator R= EADME.
Some WIP tools can be found at https://svn.apache.org/repos/asf/sling/trunk/tooling/scm/scripts/ .<= /p>
Pros
Cons
http://wiki.apache.org/general/GitAtApache
<=
a class=3D"external-link" href=3D"http://www.apache.org/dev/git.html" rel=
=3D"nofollow">http://www.apache.org/dev/git.html
There are currently 250 projects (modules) in our repository, counted us=
ing the tooling/scm/scripts/gen-repo-candidates.sh
script=
( repo-candidates.txt ).
Currently we consider every Maven project for extraction into its own re= pository. As exception we have:
Additionally, we will probably have one aggregator repo used to generate= the full view over the git repositories, using repo, gitslave, or another = tool that we will settle on.
core
(bundles
), launchpad
, te=
sting
, samples
, tooling
as neededartifactId
as repository name for artifacts (bundles=
, plugins, jars, ...) and simple names for grouping (bui=
lder/reactor) repositoriesThere are some tools for grouping repositories (projects/modules):
Some posts comparing different tools:
dev@discussions: