Changeset - e285bb7abb28
[Not reviewed]
default
1 14 0
Mads Kiilerich (mads) - 9 years ago 2016-12-19 04:46:48
mads@kiilerich.com
scripts: apply whitespace cleanup to more files - opt out instead of opt in
15 files changed with 149 insertions and 153 deletions:
0 comments (0 inline, 0 general)
.travis.yml
Show inline comments
 
language: python
 
python:
 
  - "2.6"
 
  - "2.7"
 

	
 
env:  
 
env:
 
  - TEST_DB=sqlite:////tmp/kallithea_test.sqlite
 
  - TEST_DB=mysql://root@127.0.0.1/kallithea_test
 
  - TEST_DB=postgresql://postgres@127.0.0.1/kallithea_test
 

	
 
services:
 
  - mysql
 
  - postgresql
 

	
 
# command to install dependencies
 
before_script:
 
  - mysql -e 'create database kallithea_test;'
 
  - psql -c 'create database kallithea_test;' -U postgres
 
  - git --version
 

	
 
before_install:
 
  - sudo apt-get remove git
 
  - sudo add-apt-repository ppa:pdoes/ppa -y
 
  - sudo apt-get update -y
 
  - sudo apt-get install git -y
 

	
 
install:
 
  - pip install mysql-python psycopg2 mock unittest2
 
  - pip install . --use-mirrors
 

	
docs/images/.img
Show inline comments
 
deleted file
docs/make.bat
Show inline comments
 
@ECHO OFF
 

	
 
REM Command file for Sphinx documentation
 

	
 
if "%SPHINXBUILD%" == "" (
 
	set SPHINXBUILD=sphinx-build
 
    set SPHINXBUILD=sphinx-build
 
)
 
set BUILDDIR=_build
 
set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .
 
if NOT "%PAPER%" == "" (
 
	set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
 
    set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
 
)
 

	
 
if "%1" == "" goto help
 

	
 
if "%1" == "help" (
 
	:help
 
	echo.Please use `make ^<target^>` where ^<target^> is one of
 
	echo.  html       to make standalone HTML files
 
	echo.  dirhtml    to make HTML files named index.html in directories
 
	echo.  singlehtml to make a single large HTML file
 
	echo.  pickle     to make pickle files
 
	echo.  json       to make JSON files
 
	echo.  htmlhelp   to make HTML files and a HTML help project
 
	echo.  qthelp     to make HTML files and a qthelp project
 
	echo.  devhelp    to make HTML files and a Devhelp project
 
	echo.  epub       to make an epub
 
	echo.  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter
 
	echo.  text       to make text files
 
	echo.  man        to make manual pages
 
	echo.  changes    to make an overview over all changed/added/deprecated items
 
	echo.  linkcheck  to check all external links for integrity
 
	echo.  doctest    to run all doctests embedded in the documentation if enabled
 
	goto end
 
    :help
 
    echo.Please use `make ^<target^>` where ^<target^> is one of
 
    echo.  html       to make standalone HTML files
 
    echo.  dirhtml    to make HTML files named index.html in directories
 
    echo.  singlehtml to make a single large HTML file
 
    echo.  pickle     to make pickle files
 
    echo.  json       to make JSON files
 
    echo.  htmlhelp   to make HTML files and a HTML help project
 
    echo.  qthelp     to make HTML files and a qthelp project
 
    echo.  devhelp    to make HTML files and a Devhelp project
 
    echo.  epub       to make an epub
 
    echo.  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter
 
    echo.  text       to make text files
 
    echo.  man        to make manual pages
 
    echo.  changes    to make an overview over all changed/added/deprecated items
 
    echo.  linkcheck  to check all external links for integrity
 
    echo.  doctest    to run all doctests embedded in the documentation if enabled
 
    goto end
 
)
 

	
 
if "%1" == "clean" (
 
	for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
 
	del /q /s %BUILDDIR%\*
 
	goto end
 
    for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
 
    del /q /s %BUILDDIR%\*
 
    goto end
 
)
 

	
 
if "%1" == "html" (
 
	%SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
 
	echo.
 
	echo.Build finished. The HTML pages are in %BUILDDIR%/html.
 
	goto end
 
    %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
 
    echo.
 
    echo.Build finished. The HTML pages are in %BUILDDIR%/html.
 
    goto end
 
)
 

	
 
