Kaydet (Commit) 15e9f568 authored tarafından Bjoern Michaelsen's avatar Bjoern Michaelsen

add draft-submittal to logerrit and retab

Change-Id: I5f52d9c81c28c9a4b23eaf043e7b67b1fc6d82d9
üst 646b992e
...@@ -32,7 +32,8 @@ ask_tristate() { ...@@ -32,7 +32,8 @@ ask_tristate() {
} }
submit() { submit() {
BRANCH=$1 TYPE=$1
BRANCH=$2
if test -z "$BRANCH" if test -z "$BRANCH"
then then
BRANCH=`git symbolic-ref HEAD 2> /dev/null` BRANCH=`git symbolic-ref HEAD 2> /dev/null`
...@@ -44,7 +45,7 @@ submit() { ...@@ -44,7 +45,7 @@ submit() {
fi fi
echo "no branch specified, guessing current branch $BRANCH" echo "no branch specified, guessing current branch $BRANCH"
fi fi
git push $GERRITURL HEAD:refs/for/$BRANCH git push $GERRITURL HEAD:refs/$TYPE/$BRANCH
} }
case "$1" in case "$1" in
...@@ -54,11 +55,18 @@ case "$1" in ...@@ -54,11 +55,18 @@ case "$1" in
echo "subcommands:" echo "subcommands:"
echo " setup walking you though your gerrit setup" echo " setup walking you though your gerrit setup"
echo " test test your gerrit setup" echo " test test your gerrit setup"
echo
echo " --- for submitters:" echo " --- for submitters:"
echo " submit [BRANCH] submit your change for review" echo " submit [BRANCH] submit your change for review"
echo " resubmit [BRANCH] create a new Change-Id and submit your change for review" echo " resubmit [BRANCH] create a new Change-Id and submit your change for review"
echo " (yes, this modifies your last commit)" echo " (yes, this modifies your last commit)"
echo " submit-draft [BRANCH] submit your change as draft"
echo " resubmit-draft [BRANCH] create a new Change-Id and submit your change as draft"
echo " (yes, this modifies your last commit)"
echo " (yes, this modifies your last commit)"
echo " nextchange [BRANCH] reset branch to the remote to start with the next change" echo " nextchange [BRANCH] reset branch to the remote to start with the next change"
echo "Note: drafts are only visibly to yourself and those that you explicitly add as reviewers."
echo
echo " --- for reviewers:" echo " --- for reviewers:"
echo " checkout CHANGEID checkout the changes for review" echo " checkout CHANGEID checkout the changes for review"
echo " pull CHANGEID pull (and merge) the changes on current branch" echo " pull CHANGEID pull (and merge) the changes on current branch"
...@@ -67,6 +75,7 @@ case "$1" in ...@@ -67,6 +75,7 @@ case "$1" in
echo " review [CHANGEID] interactively review a change (current one if no changeid given)" echo " review [CHANGEID] interactively review a change (current one if no changeid given)"
echo " query .... query for changes for review on project core" echo " query .... query for changes for review on project core"
echo " <any other gerrit command>" echo " <any other gerrit command>"
echo
echo "advanced users should consider using git review instead:" echo "advanced users should consider using git review instead:"
echo "http://wiki.documentfoundation.org/Development/GitReview" echo "http://wiki.documentfoundation.org/Development/GitReview"
exit exit
...@@ -109,11 +118,18 @@ case "$1" in ...@@ -109,11 +118,18 @@ case "$1" in
fi fi
;; ;;
submit) submit)
submit $2 submit 'for' $2
;; ;;
resubmit) resubmit)
git log -1 --pretty=%B | grep -v ^Change-Id: | git commit --amend -F - git log -1 --pretty=%B | grep -v ^Change-Id: | git commit --amend -F -
submit $2 submit 'for' $2
;;
submit-draft)
submit drafts $2
;;
resubmit-draft)
git log -1 --pretty=%B | grep -v ^Change-Id: | git commit --amend -F -
submit drafts $2
;; ;;
nextchange) nextchange)
if test -n "`git status -s -uno`" if test -n "`git status -s -uno`"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment