summaryrefslogtreecommitdiff
path: root/logerrit
diff options
context:
space:
mode:
authorIlmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>2020-01-06 14:28:40 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2020-01-06 20:43:52 +0100
commit4322cdab98bcd4a51c121278944c90a497292b62 (patch)
tree4bb49c85ae83e94b4bf57a4fe355da93ec2bfbc6 /logerrit
parenteb9b1469a6d0d11e94b50ce759910492dd6f8dfe (diff)
logerrit: support submitting private and wip changes
Change-Id: I0ee3ac887e17b38b6a2c501bcf6a2132406f1d20 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86273 Reviewed-by: Guilhem Moulin <guilhem@libreoffice.org> Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'logerrit')
-rwxr-xr-xlogerrit23
1 files changed, 16 insertions, 7 deletions
diff --git a/logerrit b/logerrit
index 736e4342959b..33f45dc44c73 100755
--- a/logerrit
+++ b/logerrit
@@ -9,8 +9,8 @@ get_SHA_for_change() {
}
submit() {
- TYPE=$1
- BRANCH=$2
+ BRANCH=$1
+ TYPE=${2:-''}
if test -z "$BRANCH"
then
BRANCH=$(git symbolic-ref HEAD 2> /dev/null)
@@ -22,7 +22,7 @@ submit() {
fi
echo "no branch specified, guessing current branch $BRANCH"
fi
- git push $GERRITURL HEAD:refs/$TYPE/$BRANCH
+ git push $GERRITURL HEAD:refs/for/$BRANCH$TYPE
}
logerrit() {
@@ -45,10 +45,12 @@ case "$1" in
echo
echo " --- for submitters:"
echo " submit [BRANCH] submit your change for review"
- echo " submit-draft [BRANCH] submit your change as draft"
+ echo " submit-private [BRANCH] submit your change as private"
+ echo " submit-wip [BRANCH] submit your change as work-in-progress"
echo " nextchange [BRANCH] reset branch to the remote to start with the next change"
echo " testfeature [BRANCH] trigger a test of a feature branch on gerrit"
- echo "Note: drafts are only visibly to yourself and those that you explicitly add as reviewers."
+ echo "Note: private changes are only visibly to yourself and those that you explicitly add as reviewers."
+ echo "For full documentation, see https://gerrit.libreoffice.org/Documentation/intro-user.html#private-changes"
echo
echo " --- for reviewers:"
echo " checkout CHANGEID checkout the changes for review"
@@ -134,10 +136,17 @@ case "$1" in
fi
;;
submit)
- submit 'for' $2
+ submit $2
+ ;;
+ submit-private)
+ submit $2 '%private'
+ ;;
+ submit-wip)
+ submit $2 '%wip'
;;
submit-draft)
- submit drafts $2
+ echo "Please use submit-private instead of submit-draft."
+ exit 1
;;
nextchange)
if test -n "$(git status -s -uno)"