if "%1" == "dirhtml" (
 
	%SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
 
	echo.
 
	echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
 
	goto end
 
    %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
 
    echo.
 
    echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
 
    goto end
 
)
 

	
 
if "%1" == "singlehtml" (
 
	%SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
 
	echo.
 
	echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
 
	goto end
 
    %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
 
    echo.
 
    echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
 
    goto end
 
)
 

	
 
if "%1" == "pickle" (
 
	%SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
 
	echo.
 
	echo.Build finished; now you can process the pickle files.
 
	goto end
 
    %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
 
    echo.
 
    echo.Build finished; now you can process the pickle files.
 
    goto end
 
)
 

	
 
if "%1" == "json" (
 
	%SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
 
	echo.
 
	echo.Build finished; now you can process the JSON files.
 
	goto end
 
    %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
 
    echo.
 
    echo.Build finished; now you can process the JSON files.
 
    goto end
 
)
 

	
 
if "%1" == "htmlhelp" (
 
	%SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
 
	echo.
 
	echo.Build finished; now you can run HTML Help Workshop with the ^
 
    %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
 
    echo.
 
    echo.Build finished; now you can run HTML Help Workshop with the ^
 
.hhp project file in %BUILDDIR%/htmlhelp.
 
	goto end
 
    goto end
 
)
 

	
 
if "%1" == "qthelp" (
 
	%SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
 
	echo.
 
	echo.Build finished; now you can run "qcollectiongenerator" with the ^
 
    %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
 
    echo.
 
    echo.Build finished; now you can run "qcollectiongenerator" with the ^
 
.qhcp project file in %BUILDDIR%/qthelp, like this:
 
	echo.^> qcollectiongenerator %BUILDDIR%\qthelp\Kallithea.qhcp
 
	echo.To view the help file:
 
	echo.^> assistant -collectionFile %BUILDDIR%\qthelp\Kallithea.ghc
 
	goto end
 
    echo.^> qcollectiongenerator %BUILDDIR%\qthelp\Kallithea.qhcp
 
    echo.To view the help file:
 
    echo.^> assistant -collectionFile %BUILDDIR%\qthelp\Kallithea.ghc
 
    goto end
 
)
 

	
 
if "%1" == "devhelp" (
 
	%SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
 
	echo.
 
	echo.Build finished.
 
	goto end
 
    %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
 
    echo.
 
    echo.Build finished.
 
    goto end
 
)
 

	
 
if "%1" == "epub" (
 
	%SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
 
	echo.
 
	echo.Build finished. The epub file is in %BUILDDIR%/epub.
 
	goto end
 
    %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
 
    echo.
 
    echo.Build finished. The epub file is in %BUILDDIR%/epub.
 
    goto end
 
)
 

	
 
if "%1" == "latex" (
 
	%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
 
	echo.
 
	echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
 
	goto end
 
    %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
 
    echo.
 
    echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
 
    goto end
 
)
 

	
 
if "%1" == "text" (
 
	%SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
 
	echo.
 
	echo.Build finished. The text files are in %BUILDDIR%/text.
 
	goto end
 
    %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
 
    echo.
 
    echo.Build finished. The text files are in %BUILDDIR%/text.
 
    goto end
 
)
 

	
 
if "%1" == "man" (
 
	%SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
 
	echo.
 
	echo.Build finished. The manual pages are in %BUILDDIR%/man.
 
	goto end
 
    %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
 
    echo.
 
    echo.Build finished. The manual pages are in %BUILDDIR%/man.
 
    goto end
 
)
 

	
 
if "%1" == "changes" (
 
	%SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
 
	echo.
 
	echo.The overview file is in %BUILDDIR%/changes.
 
	goto end
 
    %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
 
    echo.
 
    echo.The overview file is in %BUILDDIR%/changes.
 
    goto end
 
)
 

	
 
if "%1" == "linkcheck" (
 
	%SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
 
	echo.
 
	echo.Link check complete; look for any errors in the above output ^
 
    %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
 
    echo.
 
    echo.Link check complete; look for any errors in the above output ^
 
or in %BUILDDIR%/linkcheck/output.txt.
 
	goto end
 
    goto end
 
)
 

	
 
if "%1" == "doctest" (
 
	%SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
 
	echo.
 
	echo.Testing of doctests in the sources finished, look at the ^
 
    %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
 
    echo.
 
    echo.Testing of doctests in the sources finished, look at the ^
 
results in %BUILDDIR%/doctest/output.txt.
 
	goto end
 
    goto end
 
)
 

	
 
