[Libreoffice-commits] .: logerrit
logerrit |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 7d88c35cc3fa8b4c9ebf23800d3771a265937086 Author: Petr Mladek pmla...@suse.cz Date: Fri Feb 1 18:12:58 2013 +0100 logerrit: print logerrit help with --help It printed help of the plain gerrit tool which always confused me :-) Change-Id: Ied81688ada4b536486d998709230fc24fa3c9b62 diff --git a/logerrit b/logerrit index bb60473..2456ae1 100755 --- a/logerrit +++ b/logerrit @@ -48,7 +48,7 @@ submit() { } case $1 in - help) + help|--help) echo Usage: ./logerrit subcommand [options] echo simple and basic tool to interact with LibreOffice gerrit echo subcommands: ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: logerrit
logerrit |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) New commits: commit f9fa180e42453b95b75d97dc8e50eab7e38c7464 Author: Miklos Vajna vmik...@suse.cz Date: Wed Aug 22 14:14:46 2012 +0200 logerrit: --code-review=2 in review implies --submit Change-Id: Ibd21dfdb76536ea0e0a71791a91ec87e31d49960 diff --git a/logerrit b/logerrit index c936653..bb60473 100755 --- a/logerrit +++ b/logerrit @@ -146,6 +146,7 @@ case $1 in esac read -p 'is the code looking good (+), bad (-) or none of that ()? ' CODEREVIEW ask_tristate $CODEREVIEW + SUBMITFLAG= case $ANSWER in y) read -p 'do you approve the change (+) too, or prefer someone else to do that ()? ' CODEREVIEW @@ -153,6 +154,7 @@ case $1 in case $ANSWER in y) CODEREVIEWFLAG=--code-review=2 + SUBMITFLAG=--submit ;; n) CODEREVIEWFLAG=--code-review=1 @@ -185,7 +187,7 @@ case $1 in esac read -p please type a friendly comment$MESSAGEREQ: MESSAGE get_REVISION_for_change $CHANGEID - ssh ${GERRITHOST?} gerrit review -m \$MESSAGE\ $VERIFIEDFLAG $CODEREVIEWFLAG $REVISION + ssh ${GERRITHOST?} gerrit review -m \$MESSAGE\ $VERIFIEDFLAG $CODEREVIEWFLAG $SUBMITFLAG $REVISION ;; checkout) get_SHA_for_change $2 ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: logerrit
logerrit |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit e06c1f56b9c70cbf208e508d4a6dd8b276e1bd19 Author: Tim Retout t...@retout.co.uk Date: Mon Aug 13 21:52:02 2012 +0100 logerrit: Fix some typos. Change-Id: I0d6f3f5521d32dad1ffaa8675d5f43c7d7fa7cea Reviewed-on: https://gerrit.libreoffice.org/409 Reviewed-by: Jean-Tiare Le Bigot ad...@jtlebi.fr Reviewed-by: TomÃ¡à ¡ Chvátal tchva...@suse.cz Tested-by: TomÃ¡à ¡ Chvátal tchva...@suse.cz diff --git a/logerrit b/logerrit index 6585db1..c936653 100755 --- a/logerrit +++ b/logerrit @@ -73,7 +73,7 @@ case $1 in test) if test -n `ssh $GERRITHOST 21|grep \Welcome to Gerrit Code Review\` then - echo Your gerrit setup was succesfull! + echo Your gerrit setup was successful! else echo There seems to be trouble. echo please have the output of: ssh - logerrit @@ -90,7 +90,7 @@ case $1 in nextchange) if test -n `git status -s -uno` then - echo You have uncommited changes. Please commit or stash these: + echo You have uncommitted changes. Please commit or stash these: git status exit 1 fi @@ -129,7 +129,7 @@ case $1 in echo no Change-Id given on the command line, reviewing change$CHANGEID fi MESSAGEREQ= - read -p 'was the change verified to build sucessfully (+) or found not to build (-) or none of that ()? ' VERIFIED + read -p 'was the change verified to build successfully (+) or found not to build (-) or none of that ()? ' VERIFIED ask_tristate $VERIFIED case $ANSWER in y) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: logerrit
logerrit |6 ++ 1 file changed, 6 insertions(+) New commits: commit 689defb4ad5582fbcfc2d3d57e321e31b10a16b9 Author: Bjoern Michaelsen bjoern.michael...@canonical.com Date: Tue Jul 10 12:40:01 2012 +0200 check for uncommited work before executing a nextchange Change-Id: I12b03bb778da712cfe48543949d9634be5221419 diff --git a/logerrit b/logerrit index e5b2ba5..05346d9 100755 --- a/logerrit +++ b/logerrit @@ -73,6 +73,12 @@ case $1 in git push $GERRITURL HEAD:refs/for/$BRANCH ;; nextchange) + if test -n `git status -s -uno` + then + echo You have uncommited changes. Please commit or stash these: + git status + exit 1 + fi CHANGEID=`git log --format=format:%b -1 HEAD|grep Change-Id|cut -d: -f2|tr -d \ ` if test -z $CHANGEID then ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: logerrit
logerrit | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) New commits: commit 616ad0b94ca3f20080d19595b6a69a2a6969 Author: Miklos Vajna vmik...@suse.cz Date: Fri Jun 29 09:59:14 2012 +0200 logerrit review: fix missing escaping, codereview - code-review Change-Id: Icf5facbb59cba2116ae3fc6bdfc035673cf47985 diff --git a/logerrit b/logerrit index 52be193..851af7d 100755 --- a/logerrit +++ b/logerrit @@ -127,13 +127,13 @@ case $1 in ask_tristate $CODEREVIEW case $ANSWER in y) - CODEREVIEWFLAG=--codereview=2 + CODEREVIEWFLAG=--code-review=2 ;; n) - CODEREVIEWFLAG=--codereview=1 + CODEREVIEWFLAG=--code-review=1 ;; *) - CODEREVIEWFLAG=--codereview=1 + CODEREVIEWFLAG=--code-review=1 ;; esac ;; @@ -142,15 +142,15 @@ case $1 in ask_tristate $CODEREVIEW case $ANSWER in y) - CODEREVIEWFLAG=--codereview=-1 + CODEREVIEWFLAG=--code-review=-1 MESSAGEREQ=$MESSAGEREQ and explain why you have reservations about the code ;; n) - CODEREVIEWFLAG=--codereview=-2 + CODEREVIEWFLAG=--code-review=-2 MESSAGEREQ=$MESSAGEREQ and explain why you want to block this ;; *) - CODEREVIEWFLAG=--codereview=-1 + CODEREVIEWFLAG=--code-review=-1 MESSAGEREQ=$MESSAGEREQ and explain why you have reservations about the code ;; esac @@ -159,7 +159,7 @@ case $1 in ;; esac read -p please type a friendly comment$MESSAGEREQ: MESSAGE - echo ssh ${GERRITHOST?} gerrit review -m \$MESSAGE\ $VERIFIEDFLAG $CODEREVIEWFLAG $CHANGEID + echo ssh ${GERRITHOST?} gerrit review -m '\'$MESSAGE'\' $VERIFIEDFLAG $CODEREVIEWFLAG $CHANGEID ;; checkout) get_SHA_for_change $2 ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: logerrit
logerrit |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit b0cb1955daf41617a3abc72f153d858570d6e515 Author: Bjoern Michaelsen bjoern.michael...@canonical.com Date: Tue Jun 26 18:45:02 2012 +0200 do not submit a change for now as that removes the ref on gerrit Change-Id: I699aad760823a8ccbfc7dc93bf0658b5222dff71 diff --git a/logerrit b/logerrit index b3d2233..52be193 100755 --- a/logerrit +++ b/logerrit @@ -123,11 +123,11 @@ case $1 in ask_tristate $CODEREVIEW case $ANSWER in y) - read -p 'do you approve and submit the change (+) too, or prefer someone else to do that ()? ' CODEREVIEW + read -p 'do you approve the change (+) too, or prefer someone else to do that ()? ' CODEREVIEW ask_tristate $CODEREVIEW case $ANSWER in y) - CODEREVIEWFLAG=--codereview=2 --submit + CODEREVIEWFLAG=--codereview=2 ;; n) CODEREVIEWFLAG=--codereview=1 ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: logerrit
logerrit | 187 +++ 1 file changed, 187 insertions(+) New commits: commit fe49f23529a52c33ca3e2f673d242273bcaa7108 Author: Bjoern Michaelsen bjoern.michael...@canonical.com Date: Wed Jun 20 15:42:27 2012 -0500 add helper script for gerrit CLI integration Change-Id: I5705530ee4d5b93bc66ca23463098ac45f49323d diff --git a/logerrit b/logerrit new file mode 100755 index 000..b3d2233 --- /dev/null +++ b/logerrit @@ -0,0 +1,187 @@ +#!/bin/sh + +#GERRITHOST=gerrit.libreoffice.org +GERRITHOST=logerrit +GERRITURL=ssh://$GERRITHOST/core + +get_SHA_for_change() { + SHA=`ssh ${GERRITHOST?} gerrit query --all-approvals change:$1|grep ref|tail -1|cut -d: -f2` +} + +ask_tristate() { + case $1 in + [yY] | [yY][Ee][Ss] | [+] ) + ANSWER=y + ;; + [nN] | [n|N][O|o] | [-] ) + ANSWER=n + ;; + [] ) + ANSWER= + ;; + * ) + echo Please answer with either +,-,y,n,yes,no or the empty string. + exit 1 + ;; + esac + +} + +case $1 in + help) + echo Usage: ./logerrit subcommand [options] + echo subcommands: + echo test test your gerrit setup + echo submit [BRANCH] submit your change for review to a branch + echo nextchange [BRANCH] reset branch to the remote to start with the next change + echo checkout CHANGEIDcheckout the changes for review + echo pull CHANGEIDpull (and merge) the changes on current branch + echo cherry-pick CHANGEID cherry-pick the change on current branch + echo patch CHANGEID show the change as a patch + echo review [CHANGEID]interactively review a change (current one if no changeid given) + echo query query for changes for review on project core + echo any other gerrit command + exit + ;; + test) + if test -n `ssh $GERRITHOST 21|grep \Welcome to Gerrit Code Review\` + then + echo Your gerrit setup was succesfull! + else + echo There seems to be trouble. + echo please have the output of: ssh - logerrit + echo at hand when looking for help. + fi + ;; + submit) + BRANCH=$2 + if test -z $BRANCH + then + BRANCH=`git symbolic-ref HEAD 2 /dev/null` + BRANCH=${BRANCH##refs/heads/} + if test -z $BRANCH + then + echo no branch specified, and could not guess the current branch + exit 1 + fi + echo no branch specified, guessing current branch $BRANCH + fi + git push $GERRITURL HEAD:refs/for/$BRANCH + ;; + nextchange) + CHANGEID=`git log --format=format:%b -1 HEAD|grep Change-Id|cut -d: -f2|tr -d \ ` + if test -z $CHANGEID + then + CHANGEID=NOCHANGEID + fi + BACKUPBRANCH=backup/$CHANGEID-`date +%F-%H%M%S` + git branch $BACKUPBRANCH + echo current state backed up as $BACKUPBRANCH + BRANCH=$2 + if test -z $BRANCH + then + BRANCH=`git symbolic-ref HEAD 2 /dev/null` + BRANCH=${BRANCH##refs/heads/} + if test -z $BRANCH + then + echo no branch specified, and could not guess the current branch + exit 1 + fi + echo no branch specified, guessing current branch $BRANCH + fi + git reset --hard remotes/origin/$BRANCH + ;; + review) + CHANGEID=$2 + if test -z $CHANGEID + then + CHANGEID=`git log --format=format:%b -1 HEAD|grep Change-Id|cut -d: -f2` + if test -z $CHANGEID + then + echo could not find a Change-Id in your last commit, sorry + exit 1 + fi + echo no Change-Id given on the command line, reviewing change$CHANGEID + fi + MESSAGEREQ= + read -p 'was the