You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/10/18 23:31:49 UTC

[sling-tooling-scm] branch master created (now 26b6522)

This is an automated email from the ASF dual-hosted git repository.

rombert pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/sling-tooling-scm.git.


      at 26b6522  SLING-3987 - move from Subversion to Git

This branch includes the following new commits:

     new 22a6eba  SLING-3987 - move from Subversion to Git
     new 37c20bb  SLING-3987 - move from Subversion to Git
     new 7430bb4  SLING-3987 - move from Subversion to Git
     new 798137f  SLING-3987 - move from Subversion to Git
     new 16e2662  SLING-3987 - move from Subversion to Git
     new 529b96d  SLING-3987 - move from Subversion to Git
     new 0494cc7  SLING-3987 - move from Subversion to Git
     new 3a6997e  SLING-3987 - move from Subversion to Git
     new 7bf2acb  SLING-3987 - move from Subversion to Git
     new fcd0c9e  SLING-3987 - move from Subversion to Git
     new 9e27da0  SLING-3987 - move from Subversion to Git
     new ad6fe54  SLING-3987 - move from Subversion to Git
     new 9d00620  SLING-3987 - move from Subversion to Git
     new d16304d  SLING-3987 - move from Subversion to Git
     new 1f0bf42  SLING-3987 - move from Subversion to Git
     new 843d44f  SLING-3987 - move from Subversion to Git
     new 7da2f58  SLING-3987 - move from Subversion to Git
     new 5d9bc55  SLING-3987 - move from Subversion to Git
     new 5a74f95  SLING-3987 - move from Subversion to Git
     new 2f7c95e  SLING-3987 - move from Subversion to Git
     new 3b8814b  SLING-3987 - move from Subversion to Git
     new 26b6522  SLING-3987 - move from Subversion to Git

The 22 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


-- 
To stop receiving notification emails like this one, please contact
['"commits@sling.apache.org" <co...@sling.apache.org>'].

[sling-tooling-scm] 15/22: SLING-3987 - move from Subversion to Git

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-tooling-scm.git

commit 1f0bf424bc4be4374f854b53695881a0eb122226
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Fri Sep 29 07:28:50 2017 +0000

    SLING-3987 - move from Subversion to Git
    
    Push to the github repos for the dry-run.
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1810059 13f79535-47bb-0310-9956-ffa450edef68
---
 scripts/migrate-to-git.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/migrate-to-git.sh b/scripts/migrate-to-git.sh
index b943a5b..34501bc 100755
--- a/scripts/migrate-to-git.sh
+++ b/scripts/migrate-to-git.sh
@@ -155,7 +155,7 @@ while read -r module; do
 
     else # -p
         pushd ${git_repo_location}/${repo_name}
-        git remote add origin https://git-wip-us.apache.org/repos/asf/${repo_name}.git
+        git remote add origin https://github.com/not-sling/${repo_name}.git
         git push -u origin master
         popd
     fi

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-tooling-scm] 09/22: SLING-3987 - move from Subversion to Git

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-tooling-scm.git

commit 7bf2acb1eb88829ba659ad00ac20fb62604b948e
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Thu Sep 28 18:33:20 2017 +0000

    SLING-3987 - move from Subversion to Git
    
    Create standalone modules for performance (modules must be executed
    together) and samples ( for easier discoverability )
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1810024 13f79535-47bb-0310-9956-ffa450edef68
---
 scripts/gen-repo-candidates.sh | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/scripts/gen-repo-candidates.sh b/scripts/gen-repo-candidates.sh
index a1c4fb9..22d6cc3 100755
--- a/scripts/gen-repo-candidates.sh
+++ b/scripts/gen-repo-candidates.sh
@@ -24,6 +24,8 @@ fi
 
 for pom in $(find . -name pom.xml  \
     | grep -v './tooling/ide' \
+    | grep -v './performance' \
+    | grep -v './samples' \
     | grep -v '/target/' \
     | grep -v '/archetype-resources/' \
     | grep -v '/src/test/resources/' \
@@ -41,4 +43,7 @@ for pom in $(find . -name pom.xml  \
     echo $pom
 done
 
-echo "tooling/ide" # by exception, this will be a standalone module
+# by exception, these will be standalone modules
+echo "tooling/ide"
+echo "samples"
+echo "performance"

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-tooling-scm] 02/22: SLING-3987 - move from Subversion to Git

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-tooling-scm.git

commit 37c20bb272014dc5f0e46c501d854500c962977e
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Tue Sep 12 19:49:59 2017 +0000

    SLING-3987 - move from Subversion to Git
    
    Add an incomplete script to run the migration
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1808146 13f79535-47bb-0310-9956-ffa450edef68
---
 scripts/migrate-to-git.sh | 68 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 68 insertions(+)

diff --git a/scripts/migrate-to-git.sh b/scripts/migrate-to-git.sh
new file mode 100755
index 0000000..ad36e98
--- /dev/null
+++ b/scripts/migrate-to-git.sh
@@ -0,0 +1,68 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# This script is used to migrate modules from SVN to Git
+#!/bin/sh
+
+if [ ! -f check_staged_release.sh ]; then
+    echo "Please run this script from the root of the Sling SVN repository"
+    exit 1
+fi
+
+# prefixes to strip from module paths. trailing slash is mandatory
+prefixes='bundles/extensions/ bundles/ contrib/bundles contrib/extensions/ contrib/ karaf/ tooling/maven/'
+git_repo_location='../sling-modules'
+
+for module in $(./tooling/scm/scripts/gen-repo-candidates.sh); do
+
+    module_orig=$module
+
+    for prefix in $prefixes; do
+        module=${module#${prefix}}
+    done
+
+    repo_name=${module//\//-} # slashes to dashes
+    repo_name="sling-${repo_name}" # add TLP prefix
+    
+    echo "---- Preparing to migrate $module_orig to $repo_name ---"
+
+    status=$(curl -s -o /dev/null -I  -w "%{http_code}" https://git-wip-us.apache.org/repos/asf?p=${repo_name})
+
+    if [ $status = "404" ]; then
+        echo "Repository not found, will create";
+    elif [ $status = "200" ] ;then
+        echo "Repository exists, skipping";
+    else
+        echo "Unhandled HTTP status code ${status}, aborting"
+        exit 1
+    fi
+    
+    if [ ! -d ${git_repo_location}/${repo_name}/.git ]; then
+        echo "Converting from SVN to Git..."
+        # TODO - migrate the repository from SVN to git
+        exit 2 # unimplemented
+    else
+        echo "Already converted"
+    fi
+
+    
+    # TODO - create the repository using the ASF self-service tool
+    echo "Creating GIT repository ..."
+    exit 2 # unimplemented
+
+    cd ${git_repo_location}/${repo_name}
+    git remote add origin https://git-wip-us.apache.org/repos/asf/${repo_name}.git
+    git push -u origin master
+done

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-tooling-scm] 07/22: SLING-3987 - move from Subversion to Git

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-tooling-scm.git

commit 0494cc7825bedc955977eb0290403e9e1b2ffd14
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Thu Sep 21 13:01:40 2017 +0000

    SLING-3987 - move from Subversion to Git
    
    Add script to find large files in git repositories
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1809159 13f79535-47bb-0310-9956-ffa450edef68
---
 scripts/git-find-large-files.sh | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/scripts/git-find-large-files.sh b/scripts/git-find-large-files.sh
new file mode 100644
index 0000000..5833ca8
--- /dev/null
+++ b/scripts/git-find-large-files.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+# script which finds large files in the git repository
+# this lists all objects in the repo history, which means
+# we can use it to detect when files that don't belong
+# to the repo where incorrectly kept after extracting
+# a module
+
+git rev-list --objects --all | grep "$(git verify-pack -v .git/objects/pack/*.idx | sort -k 3 -n | tail -10 | awk '{print$1}')"

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-tooling-scm] 05/22: SLING-3987 - move from Subversion to Git

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-tooling-scm.git

commit 16e2662e9a689ac59adebbf8917434121814d229
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Wed Sep 20 19:38:48 2017 +0000

    SLING-3987 - move from Subversion to Git
    
    Split the migrate-to-git.sh script to have multiple steps and add
    a basic README.
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1809073 13f79535-47bb-0310-9956-ffa450edef68
---
 scripts/README.md         |  27 +++++++++
 scripts/migrate-to-git.sh | 140 ++++++++++++++++++++++++++++------------------
 2 files changed, 113 insertions(+), 54 deletions(-)

diff --git a/scripts/README.md b/scripts/README.md
new file mode 100644
index 0000000..60eb7ae
--- /dev/null
+++ b/scripts/README.md
@@ -0,0 +1,27 @@
+SCM Tooling
+====
+
+Git migration helpers
+---
+
+The workflow for migrating from Subversion to Git is the following:
+
+1. Generate the list of repository candidates
+
+    $ ./tooling/scm/scripts/gen-repo-candidates.sh  > repo-candidates.txt
+
+2. Create the remote repositories using the ASF self-service git tool
+
+    $ ./tooling/scm/scripts/migrate-to-git.sh -r < repo-candidates.txt
+
+Creating a repository can take up to one hour, so do this well in advance
+
+3. Extract the modules in individual repositories
+
+    $ ./tooling/scm/scripts/migrate-to-git.sh -r < repo-candidates.txt
+
+Also validate that the repositories created using step 2 are now live.
+
+4. Push the local changes to the remote repositories
+
+    $ ./tooling/scm/scripts/migrate-to-git.sh -p < repo-candidates.txt
diff --git a/scripts/migrate-to-git.sh b/scripts/migrate-to-git.sh
index b87f34f..ed270b6 100755
--- a/scripts/migrate-to-git.sh
+++ b/scripts/migrate-to-git.sh
@@ -21,6 +21,17 @@ prefixes='bundles/extensions/ bundles/ contrib/bundles contrib/extensions/ contr
 git_repo_location='../sling-modules'
 git_src_location='../sling-modules-src'
 
+function usage  {
+    echo "Usage: $0 [-p|-c] < repo-list.txt"
+    echo ""
+    echo "   -r : provision the Remote repositories"
+    echo "   -c : Convert the Repositories locally"
+    echo "   -p : Push local repositories to remote"
+    echo ""
+    echo "The repo-list.txt file can be generated using the "
+    echo "$(dirname $0)/gen-repo-candidates.sh script"
+}
+
 if [ ! -f check_staged_release.sh ]; then
     echo "Please run this script from the root of the Sling SVN repository"
     exit 1
@@ -35,7 +46,22 @@ if [ ! -d ${git_src_location} ]; then
     echo "Done!"
 fi
 
-for module in $(./tooling/scm/scripts/gen-repo-candidates.sh); do
+# validate CLI
+if [ $# -ne 1 ]; then
+    usage
+    exit -1
+fi
+
+case "$1" in 
+    "-r") echo "Provisioning remote repositories" ;;
+    "-c") echo "Converting local repositories";;
+    "-p") echo "Pushing local repositories to remove";;
+    *)
+        usage
+        exit -1
+esac
+
+while read -r module; do
 
     module_orig=$module
 