:end
docs/theme/nature/static/nature.css_t
Show inline comments
 
/**
 
 * Sphinx stylesheet -- default theme
 
 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 */
 
 
 

	
 
@import url("basic.css");
 
 
 

	
 
/* -- page layout ----------------------------------------------------------- */
 
 
 

	
 
body {
 
    font-family: Arial, sans-serif;
 
    font-size: 100%;
 
    background-color: #111;
 
    color: #555;
 
    margin: 0;
 
    padding: 0;
 
}
 

	
 
div.documentwrapper {
 
    float: left;
 
    width: 100%;
 
}
 

	
 
div.bodywrapper {
 
    margin: 0 0 0 230px;
 
}
 

	
 
hr{
 
    border: 1px solid #B1B4B6;
 
}
 
 
 

	
 
div.document {
 
    background-color: #eee;
 
}
 
 
 

	
 
div.body {
 
    background-color: #ffffff;
 
    color: #3E4349;
 
    padding: 0 30px 30px 30px;
 
    font-size: 0.8em;
 
}
 
 
 

	
 
div.footer {
 
    color: #555;
 
    width: 100%;
 
    padding: 13px 0;
 
    text-align: center;
 
    font-size: 75%;
 
}
 
 
 

	
 
div.footer a {
 
    color: #444;
 
    text-decoration: underline;
 
}
 
 
 

	
 
div.related {
 
    background-color: #577632;
 
    line-height: 32px;
 
    color: #fff;
 
    text-shadow: 0px 1px 0 #444;
 
    font-size: 0.80em;
 
}
 
 
 

	
 
div.related a {
 
    color: #E2F3CC;
 
}
 
 
 

	
 
div.sphinxsidebar {
 
    font-size: 0.75em;
 
    line-height: 1.5em;
 
}
 

	
 
div.sphinxsidebarwrapper{
 
    padding: 20px 0;
 
}
 
 
 

	
 
div.sphinxsidebar h3,
 
div.sphinxsidebar h4 {
 
    font-family: Arial, sans-serif;
 
    color: #222;
 
    font-size: 1.2em;
 
    font-weight: normal;
 
    margin: 0;
 
    padding: 5px 10px;
 
    background-color: #ddd;
 
    text-shadow: 1px 1px 0 white
 
}
 

	
 
div.sphinxsidebar h4{
 
    font-size: 1.1em;
 
}
 
 
 

	
 
div.sphinxsidebar h3 a {
 
    color: #444;
 
}
 
 
 
 
 

	
 
div.sphinxsidebar p {
 
    color: #888;
 
    padding: 5px 20px;
 
}
 
 
 

	
 
div.sphinxsidebar p.topless {
 
}
 
 
 

	
 
div.sphinxsidebar ul {
 
    margin: 10px 20px;
 
    padding: 0;
 
    color: #000;
 
}
 
 
 

	
 
div.sphinxsidebar a {
 
    color: #444;
 
}
 
 
 

	
 
div.sphinxsidebar input {
 
    border: 1px solid #ccc;
 
    font-family: sans-serif;
 
    font-size: 1em;
 
}
 

	
 
div.sphinxsidebar input[type=text]{
 
    margin-left: 20px;
 
}
 

	
 
div.sphinxsidebar input[type=image] {
 
    border: 0;
 
}
 
 
 

	
 
/* -- body styles ----------------------------------------------------------- */
 
 
 

	
 
a {
 
    color: #005B81;
 
    text-decoration: none;
 
}
 
 
 

	
 
a:hover {
 
    color: #E32E00;
 
    text-decoration: underline;
 
}
 
 
 

	
 
div.body h1,
 
div.body h2,
 
div.body h3,
 
div.body h4,
 
div.body h5,
 
div.body h6 {
 
    font-family: Arial, sans-serif;
 
    background-color: #BED4EB;
 
    font-weight: normal;
 
    color: #212224;
 
    margin: 30px 0px 10px 0px;
 
    padding: 5px 0 5px 10px;
 
    text-shadow: 0px 1px 0 white
 
}
 
 
 

	
 
div.body h1 { border-top: 20px solid white; margin-top: 0; font-size: 200%; }
 
