[Libreoffice-commits] core.git: logerrit

Ilmari Lauhakangas (via logerrit) logerrit at kemper.freedesktop.org
Mon Jan 6 19:44:24 UTC 2020


 logerrit |   23 ++++++++++++++++-------
 1 file changed, 16 insertions(+), 7 deletions(-)

New commits:
commit 4322cdab98bcd4a51c121278944c90a497292b62
Author:     Ilmari Lauhakangas <ilmari.lauhakangas at libreoffice.org>
AuthorDate: Mon Jan 6 14:28:40 2020 +0200
Commit:     Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Mon Jan 6 20:43:52 2020 +0100

    logerrit: support submitting private and wip changes
    
    Change-Id: I0ee3ac887e17b38b6a2c501bcf6a2132406f1d20
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86273
    Reviewed-by: Guilhem Moulin <guilhem at libreoffice.org>
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>

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)"


More information about the Libreoffice-commits mailing list