Skip to content

Commit

Permalink
rename master to main
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroen committed May 10, 2024
1 parent 05465fc commit 1ed73d6
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions .github/scripts/svn-sync.sh
Expand Up @@ -5,18 +5,18 @@
# git svn clone -T trunk https://svn.r-project.org/R
# git checkout origin/trunk -b trunk
# git remote add github https://github.com/r-devel/r-svn
# git checkout master
# git fetch github master
# git reset --hard github/master
# git checkout main
# git fetch github main
# git reset --hard github/main
set -e
set -x
git checkout trunk
git svn rebase
git push github trunk
git checkout master
git fetch github master
git reset --hard github/master
LASTMSG=$(git log master --grep="git-svn-id: https://svn.r-project.org/R/trunk" -n1 | grep -o 'git-svn-id: [^ ]*')
git checkout main
git fetch github main
git reset --hard github/main
LASTMSG=$(git log main --grep="git-svn-id: https://svn.r-project.org/R/trunk" -n1 | grep -o 'git-svn-id: [^ ]*')
LASTSVN=$(git log trunk --grep="$LASTMSG" -n1 --pretty="%H")
if [ -z "$LASTSVN" ]; then
echo "FAILED TO FIND LASTSVN"
Expand All @@ -33,9 +33,9 @@ do
GIT_COMMITTER_NAME="$(git log -1 $hash --pretty=format:%cn)" \
GIT_COMMITTER_EMAIL="$(git log -1 $hash --pretty=format:%ce)" \
git cherry-pick "$hash"
git push github master
git push github main
done

# Check that master and trunk are identical except for .github directory
# Check that main and trunk are identical except for .github directory
# This verifies that we haven't omitted any commits
git diff --stat master trunk -- . ':(exclude).github'
git diff --stat main trunk -- . ':(exclude).github'

0 comments on commit 1ed73d6

Please sign in to comment.