div.body h2 { font-size: 150%; background-color: #C8D5E3; }
 
div.body h3 { font-size: 120%; background-color: #D8DEE3; }
 
div.body h4 { font-size: 110%; background-color: #D8DEE3; }
 
div.body h5 { font-size: 100%; background-color: #D8DEE3; }
 
div.body h6 { font-size: 100%; background-color: #D8DEE3; }
 
 
 

	
 
a.headerlink {
 
    color: #c60f0f;
 
    font-size: 0.8em;
 
    padding: 0 4px 0 4px;
 
    text-decoration: none;
 
}
 
 
 

	
 
a.headerlink:hover {
 
    background-color: #c60f0f;
 
    color: white;
 
}
 
 
 

	
 
div.body p, div.body dd, div.body li {
 
    line-height: 1.5em;
 
}
 
 
 

	
 
div.admonition p.admonition-title + p {
 
    display: inline;
 
}
 

	
 
div.highlight{
 
    background-color: white;
 
}
 

	
 
div.note {
 
    background-color: #eee;
 
    border: 1px solid #ccc;
 
}
 
 
 

	
 
div.seealso {
 
    background-color: #ffc;
 
    border: 1px solid #ff6;
 
}
 
 
 

	
 
div.topic {
 
    background-color: #eee;
 
}
 
 
 

	
 
div.warning {
 
    background-color: #ffe4e4;
 
    border: 1px solid #f66;
 
}
 
 
 

	
 
p.admonition-title {
 
    display: inline;
 
}
 
 
 

	
 
p.admonition-title:after {
 
    content: ":";
 
}
 
 
 

	
 
pre {
 
    padding: 10px;
 
    background-color: White;
 
    color: #222;
 
    line-height: 1.2em;
 
    border: 1px solid #C6C9CB;
 
    font-size: 1.2em;
 
    margin: 1.5em 0 1.5em 0;
 
    box-shadow: 1px 1px 1px #d8d8d8;
 
}
 
 
 

	
 
tt {
 
    background-color: #ecf0f3;
 
    color: #222;
 
    padding: 1px 2px;
 
    font-size: 1.2em;
 
    font-family: monospace;
 
}
init.d/celeryd-upstart.conf
Show inline comments
 
# celeryd - run the celeryd daemon as an upstart job for kallithea
 
# Change variables/paths as necessary and place file /etc/init/celeryd.conf
 
# start/stop/restart as normal upstart job (ie: $ start celeryd)
 

	
 
description	"Celery for Kallithea Mercurial Server"
 
author		"Matt Zuba <matt.zuba@goodwillaz.org"
 
description     "Celery for Kallithea Mercurial Server"
 
author          "Matt Zuba <matt.zuba@goodwillaz.org"
 

	
 
start on starting kallithea
 
stop on stopped kallithea
 

	
 
respawn
 

	
 
umask 0022
 

	
 
env PIDFILE=/tmp/celeryd.pid
 
env APPINI=/var/hg/kallithea/production.ini
 
env HOME=/var/hg
 
env USER=hg
 
# To use group (if different from user), you must edit sudoers file and change
 
# root's entry from (ALL) to (ALL:ALL)
 
# env GROUP=hg
 

	
 
script
 
    COMMAND="/var/hg/.virtualenvs/kallithea/bin/paster celeryd $APPINI --pidfile=$PIDFILE"
 
    if [ -z "$GROUP" ]; then
 
        exec sudo -u $USER $COMMAND
 
    else
 
        exec sudo -u $USER -g $GROUP $COMMAND
 
    fi
 
end script
init.d/kallithea-daemon-arch
Show inline comments
 
@@ -26,45 +26,45 @@ $APP_PATH/$CONF_NAME"
 

	
 
if [[ -r $PID_FILE ]]; then
 
    read -r PID < "$PID_FILE"
 
    if [[ $PID && ! -d /proc/$PID ]]; then
 
        unset PID
 
        rm_daemon $DAEMON
 
    fi
 
fi
 

	
 
case "$1" in
 
start)
 
    stat_busy "Starting $DAEMON"
 
    export HOME=$APP_PATH
 
    [ -z "$PID" ] && $APPL $ARGS &>/dev/null
 
    if [ $? = 0 ]; then
 
        add_daemon $DAEMON
 
        stat_done
 
    else
 
        stat_fail
 
        exit 1
 
    fi
 
    ;;
 
stop)
 
    stat_busy "Stopping $DAEMON"
 
    [ -n "$PID" ] && kill $PID &>/dev/null 
 
    [ -n "$PID" ] && kill $PID &>/dev/null
 
    if [ $? = 0 ]; then
 
        rm_daemon $DAEMON
 
        stat_done
 
    else
 
        stat_fail
 
        exit 1
 
    fi
 
    ;;
 
restart)
 
    $0 stop
 
    sleep 1
 
    $0 start
 
    ;;
 
status)
 
    stat_busy "Checking $name status";
 
    ck_status $name
 
    ;;
 
*)
 
    echo "usage: $0 {start|stop|restart|status}"
 