@@ -47,60 +73,66 @@ for module in $(./tooling/scm/scripts/gen-repo-candidates.sh); do
 
     repo_name="sling-${artifactId}" # add TLP prefix
     
-    echo "---- Preparing to migrate $module_orig to $repo_name ---"
-
-    status=$(curl -s -o /dev/null -I  -w "%{http_code}" https://git-wip-us.apache.org/repos/asf?p=${repo_name})
-
-    if [ $status = "404" ]; then
-        echo "Repository not found, will create";
-    elif [ $status = "200" ] ;then
-        echo "Repository exists, skipping";
-    else
-        echo "Unhandled HTTP status code ${status}, aborting"
-        exit 1
-    fi
-    
-    if [ ! -d ${git_repo_location}/${repo_name}/.git ]; then
-        echo "Converting from SVN to Git..."
-
-        # create the initial repo
-        git clone --no-hardlinks ${git_src_location} ${git_repo_location}/${repo_name}
+    echo "---- Preparing to process $module_orig as $repo_name ---"
+
+    if [ $1 == "-c" ]; then
+   
+        if [ ! -d ${git_repo_location}/${repo_name}/.git ]; then
+            echo "Converting from SVN to Git..."
+
+            # create the initial repo
+            git clone --no-hardlinks ${git_src_location} ${git_repo_location}/${repo_name}
+            pushd ${git_repo_location}/${repo_name}
+
+            # make sure we don't push to the incorrect repo and also remove make sure
+            # we don't keep references to the remote repo
+            git remote rm origin
+
+            # rename trunk to master
+            git branch -m trunk master
+
+            # Remove everything except the path belonging to the module
+            git filter-branch --subdirectory-filter ${module_orig}
+
+            # remove unrelated tags
+            for tag in $(git tag); do
+                if [[ $tag != ${artifactId}* ]]; then
+                    git tag -d ${tag}
+                fi
+            done
+
+            # cleanup and compaction
+            git for-each-ref --format="%(refname)" refs/original/ | xargs -n1 git update-ref -d
+            git reflog expire --expire=now --all
+            git repack -Ad
+            git gc --aggressive --prune=now
+            popd
+            echo "Complete!"
+        else
+            echo "Already converted"
+        fi
+
+    elif [ $1 == "-r" ]; then
+        status=$(curl -s -o /dev/null -I  -w "%{http_code}" https://git-wip-us.apache.org/repos/asf?p=${repo_name})
+
+        if [ $status = "404" ]; then
+            echo "Repository not found, will create";
+        elif [ $status = "200" ] ;then
+            echo "Repository exists, skipping";
+        else
+            echo "Unhandled HTTP status code ${status}, aborting"
+            exit 1
+        fi
+     
+        
+        # TODO - create the repository using the ASF self-service tool
+        # curl --netrc 'https://reporeq.apache.org/ss.lua'
+        echo "Creating GIT repository ..."
+        exit 254 # unimplemented
+    else # -p
         pushd ${git_repo_location}/${repo_name}
-
-        # make sure we don't push to the incorrect repo and also remove make sure
-        # we don't keep references to the remote repo
-        git remote rm origin
-
-        # rename trunk to master
-        git branch -m trunk master
-
-        # Remove everything except the path belonging to the module
-        git filter-branch --subdirectory-filter ${module_orig}
-
-        # remove unrelated tags
-        for tag in $(git tag); do
-            if [[ $tag != ${artifactId}* ]]; then
-                git tag -d ${tag}
-            fi
-        done
-
-        # cleanup and compaction
-        git for-each-ref --format="%(refname)" refs/original/ | xargs -n1 git update-ref -d
-        git reflog expire --expire=now --all
-        git repack -Ad
-        git gc --aggressive --prune=now
+        git remote add origin https://git-wip-us.apache.org/repos/asf/${repo_name}.git
+        git push -u origin master
         popd
-        echo "Complete!"
-    else
-        echo "Already converted"
     fi
-
-    
-    # TODO - create the repository using the ASF self-service tool
-    echo "Creating GIT repository ..."
-    exit 254 # unimplemented
-
-    cd ${git_repo_location}/${repo_name}
-    git remote add origin https://git-wip-us.apache.org/repos/asf/${repo_name}.git
-    git push -u origin master
 done

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-tooling-scm] 08/22: SLING-3987 - move from Subversion to Git

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-tooling-scm.git

commit 3a6997e06cb246d67a94760ad097a526db8fa0a4
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Thu Sep 28 12:57:27 2017 +0000

    SLING-3987 - move from Subversion to Git
    
    Add script to create a GitHub org ( for testing only )
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1809985 13f79535-47bb-0310-9956-ffa450edef68
---
 scripts/create-gh-repo.sh | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/scripts/create-gh-repo.sh b/scripts/create-gh-repo.sh
new file mode 100755
index 0000000..b6d8b99
--- /dev/null
+++ b/scripts/create-gh-repo.sh
@@ -0,0 +1,17 @@
+#!/bin/sh -ex
+
+username="$1"
+access_token="$2"
+repo_name="$3"
+
+if [ $# -ne 3 ]; then
+    echo "Usage: $0 github_username github_token new_repo_name"
+    exit 1
+fi
+
+curl -u "${username}:${access_token}" -d "{
+    \"name\": \"${repo_name}\",
+    \"has_issues\": false,
+    \"has_projects\": false,
+    \"has_wiki\": false
+}" -X POST https://api.github.com/orgs/not-sling/repos

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-tooling-scm] 19/22: SLING-3987 - move from Subversion to Git

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-tooling-scm.git

commit 5a74f9593f3e889f9934f27f01709bb078439309
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Sun Oct 8 20:24:29 2017 +0000

    SLING-3987 - move from Subversion to Git
    
    Scripts now use the final Github destinations and interact
    with the GitBox provisioning scripts.
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1811503 13f79535-47bb-0310-9956-ffa450edef68
---
 scripts/create-gitbox-repo.sh | 21 +++++++++++++++++++++
 scripts/migrate-to-git.sh     | 19 +++++++++----------
 2 files changed, 30 insertions(+), 10 deletions(-)

diff --git a/scripts/create-gitbox-repo.sh b/scripts/create-gitbox-repo.sh
new file mode 100755
index 0000000..4cdc253
--- /dev/null
+++ b/scripts/create-gitbox-repo.sh
@@ -0,0 +1,21 @@
+#!/bin/sh -e
+
+# validation
+if [ $# -ne 2 ]; then
+    echo "Usage: $0 repo-name repo-description"
+    exit 1
+fi
+
+repo_name=$1
+repo_desc=$2
+
+# will fail if wrong credentials are passed
+status=$(curl --netrc -s -o /dev/null -I -w "%{http_code}" https://gitbox.apache.org/setup/newrepo.cgi?action=pmcs)
+if [ $status != "200" ]; then
+    echo "Got status ${status} for validation curl call, aborting."
+    echo "Please check ~/.netrc for a login entry for gitbox.apache.org"
+    exit 2
+fi
+
+echo "curl --netrc --data=\"action=create&pmc=sling&name=${repo_name}&description=${repo_desc}&notify=commits@sling.apache.org&ghnotify=dev@sling.apache.org&ispodling=false\" https://gitbox.apache.org/setup/newrepo.cgi"
+
diff --git a/scripts/migrate-to-git.sh b/scripts/migrate-to-git.sh
index 129456d..ac7c5f6 100755
--- a/scripts/migrate-to-git.sh
+++ b/scripts/migrate-to-git.sh
@@ -55,7 +55,7 @@ fi
 case "$1" in 
     "-r") echo "Provisioning remote repositories" ;;
     "-c") echo "Converting local repositories";;
-    "-p") echo "Pushing local repositories to remove";;
+    "-p") echo "Pushing local repositories to remote";;
     *)
         usage
         exit -1
@@ -72,6 +72,11 @@ while read -r module; do
     if [ -e ${module_orig}/pom.xml ]; then
 
         artifactId=$(xmllint --xpath "/*[local-name()='project']/*[local-name()='artifactId']/text()" ${module_orig}/pom.xml)
+        short_desc=$(xmllint --xpath "/*[local-name()='project']/*[local-name()='name']/text()" ${module_orig}/pom.xml)
+        if [ -z "${short_desc}" ]; then
+            echo "No name for ${module_orig}, aborting"
+            exit 3
+        fi
 
         # some overrides where it does not make sense to switch the artifact id
         case $artifactId in
@@ -130,8 +135,7 @@ while read -r module; do
         fi
 
     elif [ $1 == "-r" ]; then
-        # TODO - switch to ASF for the final run
-        status=$(curl -s -o /dev/null -I  -w "%{http_code}" https://github.com/not-sling/${repo_name})
+        status=$(curl -s -o /dev/null -I  -w "%{http_code}" https://github.com/apache/${repo_name})
 
         if [ $status = "404" ]; then
             echo "Repository not found, will create";
@@ -143,21 +147,16 @@ while read -r module; do
             exit 1
         fi
 
-        if [ -z "$GITHUB_AUTH" ]; then
-            echo "Please export GITHUB_AUTH='your-github-username your-github-token'"
-            exit 2
-        fi
-
         echo "Creating GIT repository ..."
      
         # TODO - create the repository using the ASF self-service tool
-        ./tooling/scm/scripts/create-gh-repo.sh ${GITHUB_AUTH} ${repo_name}
+        ./tooling/scm/scripts/create-gitbox-repo.sh ${repo_name} "${short_desc}"
 
     else # -p
         pushd ${git_repo_location}/${repo_name}
         # TODO - use the ASF remotes for the final run
         if [ $(git remote show | grep origin | wc -l) -eq 0 ]; then
-            git remote add origin https://github.com/not-sling/${repo_name}.git
+            git remote add origin https://github.com/apache/${repo_name}.git
             git push -u origin master
         else
             echo "Remote origin already exists, skipping"

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-tooling-scm] 13/22: SLING-3987 - move from Subversion to Git

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-tooling-scm.git

commit 9d0062079bf6e0f1f134704fc9d3159bdababeeb
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Thu Sep 28 19:12:03 2017 +0000

    SLING-3987 - move from Subversion to Git
    
    Wire github repository creation for the dry run.
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1810033 13f79535-47bb-0310-9956-ffa450edef68
---
 scripts/migrate-to-git.sh | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/scripts/migrate-to-git.sh b/scripts/migrate-to-git.sh
index da23e35..b943a5b 100755
--- a/scripts/migrate-to-git.sh
+++ b/scripts/migrate-to-git.sh
@@ -130,22 +130,29 @@ while read -r module; do
         fi
 
     elif [ $1 == "-r" ]; then
-        status=$(curl -s -o /dev/null -I  -w "%{http_code}" https://git-wip-us.apache.org/repos/asf?p=${repo_name})
+        # TODO - switch to ASF for the final run
+        status=$(curl -s -o /dev/null -I  -w "%{http_code}" https://github.com/not-sling/${repo_name})
 
         if [ $status = "404" ]; then
             echo "Repository not found, will create";
         elif [ $status = "200" ] ;then
             echo "Repository exists, skipping";
+            continue
         else
             echo "Unhandled HTTP status code ${status}, aborting"
             exit 1
         fi
+
+        if [ -z "$GITHUB_AUTH" ]; then
+            echo "Please export GITHUB_AUTH='your-github-username your-github-token'"
+            exit 2
+        fi
+
+        echo "Creating GIT repository ..."
      
-        
         # TODO - create the repository using the ASF self-service tool
-        # curl --netrc 'https://reporeq.apache.org/ss.lua'
-        echo "Creating GIT repository ..."
-        exit 254 # unimplemented
+        ./tooling/scm/scripts/create-gh-repo.sh ${GITHUB_AUTH} ${repo_name}
+
     else # -p
         pushd ${git_repo_location}/${repo_name}
         git remote add origin https://git-wip-us.apache.org/repos/asf/${repo_name}.git

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-tooling-scm] 10/22: SLING-3987 - move from Subversion to Git

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-tooling-scm.git

commit fcd0c9e6598845fe3735cb6a1cc26f9e90e43ea3
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Thu Sep 28 19:11:48 2017 +0000

    SLING-3987 - move from Subversion to Git
    
    Prevent duplicate 'sling' in repository name
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1810030 13f79535-47bb-0310-9956-ffa450edef68
---
 scripts/migrate-to-git.sh | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/scripts/migrate-to-git.sh b/scripts/migrate-to-git.sh
index 610b394..05865af 100755
--- a/scripts/migrate-to-git.sh
+++ b/scripts/migrate-to-git.sh
@@ -71,7 +71,12 @@ while read -r module; do
 
     artifactId=$(xmllint --xpath "/*[local-name()='project']/*[local-name()='artifactId']/text()" ${module_orig}/pom.xml)
 
-    repo_name="sling-${artifactId}" # add TLP prefix
+    # add TLP prefix _if needed_
+    if [[ $artifactId == "sling-" ]]; then
+        repo_name=${artifactId}
+    else
+        repo_name="sling-${artifactId}"
+    fi
     
     echo "---- Preparing to process $module_orig as $repo_name ---"
 

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-tooling-scm] 03/22: SLING-3987 - move from Subversion to Git

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-tooling-scm.git

commit 7430bb490717c1046c8a640fb9f20849e3196677
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Wed Sep 20 15:17:24 2017 +0000

    SLING-3987 - move from Subversion to Git
    
    Use artifactId as the repository name
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1809038 13f79535-47bb-0310-9956-ffa450edef68
---
 scripts/migrate-to-git.sh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/scripts/migrate-to-git.sh b/scripts/migrate-to-git.sh
index ad36e98..f606f8b 100755
--- a/scripts/migrate-to-git.sh
+++ b/scripts/migrate-to-git.sh
@@ -33,8 +33,9 @@ for module in $(./tooling/scm/scripts/gen-repo-candidates.sh); do
         module=${module#${prefix}}
     done
 
-    repo_name=${module//\//-} # slashes to dashes
-    repo_name="sling-${repo_name}" # add TLP prefix
+    artifactId=$(xmllint --xpath "/*[local-name()='project']/*[local-name()='artifactId']/text()" ${module_orig}/pom.xml)
+
+    repo_name="sling-${artifactId}" # add TLP prefix
     
     echo "---- Preparing to migrate $module_orig to $repo_name ---"
 

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-tooling-scm] 20/22: SLING-3987 - move from Subversion to Git

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-tooling-scm.git

commit 2f7c95e5aacb61debe5dbfc8285a6813288660d7
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Sun Oct 8 20:24:36 2017 +0000

    SLING-3987 - move from Subversion to Git
    
    Correct script to create gitbox repo.
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1811504 13f79535-47bb-0310-9956-ffa450edef68
---
 scripts/create-gitbox-repo.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/create-gitbox-repo.sh b/scripts/create-gitbox-repo.sh
index 4cdc253..fee0369 100755
--- a/scripts/create-gitbox-repo.sh
+++ b/scripts/create-gitbox-repo.sh
@@ -6,7 +6,7 @@ if [ $# -ne 2 ]; then
     exit 1
 fi
 
-repo_name=$1
+repo_name=${1#sling-}
 repo_desc=$2
 
 # will fail if wrong credentials are passed
@@ -17,5 +17,5 @@ if [ $status != "200" ]; then
     exit 2
 fi
 
-echo "curl --netrc --data=\"action=create&pmc=sling&name=${repo_name}&description=${repo_desc}&notify=commits@sling.apache.org&ghnotify=dev@sling.apache.org&ispodling=false\" https://gitbox.apache.org/setup/newrepo.cgi"
+curl --netrc --data "action=create&pmc=sling&name=${repo_name}&description=${repo_desc}&notify=commits@sling.apache.org&ghnotify=dev@sling.apache.org" https://gitbox.apache.org/setup/newrepo.cgi
 

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-tooling-scm] 14/22: SLING-3987 - move from Subversion to Git

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-tooling-scm.git

commit d16304d89a145726a9369248073a44b8777aed4c
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Fri Sep 29 07:28:43 2017 +0000

    SLING-3987 - move from Subversion to Git
    
    Don't filter out projects with 'samples' in their path, just the ones
    starting with 'sample'
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1810058 13f79535-47bb-0310-9956-ffa450edef68
---
 scripts/gen-repo-candidates.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/gen-repo-candidates.sh b/scripts/gen-repo-candidates.sh
index 0905837..b3c379c 100755
--- a/scripts/gen-repo-candidates.sh
+++ b/scripts/gen-repo-candidates.sh
@@ -25,7 +25,7 @@ fi
 for pom in $(find . -name pom.xml  \
     | grep -v './tooling/ide' \
     | grep -v './performance' \
-    | grep -v './samples' \
+    | grep -v '^./samples' \
     | grep -v '/target/' \
     | grep -v '/archetype-resources/' \
     | grep -v '/src/test/resources/' \

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-tooling-scm] 18/22: SLING-3987 - move from Subversion to Git

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-tooling-scm.git

commit 5d9bc55e0102129378cb629ca04347f39bbf8e90
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Fri Sep 29 08:31:21 2017 +0000

    SLING-3987 - move from Subversion to Git
    
    Make push mode work incrementally as well
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1810069 13f79535-47bb-0310-9956-ffa450edef68
---
 scripts/migrate-to-git.sh | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/scripts/migrate-to-git.sh b/scripts/migrate-to-git.sh
index 3c3817b..129456d 100755
--- a/scripts/migrate-to-git.sh
+++ b/scripts/migrate-to-git.sh
@@ -156,8 +156,12 @@ while read -r module; do
     else # -p
         pushd ${git_repo_location}/${repo_name}
         # TODO - use the ASF remotes for the final run
-        git remote add origin https://github.com/not-sling/${repo_name}.git
-        git push -u origin master
+        if [ $(git remote show | grep origin | wc -l) -eq 0 ]; then
+            git remote add origin https://github.com/not-sling/${repo_name}.git
+            git push -u origin master
+        else
+            echo "Remote origin already exists, skipping"
+        fi
         popd
     fi
 done

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-tooling-scm] 06/22: SLING-3987 - move from Subversion to Git

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-tooling-scm.git

commit 529b96d0fb694bac6998e7c7adefe6f877c18019
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Wed Sep 20 20:52:24 2017 +0000

    SLING-3987 - move from Subversion to Git
    
    Silence tag deletion
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1809080 13f79535-47bb-0310-9956-ffa450edef68
---
 scripts/migrate-to-git.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/migrate-to-git.sh b/scripts/migrate-to-git.sh
index ed270b6..610b394 100755
--- a/scripts/migrate-to-git.sh
+++ b/scripts/migrate-to-git.sh
@@ -97,7 +97,7 @@ while read -r module; do
             # remove unrelated tags
             for tag in $(git tag); do
                 if [[ $tag != ${artifactId}* ]]; then
-                    git tag -d ${tag}
+                    git tag -d ${tag} > /dev/null
                 fi
             done
 

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-tooling-scm] 22/22: SLING-3987 - move from Subversion to Git

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-tooling-scm.git

commit 26b65226dea62856c39381f0143f66e23714e211
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Thu Oct 12 11:22:32 2017 +0000

    SLING-3987 - move from Subversion to Git
    
    - replace dots with dashes in repo names
    - remove stale TODO entries
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1811940 13f79535-47bb-0310-9956-ffa450edef68
---
 scripts/migrate-to-git.sh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/scripts/migrate-to-git.sh b/scripts/migrate-to-git.sh
index cc6202b..a6d3e98 100755
--- a/scripts/migrate-to-git.sh
+++ b/scripts/migrate-to-git.sh
@@ -99,6 +99,9 @@ while read -r module; do
             *) echo "Unknown non-Maven module ${module}, unable to set description"; exit 1;;
         esac
     fi
+
+    # ASF infra does not permit dots in repository names
+    repo_name=${repo_name//./-}
     
     echo "---- Preparing to process $module_orig as $repo_name ---"
 
@@ -154,12 +157,10 @@ while read -r module; do
 
         echo "Creating GIT repository ..."
      
-        # TODO - create the repository using the ASF self-service tool
         ./tooling/scm/scripts/create-gitbox-repo.sh ${repo_name} "${short_desc}"
 
     else # -p
         pushd ${git_repo_location}/${repo_name}
-        # TODO - use the ASF remotes for the final run
         if [ $(git remote show | grep origin | wc -l) -eq 0 ]; then
             git remote add origin https://github.com/apache/${repo_name}.git
             git push -u origin master

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-tooling-scm] 16/22: SLING-3987 - move from Subversion to Git

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-tooling-scm.git

commit 843d44f51638147a03302f1f7dd260a3fca9199c
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Fri Sep 29 07:28:56 2017 +0000

    SLING-3987 - move from Subversion to Git
    
    Push to the github repos for the dry-run.
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1810060 13f79535-47bb-0310-9956-ffa450edef68
---
 scripts/migrate-to-git.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/scripts/migrate-to-git.sh b/scripts/migrate-to-git.sh
index 34501bc..3c3817b 100755
--- a/scripts/migrate-to-git.sh
+++ b/scripts/migrate-to-git.sh
@@ -155,6 +155,7 @@ while read -r module; do
 
     else # -p
         pushd ${git_repo_location}/${repo_name}
