From 46da530431d340cde22192d9df475d85b5d9fab7 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Mon, 10 Jun 2019 08:54:22 -0400 Subject: [PATCH 1/3] Update git scripts for new versions {maint,release}-0.4.1 are now real {maint,release}-0.3.4 are now EOL Closes ticket 30822 --- scripts/git/git-merge-forward.sh | 18 +++++++++--------- scripts/git/git-pull-all.sh | 14 +++++++------- scripts/git/git-push-all.sh | 2 +- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/scripts/git/git-merge-forward.sh b/scripts/git/git-merge-forward.sh index 67af7e98bf..98ad07c9cc 100755 --- a/scripts/git/git-merge-forward.sh +++ b/scripts/git/git-merge-forward.sh @@ -38,15 +38,15 @@ TOR_WKT_NAME="tor-wkt" # # First set of arrays are the maint-* branch and then the release-* branch. # New arrays need to be in the WORKTREE= array else they aren't considered. -MAINT_034=( "maint-0.3.4" "maint-0.2.9" "$GIT_PATH/$TOR_WKT_NAME/maint-0.3.4" ) -MAINT_035=( "maint-0.3.5" "maint-0.3.4" "$GIT_PATH/$TOR_WKT_NAME/maint-0.3.5" ) +MAINT_035=( "maint-0.3.5" "maint-0.2.9" "$GIT_PATH/$TOR_WKT_NAME/maint-0.3.5" ) MAINT_040=( "maint-0.4.0" "maint-0.3.5" "$GIT_PATH/$TOR_WKT_NAME/maint-0.4.0" ) -MAINT_MASTER=( "master" "maint-0.4.0" "$GIT_PATH/$TOR_MASTER_NAME" ) +MAINT_041=( "maint-0.4.1" "maint-0.4.0" "$GIT_PATH/$TOR_WKT_NAME/maint-0.4.1" ) +MAINT_MASTER=( "master" "maint-0.4.1" "$GIT_PATH/$TOR_MASTER_NAME" ) RELEASE_029=( "release-0.2.9" "maint-0.2.9" "$GIT_PATH/$TOR_WKT_NAME/release-0.2.9" ) -RELEASE_034=( "release-0.3.4" "maint-0.3.4" "$GIT_PATH/$TOR_WKT_NAME/release-0.3.4" ) RELEASE_035=( "release-0.3.5" "maint-0.3.5" "$GIT_PATH/$TOR_WKT_NAME/release-0.3.5" ) RELEASE_040=( "release-0.4.0" "maint-0.4.0" "$GIT_PATH/$TOR_WKT_NAME/release-0.4.0" ) +RELEASE_041=( "release-0.4.1" "maint-0.4.1" "$GIT_PATH/$TOR_WKT_NAME/release-0.4.1" ) # The master branch path has to be the main repository thus contains the # origin that will be used to fetch the updates. All the worktrees are created @@ -55,14 +55,14 @@ ORIGIN_PATH="$GIT_PATH/$TOR_MASTER_NAME" # SC2034 -- shellcheck thinks that these are unused. We know better. ACTUALLY_THESE_ARE_USED=< Date: Mon, 10 Jun 2019 08:56:26 -0400 Subject: [PATCH 2/3] push-all: Use TOR_UPSTREAM_REMOTE_NAME to override UPSTREAM_BRANCH We already allow this override in our pre-push hook, so let's allow it here too. (I call my upstream branches "origin") --- scripts/git/git-push-all.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/git/git-push-all.sh b/scripts/git/git-push-all.sh index 9e1b39c10a..0701b27b59 100755 --- a/scripts/git/git-push-all.sh +++ b/scripts/git/git-push-all.sh @@ -1,9 +1,9 @@ #!/bin/bash # The remote upstream branch on which git.torproject.org/tor.git points to. -UPSTREAM_BRANCH="upstream" +UPSTREAM_BRANCH=${TOR_UPSTREAM_REMOTE_NAME:-"upstream"} -git push $UPSTREAM_BRANCH \ +git push "$UPSTREAM_BRANCH" \ master \ {release,maint}-0.4.1 \ {release,maint}-0.4.0 \ From 0635170cf14c3b622ee9fdf67ea81f4e564dd39d Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Mon, 10 Jun 2019 09:05:26 -0400 Subject: [PATCH 3/3] Add an environment variable to set GIT_PATH in git scripts --- scripts/git/git-merge-forward.sh | 2 +- scripts/git/git-pull-all.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/git/git-merge-forward.sh b/scripts/git/git-merge-forward.sh index 98ad07c9cc..15af6f3dba 100755 --- a/scripts/git/git-merge-forward.sh +++ b/scripts/git/git-merge-forward.sh @@ -14,7 +14,7 @@ # ... which means that the tor worktrees are in /home//git/tor-wkt # Where are all those git repositories? -GIT_PATH="FULL_PATH_TO_GIT_REPOSITORY_DIRECTORY" +GIT_PATH=${TOR_FULL_GIT_PATH:-"FULL_PATH_TO_GIT_REPOSITORY_DIRECTORY"} # The tor master git repository directory from which all the worktree have # been created. TOR_MASTER_NAME="tor" diff --git a/scripts/git/git-pull-all.sh b/scripts/git/git-pull-all.sh index ec8511d275..6fe7e59812 100755 --- a/scripts/git/git-pull-all.sh +++ b/scripts/git/git-pull-all.sh @@ -14,7 +14,7 @@ # ... which means that the tor worktrees are in /home//git/tor-wkt # Where are all those git repositories? -GIT_PATH="FULL_PATH_TO_GIT_REPOSITORY_DIRECTORY" +GIT_PATH=${TOR_FULL_GIT_PATH:-"FULL_PATH_TO_GIT_REPOSITORY_DIRECTORY"} # The tor master git repository directory from which all the worktree have # been created. TOR_MASTER_NAME="tor"