esac
 
\ No newline at end of file
 
esac
init.d/kallithea-daemon-debian
Show inline comments
 
#!/bin/sh -e
 
########################################
 
#### THIS IS A DEBIAN INIT.D SCRIPT ####
 
########################################
 
 
 

	
 
### BEGIN INIT INFO
 
# Provides:          kallithea          
 
# Provides:          kallithea
 
# Required-Start:    $all
 
# Required-Stop:     $all
 
# Default-Start:     2 3 4 5
 
# Default-Stop:      0 1 6
 
# Short-Description: starts instance of kallithea
 
# Description:       starts instance of kallithea using start-stop-daemon
 
### END INIT INFO
 
 
 

	
 
APP_NAME="kallithea"
 
APP_HOMEDIR="opt"
 
APP_PATH="/$APP_HOMEDIR/$APP_NAME"
 
 
 

	
 
CONF_NAME="production.ini"
 
 
 

	
 
PID_PATH="$APP_PATH/$APP_NAME.pid"
 
LOG_PATH="$APP_PATH/$APP_NAME.log"
 
 
 

	
 
PYTHON_PATH="/$APP_HOMEDIR/$APP_NAME-venv"
 
 
 

	
 
RUN_AS="root"
 
 
 

	
 
DAEMON="$PYTHON_PATH/bin/paster"
 
 
 

	
 
DAEMON_OPTS="serve --daemon \
 
 --user=$RUN_AS \
 
 --group=$RUN_AS \
 
 --pid-file=$PID_PATH \
 
 --log-file=$LOG_PATH  $APP_PATH/$CONF_NAME"
 
 
 
 
 

	
 

	
 
start() {
 
  echo "Starting $APP_NAME"
 
  PYTHON_EGG_CACHE="/tmp" start-stop-daemon -d $APP_PATH \
 
      --start --quiet \
 
      --pidfile $PID_PATH \
 
      --user $RUN_AS \
 
      --exec $DAEMON -- $DAEMON_OPTS
 
}
 
 
 

	
 
stop() {
 
  echo "Stopping $APP_NAME"
 
  start-stop-daemon -d $APP_PATH \
 
      --stop --quiet \
 
      --pidfile $PID_PATH || echo "$APP_NAME - Not running!"
 
 
 

	
 
  if [ -f $PID_PATH ]; then
 
    rm $PID_PATH
 
  fi
 
}
 
 
 

	
 
status() {
 
  echo -n "Checking status of $APP_NAME ... "
 
  pid=`cat $PID_PATH`
 
  status=`ps ax | grep $pid | grep -ve grep`
 
  if [ "$?" -eq 0 ]; then
 
    echo "running"
 
  else
 
    echo "NOT running"
 
  fi
 
}
 
 
 

	
 
case "$1" in
 
  status)
 
   status
 
    ;;
 
  start)
 
    start
 
    ;;
 
  stop)
 
    stop
 
    ;;
 
  restart)
 
    echo "Restarting $APP_NAME"
 
    ### stop ###
 
    stop
 
    wait
 
    ### start ###
 
    start
 
    ;;
 
  *)
 
    echo "Usage: $0 {start|stop|restart}"
 
    exit 1
 
esac
 
\ No newline at end of file
 
esac
init.d/kallithea-daemon-gentoo
Show inline comments
 
@@ -35,27 +35,27 @@ start() {
 
    ebegin "Starting $APP_NAME"
 
    start-stop-daemon -d $APP_PATH -e PYTHON_EGG_CACHE="/tmp" \
 
        --start --quiet \
 
        --pidfile $PID_PATH \
 
        --user $RUN_AS \
 
        --exec $DAEMON -- $DAEMON_OPTS
 
    eend $?
 
}
 

	
 
