#!/usr/bin/env bash # # Wrapper for git to handle more subdirs at the same time # if [ -n "$g_debug" ] ; then set -x fi SUBMODULES_ALL="dictionaries helpcontent2 translations" pushd $(dirname $0) > /dev/null if [ -f config_host.mk ] ; then # we are in the BUILDDIR SRC_ROOT=$(cat config_host.mk | grep -a SRC_ROOT | sed -e "s/.*=//") else SRC_ROOT=$(pwd) fi popd > /dev/null COREDIR="$SRC_ROOT" usage() { git echo echo "Usage: g [options] [git (checkout|clone|fetch|grep|pull|push|reset) [git options/args..]]" echo "" echo " -z restore the git hooks and do other sanity checks" } refresh_submodule_hooks() { local repo=$1 local hook local hook_name if [ -d ${repo?}/.git ] ; then # use core's hook by default for hook_name in $(ls -1 "${COREDIR?}/.git-hooks") ; do hook="${repo?}/.git/hooks/${hook_name?}" if [ ! -e "${hook?}" -o -L "${hook?}" ] ; then rm -f "${hook?}" ln -sf "${COREDIR?}/.git-hooks/${hook_name?}" "${hook?}" fi done # override if need be by the submodules' own hooks for hook_name in $(ls -1 "${COREDIR?}/${repo?}/.git-hooks" 2>/dev/null) ; do hook="${repo?}/.git/hooks/${hook_name?}" if [ ! -e "${hook?}" -o -L "${hook?}" ] ; then rm -f "${hook?}" ln -sf "${COREDIR?}/${repo?}/.git-hooks/${hook_name?}" "${hook?}" fi done elif [ -d .git/modules/${repo}/hooks ] ; then for hook_name in $(ls -1 "${COREDIR?}/.git-hooks") ; do hook=".git/modules/${repo?}/hooks/${hook_name?}" if [ ! -e "${hook?}" -o -L "${hook?}" ] ; then rm -f "${hook?}" ln -sf "${COREDIR?}/.git-hooks/${hook_name?}" "${hook?}" fi done # override if need be by the submodules' own hooks for hook_name in $(ls -1 "${COREDIR?}/${repo?}/.git-hooks" 2>/dev/null) ; do hook=".git/modules/${repo?}/hooks/${hook_name?}" if [ ! -e "${hook?}" -o -L "${hook?}" ] ; then rm -f "${hook?}" ln -sf "${COREDIR?}/${repo?}/.git-hooks/${hook_name?}" "${hook?}" fi done fi } refresh_all_hooks() { local repo local hook_name local hook pushd "${COREDIR?}" > /dev/null for hook_name in $(ls -1 "${COREDIR?}/.git-hooks") ; do hook=".git/hooks/${hook_name?}" if [ ! -e "${hook?}" -o -L "${hook?}" ] ; then rm -f "${hook?}" ln -sf "${COREDIR?}/.git-hooks/${hook_name?}" "${hook?}" fi done for repo in ${SUBMODULES_ALL?} ; do refresh_submodule_hooks $repo done # In our workflow, it's always gerrit that does the submodule updates, so # better ignoring them to avoid accidentally including those changes in our # commits. # 'git submodule status' can be still used to see if a submodule has such # changes. for repo in ${SUBMODULES_CONFIGURED?} ; do git config submodule.$repo.ignore all done popd > /dev/null } set_push_url() { local repo repo="$1" if [ -n "$repo" ] ; then pushd "${COREDIR?}/${repo?}" > /dev/null else pushd "${COREDIR?}" > /dev/null repo="core" fi echo "setting up push url for ${repo?}" if [ "${repo?}" = "helpcontent2" ] ; then git config remote.origin.pushurl "ssh://${PUSH_USER}logerrit/help" else git config remote.origin.pushurl "ssh://${PUSH_USER}logerrit/${repo?}" fi popd > /dev/null } set_push_urls() { PUSH_USER="$1" set_push_url for repo in ${SUBMODULES_ACTIVE?} ; do set_push_url "${repo?}" done } get_active_submodules() { SUBMODULES_ACTIVE="" local repo for repo in ${SUBMODULES_ALL?} ; do if [ -d ${repo?}/.git -o -f ${repo?}/.git ] ; then SUBMODULES_ACTIVE="${repo?} ${SUBMODULES_ACTIVE?}" fi done } get_configured_submodules() { SUBMODULES_CONFIGURED="" if [ -f config_host.mk ] ; then SUBMODULES_CONFIGURED=$(cat config_host.mk | grep -a GIT_NEEDED_SUBMODULES | sed -e "s/.*=//") else # if we need the configured submoduel before the configuration is done. we assumed you want them all SUBMODULES_CONFIGURED=${SUBMODULES_ALL?} fi } get_git_reference() { REFERENCED_GIT="" if [ -f config_host.mk ]; then REFERENCED_GIT=$(cat config_host.mk | grep -a GIT_REFERENCE_SRC | sed -e "s/.*=//") fi LINKED_GIT="" if [ -f config_host.mk ]; then LINKED_GIT=$(cat config_host.mk | grep -a GIT_LINK_SRC | sed -e "s/.*=//") fi } do_shortcut_update() { local module local repo for module in $SUBMODULES_CONFIGURED ; do if [ ! -d ${module?}/.git ] ; then case "${module?}" in helpcontent2) if [ -d clone/help/.git ] ; then repo="clone/help/.git" fi ;; *) if [ -d clone/${module?}/.git ] ; then repo="clone/${module?}/.git" fi ;; esac if [ -n "$repo" ] ; then cp -r "${repo?}" "${module?}/." fi fi done } do_git_cmd() { echo "cmd:$@" git "$@" git submodule foreach git "$@" $KEEP_GOING } do_checkout() { local cmd local create_branch="0" local branch local module git checkout "$@" || return $? for cmd in "$@" ; do if [ "$cmd" = "-f" ]; then return 0 elif [ "$cmd" = "-b" ] ; then create_branch=1 elif [ "$create_branch" = "1" ] ; then branch="$cmd" create_branch=0 fi done if [ -f .gitmodules ] ; then git submodule update if [ -n "$branch" ] ; then git submodule foreach git checkout -b ${branch} HEAD || return $? fi else # now that is the nasty case we moved prior to submodules # delete the submodules left over if any for module in $SUBMODULES_ALL ; do echo "clean-up submodule $module" rm -fr ${module} done # make sure we have the needed repo in clone ./g clone && ./g -f checkout "$@" || return $? fi return $? } do_reset() { git reset "$@" || return $? if [ -f .gitmodules ] ; then git submodule update || return $? else # now that is the nasty case we moved prior to submodules # delete the submodules left over if any for module in $SUBMODULES_ALL ; do echo "clean-up submodule $module" rm -fr ${module} done # make sure we have the needed repo in clone ./g clone && ./g -f reset "$@" fi return $?; } do_init_modules() { local module local configured do_shortcut_update for module in $SUBMODULES_CONFIGURED ; do if [ -n "$LINKED_GIT" ] ; then if ! [ -d ".git/modules/${module}" ]; then ./bin/git-new-module-workdir "${LINKED_GIT}/${module}" "${module}" fi fi configured=$(git config --local --get submodule.${module}.url) if [ -z "$configured" ] ; then git submodule init $module || return $? fi done for module in $SUBMODULES_CONFIGURED ; do if [ -n "$REFERENCED_GIT" ] ; then git submodule update --reference $REFERENCED_GIT/.git/modules/$module $module || return $? else git submodule update $module || return $? fi done return 0 } # no params, no action if [ "$#" -eq "0" ] ; then usage fi if [ ! "`type -p git`" ]; then echo "Cannot find the git binary! Is git installed and is in PATH?" exit 1 fi get_active_submodules get_configured_submodules get_git_reference # extra params for some commands, like log EXTRA= COMMAND="$1" PAGER= RELATIVIZE=1 PUSH_ALL= PUSH_USER= PUSH_NOTES= LAST_WORKING= SET_LAST_WORKING= ALLOW_EMPTY= KEEP_GOING= REPORT_REPOS=1 REPORT_COMMANDS=0 REPORT_COMPACT=0 DO_HOOK_REFRESH=false while [ "${COMMAND:0:1}" = "-" ] ; do case "$COMMAND" in -f )KEEP_GOING="||:" ;; -z) refresh_all_hooks exit 0; ;; --set-push-urls) shift PUSH_USER="$1" if [ -n "${PUSH_USER}" ] ; then PUSH_USER="${PUSH_USER}@" fi set_push_urls "$PUSH_USER" exit 0; ;; -*) echo "option: $COMMAND not supported" 1>&2 exit 1 esac shift COMMAND="$1" done shift case "$COMMAND" in branch) do_git_cmd ${COMMAND} "$@" ;; checkout) do_checkout "$@" ;; clone) do_init_modules && refresh_all_hooks ;; fetch) (git fetch "$@" && git submodule foreach git fetch "$@" ) && git submodule update ;; grep) KEEP_GOING="||:" do_git_cmd ${COMMAND} "$@" ;; pull) git pull "$@" && git submodule update && refresh_all_hooks ;; push) git submodule foreach git push "$@" if [ "$?" = "0" ] ; then git push "$@" fi ;; reset) do_reset ;; tag) do_git_cmd ${COMMAND} "$@" ;; "") ;; *) echo "./g does not support command: $COMMAND" 1>&2 exit 1; ;; esac exit $? # vi:set shiftwidth=4 expandtab: tion value='distro/suse/suse-4.0.3'>distro/suse/suse-4.0.3 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
path: root/sw/sdi/_viewsh.sdi
AgeCommit message (Expand)Author
2020-06-03tdf#101211 Add goto prev and next page uno commandsJim Raykowski
2020-05-08tdf#111535 - Add First-line indent, paragraph indent, and tab spaces/Core partgokaysatir
2020-04-14lok: add tabstop changing and callback to send tabstop updatesTomaž Vajngerl
2020-03-30tdf#124686 HideWhiteSpace should be positive Show Whitespaceshameempk
2019-09-04tdf#101977 change tracking: add 'Accept/Reject and jump to next' commandsGabor Kelemen
2019-08-15tdf#122529 lok - table border position manipulationTomaž Vajngerl
2019-08-08tdf#119228 Add 'Resolved Comments' option to the View menu.Scott Clarke
2018-10-12tdf#118621 - Optionally disable floating header/footer menuheiko tietze
2018-04-10tdf#114523 Make inline tooltips for changes optionalheiko tietze
2017-12-09tdf#113715 Fix .uno: names appearing in the customization dialogMaxim Monastirsky
2017-08-17Fix typosAndrea Gelmini
2017-08-17implementing callback for ruler invalidationAditya Dewan
2017-08-10tdf#79167 Change search type through a drop down controlJames Raykowski
2017-07-26convert SfxGroupId to scoped enumNoel Grandin
2017-05-11tdf#107258 Create show/hide all comments toggle button.Gulsah Kose
2017-04-04Make HangingIndent a commandSzymon Kłos
2017-04-04Notebookbar: Separated paragraph spacing controlsSzymon Kłos
2017-03-28remove unused interfaces from sdi filesNoel Grandin
2017-03-22create SfxDisableFlags enumNoel Grandin
2016-11-17tdf#103965: set DisableFlags for SID_PARASPACE_INCREASE/DECREASEMike Kaganski
2016-09-29Page margin popup converted to use outside sidebarSzymon Kłos
2016-09-05Page orientation popup converted to use outside sidebarSzymon Kłos
2016-07-08tdf#83054 Writer: Add "Go to Page" Entry in Edit MenuAkshay Deep
2016-06-23tdf#83830: Page Styles PanelSusobhan Ghosh
2016-06-17tdf#83830: Page Header Panel & Page Footer PanelSusobhan Ghosh
2016-03-18mailmerge: Kill SwMailMergeChildWindow.Jan Holesovsky
2016-02-23methods in .SDI files don't use attributesNoel Grandin
2016-02-05remove commented out stuff from .SDI filesNoel Grandin
2016-02-05remove unused UUID and VERSION from .SDI filesNoel Grandin
2016-02-05remove unused Automation from .SDI filesNoel Grandin
2016-02-04remove unused Cachable keyword from SDI filesNoel Grandin
2016-01-05tdf#90187 Added uno command for track changes bar.Gulsah Kose
2015-08-17tdf#39080 Hide Whitespace UI option added to the View menu.Ashod Nakashian
2015-07-15Convert insert buttons to the generic controllerMaxim Monastirsky
2014-12-07Introduce ParaspaceIncrease/Decrease commands in Writer and CalcMaxim Monastirsky
2014-08-24fdo#73151 Make better use of the sidebarSamuel Mehrbrodt
2014-04-29do not have a separate action for accepting changes in a selectionLuboš Luňák
2014-04-28allow accepting/rejecting changes in a selection (bnc#874790)Luboš Luňák
2014-04-24Finish cleaning up ASCII art in the sw moduleChris Laplante
2014-02-27Remove visual noise from swAlexander Wilms
2014-01-17Add the Navigation buttons to the Search toolbarSamuel Mehrbrodt
2013-11-19Resolves: #i33737# enable in-place editing of Input FieldsOliver-Rainer Wittmann
2013-05-20Resolves: #i121420# merge sidebar featureOliver-Rainer Wittmann
2013-02-09Remark translations german - englishMatthias Freund
2012-11-30re-base on ALv2 code. Includes:Michael Meeks
2012-11-27fdo#48317 - Support jumping to next/previous changeMuhammad Haggag
2012-05-25fdo#34772 Add word count to the status bar in writerMuhammad Haggag