Changeset - 8867673c8192
[Not reviewed]
default
0 9 0
Mads Kiilerich - 10 years ago 2015-08-26 17:28:58
madski@unity3d.com
docs: consistent spacing between text
9 files changed with 0 insertions and 43 deletions:
0 comments (0 inline, 0 general)
docs/api/api.rst
Show inline comments
 
@@ -249,13 +249,12 @@ get_user
 

	
 
Get a user by username or userid. The result is empty if user can't be found.
 
If userid param is skipped, it is set to id of user who is calling this method.
 
Any userid can be specified when the command is executed using the api_key of a user with admin rights.
 
Regular users can only speicy their own userid.
 

	
 

	
 
INPUT::
 

	
 
    id : <id_for_response>
 
    api_key : "<api_key>"
 
    method :  "get_user"
 
    args :    {
 
@@ -292,13 +291,12 @@ OUTPUT::
 
get_users
 
---------
 

	
 
List all existing users.
 
This command can only be executed using the api_key of a user with admin rights.
 

	
 

	
 
INPUT::
 

	
 
    id : <id_for_response>
 
    api_key : "<api_key>"
 
    method :  "get_users"
 
    args :    { }
 
@@ -322,22 +320,20 @@ OUTPUT::
 
                "last_login":   "<last_login>",
 
              },
 
 
            ]
 
    error:  null
 

	
 

	
 
.. _create-user:
 

	
 
create_user
 
-----------
 

	
 
Create new user.
 
This command can only be executed using the api_key of a user with admin rights.
 

	
 

	
 