stop() {
 
    ebegin "Stopping $APP_NAME"
 
    start-stop-daemon -d $APP_PATH \
 
        --stop --quiet \
 
        --pidfile $PID_PATH || echo "$APP_NAME - Not running!"
 
    if [ -f $PID_PATH ]; then
 
        rm $PID_PATH
 
    fi
 
    eend $?
 
}
 

	
 
restartdelay() {
 
    #stop()
 
    echo "sleep3"
 
    sleep 3
 
    
 

	
 
    #start()
 
}
init.d/kallithea-daemon-redhat
Show inline comments
 
@@ -108,25 +108,25 @@ case "$1" in
 
    echo -n $"Stopping $DESC: "
 
    stop_kallithea
 
    echo
 
    ;;
 
  status)
 
    status_kallithea
 
    RETVAL=$?
 
    if [ ! $RETVAL -eq 0 ]; then
 
      echo "Kallithea server is running..."
 
    else
 
      echo "Kallithea server is stopped."
 
    fi
 
    ;;
 
  restart)
 
    echo -n $"Restarting $DESC: "
 
    restart_kallithea
 
    echo
 
    ;;
 
  *)
 
    echo $"Usage: $0 {start|stop|restart|status}"
 
    RETVAL=1
 
    ;;
 
esac
 

	
 
exit $RETVAL
 
\ No newline at end of file
 
exit $RETVAL
init.d/kallithea-upstart.conf
Show inline comments
 
# kallithea - run the kallithea daemon as an upstart job
 
# Change variables/paths as necessary and place file /etc/init/kallithea.conf
 
# start/stop/restart as normal upstart job (ie: $ start kallithea)
 

	
 
description	"Kallithea Mercurial Server"
 
author		"Matt Zuba <matt.zuba@goodwillaz.org"
 
description     "Kallithea Mercurial Server"
 
author          "Matt Zuba <matt.zuba@goodwillaz.org"
 

	
 
start on (local-filesystems and runlevel [2345])
 
stop on runlevel [!2345]
 

	
 
respawn
 

	
 
umask 0022
 

	
 
env PIDFILE=/var/hg/kallithea/kallithea.pid
 
env LOGFILE=/var/hg/kallithea/log/kallithea.log
 
env APPINI=/var/hg/kallithea/production.ini
 
env HOME=/var/hg
 
env USER=hg
 
env GROUP=hg
 

	
 
exec /var/hg/.virtualenvs/kallithea/bin/paster serve --user=$USER --group=$GROUP --pid-file=$PIDFILE --log-file=$LOGFILE $APPINI
 

	
 
post-stop script
 
	rm -f $PIDFILE
 
    rm -f $PIDFILE
 
end script
init.d/supervisord.conf
Show inline comments
 
@@ -26,26 +26,26 @@ user=username                  ; (defaul
 
environment=HOME=/srv/kallithea       ; (key value pairs to add to environment)
 
;strip_ansi=false            ; (strip ansi escape codes in logs; def. false)
 

	
 
; the below section must remain in the config file for RPC
 
; (supervisorctl/web interface) to work, additional interfaces may be
 
; added by defining them in separate rpcinterface: sections
 
[rpcinterface:supervisor]
 
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
 

	
 
[supervisorctl]
 
serverurl=http://127.0.0.1:9001 ; use an http:// url to specify an inet socket
 
;username=user               ; should be same as http_username if set
 
;password=123                ; should be same as http_password if set
 
;prompt=mysupervisor         ; cmd line prompt (default "supervisor")
 
;history_file=~/.sc_history  ; use readline history if available
 

	
 

	
 
; restart with supervisorctl restart kallithea:*
 
[program:kallithea]
 
numprocs = 1
 
numprocs_start = 5000 # possible should match ports
 
directory=/srv/kallithea
 
command = /srv/kallithea/venv/bin/paster serve my.ini
 
process_name = %(program_name)s_%(process_num)04d
 
redirect_stderr=true 
 
stdout_logfile=/%(here)s/kallithea.log 
 
redirect_stderr=true
 
stdout_logfile=/%(here)s/kallithea.log
kallithea/bin/ldap_sync.conf
Show inline comments
 
[default]
 
api_url = http://kallithea.example.com/_admin/api
 
api_user = admin
 
api_key = XXXXXXXXXXXX
 

	
 
ldap_uri = ldap://ldap.example.com:389
 
ldap_user = cn=kallithea,dc=example,dc=com
 
ldap_key = XXXXXXXXX
 
base_dn = dc=example,dc=com
 

	
 
sync_users = True
 
\ No newline at end of file
 
sync_users = True
kallithea/tests/vcs/aconfig
Show inline comments
 
[user]
 
name = Foo Bar
 
email = foo.bar@example.com
 

	
 
[ui]
 
username = Foo Bar foo.bar@example.com
 

	
 
[universal]
 
foo = bar
 

	
scripts/dbmigrate-test
Show inline comments
 
@@ -98,25 +98,24 @@ install_kallithea() {
 
        pip install --quiet -e .
 
    )
 
}
 

	
 
install_kallithea "$temp/from" "$from_rev_hash"
 
(
 
    cd "$temp/from"
 
    . "$temp/from-env/bin/activate"
 
    announce "Initializing database..."
 
    quiet_if_ok paster setup-db "$config_file" --repos="$temp/repos" --user=doe --email=doe@example.com --password=123456 --no-public-access --force-yes
 
    alembic -c "$config_file" current -v
 
)
 

	
 
install_kallithea "$temp/to" "$to_rev_hash"
 
(
 
    cd "$temp/to"
 
    . "$temp/to-env/bin/activate"
 

	
 
    announce "Commencing database upgrade from shown Alembic revision to head..."
 
    alembic -c "$config_file" current -v
 
    alembic -c "$config_file" upgrade head
 
    announce "Upgrade complete, now at the shown Alembic revision:"
 
    alembic -c "$config_file" current -v
 
)
 

	
scripts/whitespacecleanup.sh
Show inline comments
 
#!/bin/bash -x
 

	
 
# Enforce some consistency in whitespace - just to avoid spurious whitespaces changes
 

	
 
files=`hg loc '*.py' '*.html' '*.css' '*.rst' '*.txt' '*.js' '*.ini' '*.cfg' CONTRIBUTORS LICENSE.md | egrep -v '/lockfiles.py|LICENSE-MERGELY.html|/codemirror/|/fontello/|(graph|mergely|native.history|select2/select2|yui.flot|yui.2.9|jquery.dataTables)\.js$|/email_templates/|/test_dump_html_mails.ref.html'`
 
files=`hg mani | egrep -v '/codemirror/|/fontello/|/email_templates/|(/lockfiles.py|^LICENSE-MERGELY.html|^docs/Makefile|^scripts/whitespacecleanup.sh|/(graph|mergely|native.history|select2/select2|yui.flot|yui.2.9|jquery.dataTables)\.js|/test_dump_html_mails.ref.html|\.png|\.gif|\.ico|\.pot|\.po|\.mo|\.tar\.gz|\.diff)$'`
 

	
 
sed -i -e "s,`printf '\t'`,    ,g" $files
 
sed -i -e "s,  *$,,g" $files
 
sed -i -e 's,\([^ ]\)\\$,\1 \\,g' -e 's,\(["'"'"']["'"'"']["'"'"']\) \\$,\1\\,g' $files
 
# ensure one trailing newline - remove empty last line and make last line include trailing newline:
 
sed -i -e '$,${/^$/d}' -e '$a\' $files
 

	
 
sed -i -e 's,\([^ /]\){,\1 {,g' `hg loc '*.css'`
 
sed -i -e 's|^\([^ /].*,\)\([^ ]\)|\1 \2|g' `hg loc '*.css'`
 

	
 
sed -i -e 's/^\(    [^: ]*\) *: *\([^/]\)/\1: \2/g' kallithea/public/css/{style,contextbar}.css
 
sed -i -e '1s|, |,|g' kallithea/public/css/{style,contextbar}.css
 
sed -i -e 's/^\([^ ,/]\+ [^,]*[^ ,]\) *, *\(.\)/\1,\n\2/g' kallithea/public/css/{style,contextbar}.css
 
sed -i -e 's/^\([^ ,/].*\)   */\1 /g' kallithea/public/css/{style,contextbar}.css
 
sed -i -e 's,^--$,-- ,g' kallithea/templates/email_templates/main.txt
 
sed -i -e 's,[ 	][ 	]*$,,g' -e 's, 	,	,g' kallithea/public/js/graph.js
 

	
 
hg mani | xargs chmod -x
 
hg loc 'set:!binary()&grep("^#!")&!(**_tmpl.py)&!(**/template**)' | xargs chmod +x
 

	
 
hg diff
0 comments (0 inline, 0 general)