#!/bin/bash #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) } submit() { TYPE=$1 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/$TYPE/$BRANCH } logerrit() { echo "Host logerrit gerrit.libreoffice.org" echo " IdentityFile ~/.ssh/id_rsa" echo " User $1" echo " Port 29418" echo " HostName gerrit.libreoffice.org" } case "$1" in help|--help|"") echo "Usage: ./logerrit subcommand [options]" echo "simple and basic tool to interact with LibreOffice gerrit" echo "see https://wiki.documentfoundation.org/Development/gerrit for details." echo echo "subcommands:" echo " setup walking you though your gerrit setup" echo " test test your gerrit setup" echo echo " --- for submitters:" echo " submit [BRANCH] submit your change for review" echo " submit-draft [BRANCH] submit your change as draft" 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 echo " --- for reviewers:" echo " checkout CHANGEID checkout the changes for review" echo " pull CHANGEID pull (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 " query .... query for changes for review on project core" echo " " echo echo "advanced users should consider using git review instead:" echo "http://wiki.documentfoundation.org/Development/GitReview" exit ;; setup) script_canonical_file=$(readlink -f "$0") script_canonical_dir=$(dirname "$script_canonical_file") if ! cd "$script_canonical_dir"; then echo "Can't cd to $script_canonical_dir" exit 1 fi ssh_home="$HOME/.ssh"; ssh_key= created_ssh= if ! test -d $ssh_home; then echo "It appears that you have no ssh setup, running ssh-keygen to create that:" mkdir $ssh_home chmod 0700 $ssh_home created_ssh=TRUE echo echo "Hit enter to generate an ssh key - you will need to enter a pass-phrase" echo read ssh-keygen -t rsa -f "$ssh_home/id_rsa" fi if test -d $ssh_home; then if test -f "$ssh_home/id_rsa.pub"; then ssh_key=$(cat $ssh_home/id_rsa.pub); elif test -f "$ssh_home/id_dsa.pub"; then ssh_key=$(cat $ssh_home/id_dsa.pub); fi fi echo "Please go to https://gerrit.libreoffice.org/ and:" echo "- press the 'register' button in the top right corner" echo "- after login set yourself a username (its recommended to use your IRC-nick)" if test "z$ssh_key" = "z"; then echo "- add your public ssh-key into the ssh keys settings." else echo "- paste the key below into the 'Add SSH Public Key' box." echo echo "$ssh_key" echo fi echo echo "Note that you need to register additional email addresses, if you want to" echo "commit from them. Additional emails must be confirmed by replying to the" echo "invitation mail it sends you." echo read -p 'Which user name did you choose? ' GERRITUSER if test "z$created_ssh" = "z"; then echo echo "Please now add the following to your ~/.ssh/config, creating the file if needed:" echo logerrit $GERRITUSER echo else echo "Automatically creating your ssh config" (logerrit $GERRITUSER) > "$ssh_home/config" fi # setup the remote properly ... git config remote.origin.pushurl ssh://logerrit/core echo "To see if your setup was successful, run './logerrit test' then." # a good place to make sure the hooks are set up ./g -z ;; test) if test -n "$(ssh $GERRITHOST 2>&1|grep "Welcome to Gerrit Code Review")" then echo "Your gerrit setup was successful!" else echo "There seems to be trouble. Please have the output of:" echo "ssh -vvvv "$GERRITHOST echo "at hand when looking for help." fi ;; submit) submit 'for' $2 ;; submit-draft) submit drafts $2 ;; nextchange) if test -n "$(git status -s -uno)" then echo "You have uncommitted 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 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 ;; checkout) get_SHA_for_change $2 git fetch $GERRITURL $SHA && git checkout FETCH_HEAD ;; review) echo "'./logerrit review' has be removed as obsolete." echo "Please use either:" echo " - git-review: https://wiki.documentfoundation.org/Development/GitReview" echo " - or the web-UI directly: https://gerrit.libreoffice.org/" echo "Both provide a better experience." exit 1; ;; pull) get_SHA_for_change $2 git pull $GERRITURL $SHA ;; cherry-pick) get_SHA_for_change $2 git fetch $GERRITURL $SHA && git cherry-pick FETCH_HEAD ;; patch) get_SHA_for_change $2 git fetch $GERRITURL $SHA && git format-patch -1 --stdout FETCH_HEAD ;; query) shift ssh ${GERRITHOST?} gerrit query project:core "$@" ;; testfeature) 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 BRANCH="${BRANCH##feature/}" WORKDIR=$(mktemp -d) if test -z "$WORKDIR" then echo "could no create work directory." exit 1 fi echo workdir at $WORKDIR git clone -s "$(dirname $0)" $WORKDIR/core pushd $WORKDIR/core echo "noop commit: trigger test build for branch feature/$BRANCH" > ../commitmsg echo >> ../commitmsg echo "branch is at:" >> ../commitmsg git log -1|sed -e "s/Change-Id:/XXXXXX:/" >> ../commitmsg git fetch git://gerrit.libreoffice.org/core.git feature/$BRANCH && \ git checkout -b featuretst FETCH_HEAD && \ cp -a .git-hooks/* .git/hooks git commit --allow-empty -F ../commitmsg && \ git push $GERRITURL HEAD:refs/for/feature/$BRANCH popd rm -rf $WORKDIR/core ;; *) ssh ${GERRITHOST?} gerrit "$@" ;; esac lue='distro/suse/suse-3.6'>distro/suse/suse-3.6 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
path: root/sccomp
AgeCommit message (Expand)Author
2015-10-07Actually check the return values of the various Coin* callsStephan Bergmann
2015-09-15Resolves: tdf#88206 replace cppu::WeakImplHelper* etc.Takeshi Abe
2015-04-01Replace remaining getCppuType et al with cppu::UnoTypeStephan Bergmann
2015-01-04stdexcept for std::runtime_errorCaolán McNamara
2015-01-04boost::unordered_map->std::unordered_mapCaolán McNamara
2014-12-18sccomp: Use appropriate OUString functions on string constantsStephan Bergmann
2014-06-06coverity#1202902 Uncaught CoinError exceptionCaolán McNamara
2014-06-04DeInitVCL at end of testsStephan Bergmann
2014-05-15Resolves fdo#70681: fixincludeguards.pl: all that's leftThomas Arnhold
2014-04-24sccomp: sal_Bool->boolNoel Grandin
2014-04-04sccomp: Fix description of com.sun.star.comp.Calc.CoinMPSolver.Matúš Kukan
2014-04-03loplugin:saloverrideStephan Bergmann
2014-04-03remove unnecessary scope qualifier from sal_Bool usesNoel Grandin
2014-04-03override specifier 'override' not allowed on a destructorMatúš Kukan
2014-04-03sccomp: Share common code and have only one library.Matúš Kukan
2014-04-03sccomp_lpsolver does not need to link against scMatúš Kukan
2014-04-02sccomp: Add very simple unit test for lp solvers.Matúš Kukan
2014-04-01sccomp: Make the source files more similar and fix some problems.Matúš Kukan
2014-04-01Install coinmp and lpsolve linear solvers in parallel.Matúš Kukan
2014-04-01Revert "Allow to build lpsolver based on CoinMP library."Matúš Kukan
2014-03-26First batch of adding SAL_OVERRRIDE to overriding function declarationsStephan Bergmann
2014-03-04fdo#54938: Convert some places to use cppu::supportsServiceMarcos Paulo de Souza
2014-03-03Allow to build lpsolver based on CoinMP library.Matúš Kukan
2014-03-03118160: Use CoinMP as replacement for lp_solve.Andre Fischer
2014-03-03Rename sccomp/source/solver/solver.cxx to solver-lpsolve.cxxMatúš Kukan
2014-02-26cppuhelper: retrofit std::exception into overriding exception specsStephan Bergmann
2014-02-26Remove visual noise from sccompAlexander Wilms
2014-02-23Remove unneccessary commentsAlexander Wilms
2013-12-17Adapt all (non-extension, SharedLibrary) .components to environment="..."Stephan Bergmann
2013-11-14make l10n buildable separatelyBjoern Michaelsen
2013-11-11remove unnecessary use of OUString constructorNoel Grandin
2013-10-25fdo#54938: More uses of cppu::supportsServiceMarcos Paulo de Souza
2013-08-16Related: fdo#38838 ToInt64 and a EqualsIgnoreCaseAscii variant are now unusedCaolán McNamara
2013-06-04MPLv2 subset improvements.Michael Meeks
2013-06-03re-base on ALv2 code. Includes:Michael Meeks
2013-04-07mass removal of rtl:: prefixes for O(U)String*Luboš Luňák
2013-04-05new module i18nlangtagEike Rathke
2013-03-29ResMgr with LanguageTagEike Rathke
2013-03-27Missing #include "sal/config.h"Stephan Bergmann
2013-03-27-Wunused-macrosStephan Bergmann
2013-03-14remove legacy build.pl prj/build.lst files.Michael Meeks
2013-03-08fdo#60691 add modelines to *.src and *.hrc filesBorim
2013-02-28remove all d.lstMichael Stahl