+        # TODO - use the ASF remotes for the final run
         git remote add origin https://github.com/not-sling/${repo_name}.git
         git push -u origin master
         popd

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-tooling-scm] 04/22: SLING-3987 - move from Subversion to Git

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-tooling-scm.git

commit 798137fe2631047504c025949ea729e056cb0c6d
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Wed Sep 20 15:17:30 2017 +0000

    SLING-3987 - move from Subversion to Git
    
    Fully implement the repository reduction scheme
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1809039 13f79535-47bb-0310-9956-ffa450edef68
---
 scripts/migrate-to-git.sh | 51 ++++++++++++++++++++++++++++++++++++++++-------
 1 file changed, 44 insertions(+), 7 deletions(-)

diff --git a/scripts/migrate-to-git.sh b/scripts/migrate-to-git.sh
index f606f8b..b87f34f 100755
--- a/scripts/migrate-to-git.sh
+++ b/scripts/migrate-to-git.sh
@@ -14,16 +14,26 @@
 # limitations under the License.
 
 # This script is used to migrate modules from SVN to Git
-#!/bin/sh
+#!/bin/sh -e
+
+# prefixes to strip from module paths. trailing slash is mandatory
+prefixes='bundles/extensions/ bundles/ contrib/bundles contrib/extensions/ contrib/ karaf/ tooling/maven/'
+git_repo_location='../sling-modules'
+git_src_location='../sling-modules-src'
 
 if [ ! -f check_staged_release.sh ]; then
     echo "Please run this script from the root of the Sling SVN repository"
     exit 1
 fi
 
-# prefixes to strip from module paths. trailing slash is mandatory
-prefixes='bundles/extensions/ bundles/ contrib/bundles contrib/extensions/ contrib/ karaf/ tooling/maven/'
-git_repo_location='../sling-modules'
+if [ ! -d ${git_src_location} ]; then
+    # generate a git-svn checkout
+    echo "Creating source git-svn checkout ..."
+    git clone https://github.com/apache/sling.git ${git_src_location}
+    #  ensure we don't accidentally overwrite the source repository
+    chmod ugo-w ${git_src_location}
+    echo "Done!"
+fi
 
 for module in $(./tooling/scm/scripts/gen-repo-candidates.sh); do
 
@@ -52,8 +62,35 @@ for module in $(./tooling/scm/scripts/gen-repo-candidates.sh); do
     
     if [ ! -d ${git_repo_location}/${repo_name}/.git ]; then
         echo "Converting from SVN to Git..."
-        # TODO - migrate the repository from SVN to git
-        exit 2 # unimplemented
+
+        # create the initial repo
+        git clone --no-hardlinks ${git_src_location} ${git_repo_location}/${repo_name}
+        pushd ${git_repo_location}/${repo_name}
+
+        # make sure we don't push to the incorrect repo and also remove make sure
+        # we don't keep references to the remote repo
+        git remote rm origin
+
+        # rename trunk to master
+        git branch -m trunk master
+
+        # Remove everything except the path belonging to the module
+        git filter-branch --subdirectory-filter ${module_orig}
+
+        # remove unrelated tags
+        for tag in $(git tag); do
+            if [[ $tag != ${artifactId}* ]]; then
+                git tag -d ${tag}
+            fi
+        done
+
+        # cleanup and compaction
+        git for-each-ref --format="%(refname)" refs/original/ | xargs -n1 git update-ref -d
+        git reflog expire --expire=now --all
+        git repack -Ad
+        git gc --aggressive --prune=now
+        popd
+        echo "Complete!"
     else
         echo "Already converted"
     fi
@@ -61,7 +98,7 @@ for module in $(./tooling/scm/scripts/gen-repo-candidates.sh); do
     
     # TODO - create the repository using the ASF self-service tool
     echo "Creating GIT repository ..."
-    exit 2 # unimplemented
+    exit 254 # unimplemented
 
     cd ${git_repo_location}/${repo_name}
     git remote add origin https://git-wip-us.apache.org/repos/asf/${repo_name}.git

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-tooling-scm] 12/22: SLING-3987 - move from Subversion to Git

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-tooling-scm.git

commit ad6fe5477c5c626ae46630eea98fd61c938a310d
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Thu Sep 28 19:11:58 2017 +0000

    SLING-3987 - move from Subversion to Git
    
    - ensure directories without Maven modules are included
    - tweak repository names for some special cases
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1810032 13f79535-47bb-0310-9956-ffa450edef68
---
 scripts/migrate-to-git.sh | 22 +++++++++++++++++-----
 1 file changed, 17 insertions(+), 5 deletions(-)

diff --git a/scripts/migrate-to-git.sh b/scripts/migrate-to-git.sh
index 05865af..da23e35 100755
--- a/scripts/migrate-to-git.sh
+++ b/scripts/migrate-to-git.sh
@@ -69,13 +69,25 @@ while read -r module; do
         module=${module#${prefix}}
     done
 
-    artifactId=$(xmllint --xpath "/*[local-name()='project']/*[local-name()='artifactId']/text()" ${module_orig}/pom.xml)
+    if [ -e ${module_orig}/pom.xml ]; then
 
-    # add TLP prefix _if needed_
-    if [[ $artifactId == "sling-" ]]; then
-        repo_name=${artifactId}
+        artifactId=$(xmllint --xpath "/*[local-name()='project']/*[local-name()='artifactId']/text()" ${module_orig}/pom.xml)
+
+        # some overrides where it does not make sense to switch the artifact id
+        case $artifactId in
+            "sling-samples-builder") artifactId="sling-samples";;
+            "org.apache.sling.performance.reactor" ) artifactId="org.apache.sling.performance";;
+            "sling") artifactId="parent";;
+        esac
+
+        # add TLP prefix _if needed_
+        if [[ $artifactId == sling-* ]]; then
+            repo_name=${artifactId}
+        else
+            repo_name="sling-${artifactId}"
+        fi
     else
-        repo_name="sling-${artifactId}"
+        repo_name="sling-$(echo ${module} | tr '/' '-')"
     fi
     
     echo "---- Preparing to process $module_orig as $repo_name ---"

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-tooling-scm] 17/22: SLING-3987 - move from Subversion to Git

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-tooling-scm.git

commit 7da2f58b3fa2cdadde0ca1b8cb693764914dd60e
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Fri Sep 29 08:31:14 2017 +0000

    SLING-3987 - move from Subversion to Git
    
    Fix missing repositories with 'performance' in their name
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1810068 13f79535-47bb-0310-9956-ffa450edef68
---
 scripts/gen-repo-candidates.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/gen-repo-candidates.sh b/scripts/gen-repo-candidates.sh
index b3c379c..ceae8dc 100755
--- a/scripts/gen-repo-candidates.sh
+++ b/scripts/gen-repo-candidates.sh
@@ -24,7 +24,7 @@ fi
 
 for pom in $(find . -name pom.xml  \
     | grep -v './tooling/ide' \
-    | grep -v './performance' \
+    | grep -v '^./performance' \
     | grep -v '^./samples' \
     | grep -v '/target/' \
     | grep -v '/archetype-resources/' \

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-tooling-scm] 11/22: SLING-3987 - move from Subversion to Git

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-tooling-scm.git

commit 9e27da029d8cb7551139488a130baaae8106a1ae
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Thu Sep 28 19:11:53 2017 +0000

    SLING-3987 - move from Subversion to Git
    
    Include tooling/scm and tooling/jenkins in the module list
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1810031 13f79535-47bb-0310-9956-ffa450edef68
---
 scripts/gen-repo-candidates.sh | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/scripts/gen-repo-candidates.sh b/scripts/gen-repo-candidates.sh
index 22d6cc3..0905837 100755
--- a/scripts/gen-repo-candidates.sh
+++ b/scripts/gen-repo-candidates.sh
@@ -47,3 +47,6 @@ done
 echo "tooling/ide"
 echo "samples"
 echo "performance"
+# folders with utilities
+echo "tooling/scm"
+echo "tooling/jenkins"

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-tooling-scm] 21/22: SLING-3987 - move from Subversion to Git

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-tooling-scm.git

commit 3b8814bc2505fbff30b59fa63cd55d7ae931eda0
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Wed Oct 11 09:26:52 2017 +0000

    SLING-3987 - move from Subversion to Git
    
    Add repo descriptions where missing
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1811804 13f79535-47bb-0310-9956-ffa450edef68
---
 scripts/migrate-to-git.sh | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/scripts/migrate-to-git.sh b/scripts/migrate-to-git.sh
index ac7c5f6..cc6202b 100755
--- a/scripts/migrate-to-git.sh
+++ b/scripts/migrate-to-git.sh
@@ -93,6 +93,11 @@ while read -r module; do
         fi
     else
         repo_name="sling-$(echo ${module} | tr '/' '-')"
+        case ${module} in
+            "tooling/scm") short_desc="Apache Sling SCM Tooling";;
+            "tooling/jenkins") short_desc="Apache Sling Jenkins Tooling";;
+            *) echo "Unknown non-Maven module ${module}, unable to set description"; exit 1;;
+        esac
     fi
     
     echo "---- Preparing to process $module_orig as $repo_name ---"

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-tooling-scm] 01/22: SLING-3987 - move from Subversion to Git

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-tooling-scm.git

commit 22a6ebaef40da03fa89ba25ddc982162abc47d62
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Fri Sep 8 13:24:03 2017 +0000

    SLING-3987 - move from Subversion to Git
    
    Add a script to generate repo candidates
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1807758 13f79535-47bb-0310-9956-ffa450edef68
---
 scripts/gen-repo-candidates.sh | 44 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)

diff --git a/scripts/gen-repo-candidates.sh b/scripts/gen-repo-candidates.sh
new file mode 100755
index 0000000..a1c4fb9
--- /dev/null
+++ b/scripts/gen-repo-candidates.sh
@@ -0,0 +1,44 @@
+#!/bin/sh
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# this script is used to generate a list of Git repo candidates for migration
+# from SVN to Git
+
+if [ ! -f check_staged_release.sh ]; then
+    echo "Please run this script from the root of the Sling SVN repository"
+    exit 1
+fi
+
+for pom in $(find . -name pom.xml  \
+    | grep -v './tooling/ide' \
+    | grep -v '/target/' \
+    | grep -v '/archetype-resources/' \
+    | grep -v '/src/test/resources/' \
+    | sort); do
+
+    # remove reactor poms
+    grep -q modules $pom
+    if [ $? -eq 0 ]; then
+        continue;
+    fi
+    
+    pom=${pom%/pom.xml} # remove trailing '/pom.xml'
+    pom=${pom#./} # remove leading ./
+
+    echo $pom
+done
+
+echo "tooling/ide" # by exception, this will be a standalone module

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.