INPUT::
 

	
 
    id : <id_for_response>
 
    api_key : "<api_key>"
 
    method :  "create_user"
 
    args :    {
 
@@ -378,13 +374,12 @@ Example::
 
update_user
 
-----------
 

	
 
Update the given user if such user exists.
 
This command can only be executed using the api_key of a user with admin rights.
 

	
 

	
 
INPUT::
 

	
 
    id : <id_for_response>
 
    api_key : "<api_key>"
 
    method :  "update_user"
 
    args :    {
 
@@ -423,13 +418,12 @@ OUTPUT::
 
delete_user
 
-----------
 

	
 
Delete the given user if such a user exists.
 
This command can only be executed using the api_key of a user with admin rights.
 

	
 

	
 
INPUT::
 

	
 
    id : <id_for_response>
 
    api_key : "<api_key>"
 
    method :  "delete_user"
 
    args :    {
 
@@ -448,13 +442,12 @@ OUTPUT::
 
get_user_group
 
--------------
 

	
 
Get an existing user group.
 
This command can only be executed using the api_key of a user with admin rights.
 

	
 

	
 
INPUT::
 

	
 
    id : <id_for_response>
 
    api_key : "<api_key>"
 
    method :  "get_user_group"
 
    args :    {
 
@@ -491,13 +484,12 @@ OUTPUT::
 
get_user_groups
 
---------------
 

	
 
List all existing user groups.
 
This command can only be executed using the api_key of a user with admin rights.
 

	
 

	
 
INPUT::
 

	
 
    id : <id_for_response>
 
    api_key : "<api_key>"
 
    method :  "get_user_groups"
 
    args :    { }
 
@@ -518,13 +510,12 @@ OUTPUT::
 
create_user_group
 
-----------------
 

	
 
Create a new user group.
 
This command can only be executed using the api_key of a user with admin rights.
 

	
 

	
 
INPUT::
 

	
 
    id : <id_for_response>
 
    api_key : "<api_key>"
 
    method :  "create_user_group"
 
    args:     {
 
@@ -550,13 +541,12 @@ add_user_to_user_group
 
----------------------
 

	
 
Adds a user to a user group. If the user already is in that group, success will be
 
``false``.
 
This command can only be executed using the api_key of a user with admin rights.
 

	
 

	
 
INPUT::
 

	
 
    id : <id_for_response>
 
    api_key : "<api_key>"
 
    method :  "add_user_user_group"
 
    args:     {
 
@@ -578,13 +568,12 @@ remove_user_from_user_group
 
---------------------------
 

	
 
Remove a user from a user group. If the user isn't in the given group, success will
 
be ``false``.
 
This command can only be executed using the api_key of a user with admin rights.
 

	
 

	
 
INPUT::
 

	
 
    id : <id_for_response>
 
    api_key : "<api_key>"
 
    method :  "remove_user_from_user_group"
 
    args:     {
 
@@ -695,13 +684,12 @@ get_repos
 
---------
 

	
 
List all existing repositories.
 
This command can only be executed using the api_key of a user with admin rights,
 
or that of a regular user with at least read access to the repository.
 

	
 

	
 
INPUT::
 

	
 
    id : <id_for_response>
 
    api_key : "<api_key>"
 
    method :  "get_repos"
 
    args:     { }
 
@@ -733,13 +721,12 @@ get_repo_nodes
 
--------------
 

	
 
Return a list of files and directories for a given path at the given revision.
 
It is possible to specify ret_type to show only ``files`` or ``dirs``.
 
This command can only be executed using the api_key of a user with admin rights.
 

	
 

	
 
INPUT::
 

	
 
    id : <id_for_response>
 
    api_key : "<api_key>"
 
    method :  "get_repo_nodes"
 
    args:     {
 
@@ -769,13 +756,12 @@ groups will be created. For example "foo
 
"foo", "bar" (with "foo" as parent), and create "baz" repository with
 
"bar" as group.
 
This command can only be executed using the api_key of a user with admin rights,
 
or that of a regular user with create repository permission.
 
Regular users cannot specify owner parameter.
 

	
 

	
 
INPUT::
 

	
 
    id : <id_for_response>
 
    api_key : "<api_key>"
 
    method :  "create_repo"
 
    args:     {
 
@@ -819,13 +805,12 @@ update_repo
 

	
 
Update a repository.
 
This command can only be executed using the api_key of a user with admin rights,
 
or that of a regular user with create repository permission.
 
Regular users cannot specify owner parameter.
 

	
 

	
 
INPUT::
 

	
 
    id : <id_for_response>
 
    api_key : "<api_key>"
 
    method :  "update_repo"
 
    args:     {
 
@@ -883,13 +868,12 @@ return success message immediately and a
 
asynchronously.
 
This command can only be executed using the api_key of a user with admin
 
rights, or with the global fork permission, by a regular user with create
 
repository permission and at least read access to the repository.
 
Regular users cannot specify owner parameter.
 

	
 

	
 
INPUT::
 

	
 
    id : <id_for_response>
 
    api_key : "<api_key>"
 
    method :  "fork_repo"
 
    args:     {
 
@@ -917,13 +901,12 @@ delete_repo
 

	
 
Delete a repository.
 
This command can only be executed using the api_key of a user with admin rights,
 
or that of a regular user with admin access to the repository.
 
When ``forks`` param is set it is possible to detach or delete forks of the deleted repository.
 

	
 

	
 
INPUT::
 

	
 
    id : <id_for_response>
 
    api_key : "<api_key>"
 
    method :  "delete_repo"
 
    args:     {
 
@@ -943,13 +926,12 @@ OUTPUT::
 
grant_user_permission
 
---------------------
 

	
 
Grant permission for a user on the given repository, or update the existing one if found.
 
This command can only be executed using the api_key of a user with admin rights.
 

	
 

	
 
INPUT::
 

	
 
    id : <id_for_response>
 
    api_key : "<api_key>"
 
    method :  "grant_user_permission"
 
    args:     {
 
@@ -970,13 +952,12 @@ OUTPUT::
 
revoke_user_permission
 
----------------------
 

	
 
Revoke permission for a user on the given repository.
 
This command can only be executed using the api_key of a user with admin rights.
 

	
 

	
 
INPUT::
 

	
 
    id : <id_for_response>
 
    api_key : "<api_key>"
 
    method  : "revoke_user_permission"
 
    args:     {
 
@@ -997,13 +978,12 @@ grant_user_group_permission
 
---------------------------
 

	
 
Grant permission for a user group on the given repository, or update the
 
existing one if found.
 
This command can only be executed using the api_key of a user with admin rights.
 

	
 

	
 
INPUT::
 

	
 
    id : <id_for_response>
 
    api_key : "<api_key>"
 
    method :  "grant_user_group_permission"
 
    args:     {
docs/installation.rst
Show inline comments
 
@@ -120,68 +120,60 @@ Upgrading Kallithea from Python Package 
 

	
 
   These directions will use '{version}' to note that this is the version of
 
   Kallithea that these files were used with.  If backing up your Kallithea
 
   instance from version 0.1 to 0.2, the ``my.ini`` file could be
 
   backed up to ``my.ini.0-1``.
 

	
 

	
 
If using a SQLite database, stop the Kallithea process/daemon/service, and
 
then make a copy of the database file::
 

	
 
 service kallithea stop
 
 cp kallithea.db kallithea.db.{version}
 

	
 

	
 
Back up your configuration file::
 

	
 
 cp my.ini my.ini.{version}
 

	
 

	
 
Ensure that you are using the Python virtual environment that you originally
 
installed Kallithea in by running::
 

	
 
 pip freeze
 

	
 
This will list all packages installed in the current environment.  If
 
Kallithea isn't listed, activate the correct virtual environment::
 

	
 
 source /srv/kallithea/venv/bin/activate
 

	
 

	
 
Once you have verified the environment you can upgrade Kallithea with::
 

	
 
 pip install --upgrade kallithea
 

	
 

	
 
Then run the following command from the installation directory::
 

	
 
 paster make-config Kallithea my.ini
 

	
 
This will display any changes made by the new version of Kallithea to your
 
current configuration. It will try to perform an automerge. It is recommended
 
that you recheck the content after the automerge.
 

	
 
.. note::
 
   Please always make sure your .ini files are up to date. Errors can
 
   often be caused by missing parameters added in new versions.
 

	
 

	
 
It is also recommended that you rebuild the whoosh index after upgrading since
 
the new whoosh version could introduce some incompatible index changes. Please
 
read the changelog to see if there were any changes to whoosh.
 

	
 

	
 
The final step is to upgrade the database. To do this simply run::
 

	
 
 paster upgrade-db my.ini
 

	
 
This will upgrade the schema and update some of the defaults in the database,
 
and will always recheck the settings of the application, if there are no new
 
options that need to be set.
 

	
 

	
 
.. note::
 
   The DB schema upgrade library has some limitations and can sometimes fail if you try to
 
   upgrade from older major releases. In such a case simply run upgrades sequentially, e.g.,
 
   upgrading from 0.1.X to 0.3.X should be done like this: 0.1.X. > 0.2.X > 0.3.X
 
   You can always specify what version of Kallithea you want to install for example in pip
 
   `pip install Kallithea==0.2`
docs/installation_win.rst
Show inline comments
 
@@ -203,13 +203,12 @@ Open your web server, and go to http://1
 

	
 
It works!! :-)
 

	
 
Remark:
 
If it does not work the first time, Ctrl-C the CMD process and start it again. Don't forget the "http://" in Internet Explorer.
 

	
 

	
 
What this guide does not cover:
 

	
 
- Installing Celery
 
- Running Kallithea as a Windows Service. You can investigate here:
 

	
 
  - http://pypi.python.org/pypi/wsgisvc
docs/installation_win_old.rst
Show inline comments
 
@@ -175,13 +175,12 @@ Change commandline from::
 
%comspec% /k ""C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall.bat"" x86
 

	
 
to::
 

	
 
%comspec% /k ""C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall.bat"" amd64
 

	
 

	
 
In that CMD (loaded with VS2008 PATHs) type::
 

	
 
  cd C:\Kallithea\Env\Scripts (or similar)
 
  activate
 

	
 
The prompt will change into "(Env) C:\\Kallithea\\Env\\Scripts" or similar
 
@@ -244,13 +243,12 @@ Open yout web server, and go to http://1
 
It works!! :-)
 

	
 
Remark:
 
If it does not work first time, just Ctrl-C the CMD process and start it
 
again. Don't forget the "http://" in Internet Explorer
 

	
 

	
 
What this Guide does not cover:
 

	
 
- Installing Celery
 
- Running Kallithea as Windows Service. You can investigate here:
 

	
 
  - http://pypi.python.org/pypi/wsgisvc
docs/setup.rst
Show inline comments
 
@@ -15,13 +15,12 @@ following command to do so::
 

	
 
This will create the file ``my.ini`` in the current directory. This
 
configuration file contains the various settings for Kallithea, e.g.
 
proxy port, email settings, usage of static files, cache, Celery
 
settings, and logging.
 

	
 

	
 
Next, you need to create the databases used by Kallithea. It is recommended to
 
use PostgreSQL or SQLite (default). If you choose a database other than the
 
default, ensure you properly adjust the database URL in your ``my.ini``
 
configuration file to use this other database. Kallithea currently supports
 
PostgreSQL, SQLite and MySQL databases. Create the database by running
 
the following command::
 
@@ -36,13 +35,12 @@ up for you.
 

	
 
The ``setup-db`` values can also be given on the command line.
 
Example::
 

	
 
    paster setup-db my.ini --user=nn --password=secret --email=nn@example.org --repos=/srv/repos
 

	
 

	
 
The ``setup-db`` command will create all needed tables and an
 
admin account. When choosing a root path you can either use a new
 
empty location, or a location which already contains existing
 
repositories. If you choose a location which contains existing
 
repositories Kallithea will add all of the repositories at the chosen
 
location to its database.  (Note: make sure you specify the correct
 
@@ -141,13 +139,12 @@ The ``--repo-location`` option allows th
 
usually, the location is retrieved from the Kallithea database.
 

	
 
The ``--index-only`` option can be used to limit the indexed repositories to a comma-separated list::
 

	
 
    paster make-index my.ini --index-only=vcs,kallithea
 

	
 

	
 
To keep your index up-to-date it is necessary to do periodic index builds;
 
for this, it is recommended to use a crontab entry. Example::
 

	
 
    0  3  *  *  *  /path/to/virtualenv/bin/paster make-index /path/to/kallithea/my.ini
 

	
 
When using incremental mode (the default), Whoosh will check the last
 
@@ -427,13 +424,12 @@ reverse-proxy setup with basic auth:
 
      RewriteEngine On
 
      RewriteCond %{LA-U:REMOTE_USER} (.+)
 
      RewriteRule .* - [E=RU:%1]
 
      RequestHeader set X-Forwarded-User %{RU}e
 
    </Location>
 

	
 

	
 
.. note::
 
   If you enable proxy pass-through authentication, make sure your server is
 
   only accessible through the proxy. Otherwise, any client would be able to
 
   forge the authentication header and could effectively become authenticated
 
   using any account of their liking.
 

	
 
@@ -533,13 +529,12 @@ Celery. So for example setting `BROKER_H
 
`broker.host` in the configuration file.
 

	
 
To start the Celery process, run::
 

	
 
 paster celeryd <configfile.ini>
 

	
 

	
 
.. note::
 
   Make sure you run this command from the same virtualenv, and with the same
 
   user that Kallithea runs.
 

	
 

	
 
HTTPS support
 
@@ -674,13 +669,12 @@ Here is a sample configuration file for 
 
            ProxyPassReverse / http://127.0.0.1:5000/
 

	
 
            #to enable https use line below
 
            #SetEnvIf X-Url-Scheme https HTTPS=1
 
    </VirtualHost>
 

	
 

	
 
Additional tutorial
 
http://pylonsbook.com/en/1.1/deployment.html#using-apache-to-proxy-requests-to-pylons
 

	
 

	
 
Apache as subdirectory
 
----------------------
 
@@ -731,13 +725,12 @@ that, you'll need to:
 
- Enable the ``WSGIScriptAlias`` directive for the WSGI dispatch script,
 
  as in the following example. Once again, check the paths are
 
  correctly specified.
 

	
 
Here is a sample excerpt from an Apache Virtual Host configuration file:
 

	
 

	
 
.. code-block:: apache
 

	
 
    WSGIDaemonProcess kallithea \
 
        processes=1 threads=4 \
 
        python-path=/srv/kallithea/pyenv/lib/python2.7/site-packages
 
    WSGIScriptAlias / /srv/kallithea/dispatch.wsgi
docs/usage/general.rst
Show inline comments
 
@@ -129,13 +129,12 @@ Kallithea has the ability to clone repos
 
Currently it supports the following options:
 

	
 
- hg  -> hg clone
 
- svn -> hg clone
 
- git -> git clone
 

	
 

	
 
.. note:: svn -> hg cloning requires the ``hgsubversion`` library to be
 
   installed.
 

	
 
If you need to clone repositories that are protected via basic authentication,
 
you can pass the credentials in the URL, e.g.
 
``http://user:passw@remote.server/repo``. Kallithea will then try to login and
docs/usage/performance.rst
Show inline comments
 
@@ -13,16 +13,14 @@ the best performance.
 
  usually more important than a fast CPU.
 

	
 
* Sluggish loading of the front page can easily be fixed by grouping repositories or by
 
  increasing cache size (see below). This includes using the lightweight dashboard
 
  option and ``vcs_full_cache`` setting in .ini file.
 

	
 

	
 
Follow these few steps to improve performance of Kallithea system.
 

	
 

	
 
1. Increase cache
 

	
 
    Tweak beaker cache settings in the ini file. The actual effect of that
 
    is questionable.
 

	
 
2. Switch from SQLite to PostgreSQL or MySQL
docs/usage/troubleshooting.rst
Show inline comments
 
.. _troubleshooting:
 

	
 

	
 
===============
 
Troubleshooting
 
===============
 

	
 
:Q: **Missing static files?**
 
:A: Make sure either to set the ``static_files = true`` in the .ini file or
docs/usage/vcs_support.rst
Show inline comments
 
@@ -36,13 +36,12 @@ The paster server is controlled in the .
 
    use = egg:waitress#main
 

	
 
or::
 

	
 
    use = egg:gunicorn#main
 

	
 

	
 
Also make sure to comment out the following options::
 

	
 
    threadpool_workers =
 
    threadpool_max_requests =
 
    use_threadpool =
 

	
0 comments (0 inline, 0 general)