Changeset - fbbe80e3322b
[Not reviewed]
default
0 18 0
Mads Kiilerich - 10 years ago 2015-08-26 17:28:58
madski@unity3d.com
docs: consistent spacing around headings

Start out with 2 empty lines before/after for top level, decrease for deeper
levels.
18 files changed with 38 insertions and 51 deletions:
0 comments (0 inline, 0 general)
README.rst
Show inline comments
 
================
 
Kallithea README
 
================
 

	
 

	
 
About
 
-----
 

	
 
**Kallithea** is a fast and powerful management tool for Mercurial_ and Git_
 
with a built-in push/pull server, full text search and code-review. It works on
 
http/https and has a built in permission/authentication system with the ability
 
@@ -21,12 +22,13 @@ version control systems.
 

	
 
Kallithea was forked from RhodeCode in July 2014 and has been heavily modified.
 

	
 

	
 
Installation
 
------------
 

	
 
Kallithea requires Python_ 2.x and it is recommended to install it in a
 
virtualenv_. Official releases of Kallithea can be installed with::
 

	
 
    pip install kallithea
 

	
 
The development repository is kept very stable and used in production by the
docs/api/api.rst
Show inline comments
 
.. _api:
 

	
 
===
 
API
 
===
 

	
 

	
 
Kallithea has a simple JSON RPC API with a single schema for calling all API
 
methods. Everything is available by sending JSON encoded http(s) requests to
 
``<your_server>/_admin/api``.
 

	
 

	
 
API access for web views
 
@@ -134,13 +133,12 @@ INPUT::
 
OUTPUT::
 

	
 
    id : <id_given_in_input>
 
    result : "Pulled from `<reponame>`"
 
    error :  null
 

	
 

	
 
rescan_repos
 
------------
 

	
 
Rescan repositories. If ``remove_obsolete`` is set,
 
Kallithea will delete repos that are in the database but not in the filesystem.
 
This command can only be executed using the api_key of a user with admin rights.
 
@@ -158,13 +156,12 @@ OUTPUT::
 

	
 
    id : <id_given_in_input>
 
    result : "{'added': [<list of names of added repos>],
 
               'removed': [<list of names of removed repos>]}"
 
    error :  null
 

	
 

	
 
invalidate_cache
 
----------------
 

	
 
Invalidate the cache for 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 or write access to the repository.
 
@@ -181,13 +178,12 @@ INPUT::
 
OUTPUT::
 

	
 
    id : <id_given_in_input>
 
    result : "Caches of repository `<reponame>`"
 
    error :  null
 

	
 

	
 
lock
 
----
 

	
 
Set the locking state on the given repository by the given user.
 
If the param ``userid`` is skipped, it is set to the ID of the user who is calling this method.
 
If param ``locked`` is skipped, the current lock state of the repository is returned.
 
@@ -213,13 +209,12 @@ OUTPUT::
 
                 "locked_since": "<float lock_time>",
 
                 "locked_by": "<username>",
 
                 "msg": "User `<username>` set lock state for repo `<reponame>` to `<false|true>`"
 
             }
 
    error :  null
 

	
 

	
 
get_ip
 
------
 

	
 
Return IP address as seen from Kallithea server, together with all
 
defined IP addresses for given user.
 
This command can only be executed using the api_key of a user with admin rights.
 
@@ -246,13 +241,12 @@ OUTPUT::
 
                                ...
 
                             ]
 
             }
 

	
 
    error :  null
 

	
 

	
 
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.
 
@@ -292,13 +286,12 @@ OUTPUT::
 
                    "repositories": {"repo1": "repository.none"},
 
                    "repositories_groups": {"Group1": "group.read"}
 
                 },
 
            }
 
    error:  null
 

	
 

	
 
get_users
 
---------
 

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

	
 
@@ -379,13 +372,12 @@ OUTPUT::
 
    error:  null
 

	
 
Example::
 

	
 
    kallithea-api create_user username:bent email:bent@example.com firstname:Bent lastname:Bentsen extern_type:ldap extern_name:uid=bent,dc=example,dc=com
 

	
 

	
 
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.
 

	
 
@@ -425,13 +417,12 @@ OUTPUT::
 
                "ldap_dn" :  "<ldap_dn>",
 
                "last_login": "<last_login>",
 
              },
 
            }
 
    error:  null
 

	
 

	
 
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.
 

	
 
@@ -451,13 +442,12 @@ OUTPUT::
 
    result: {
 
              "msg" : "deleted user ID:<userid> <username>",
 
              "user": null
 
            }
 
    error:  null
 

	
 

	
 
get_user_group
 
--------------
 

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

	
 
@@ -495,13 +485,12 @@ OUTPUT::
 
                              },
 
                              …
 
                            ]
 
             }
 
    error : null
 

	
 

	
 
get_user_groups
 
---------------
 

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

	
 
@@ -523,13 +512,12 @@ OUTPUT::
 
               "active":          "<bool>",
 
               },
 
               …
 
              ]
 
    error : null
 

	
 

	
 
create_user_group
 
-----------------
 

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

	
 
@@ -555,13 +543,12 @@ OUTPUT::
 
                     "group_name" :     "<groupname>",
 
                     "active":          "<bool>",
 
               },
 
            }
 
    error:  null
 

	
 

	
 
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.
 
@@ -584,13 +571,12 @@ OUTPUT::
 
              "success": True|False # depends on if member is in group
 
              "msg": "added member `<username>` to a user group `<groupname>` |
 
                      User is already in that group"
 
            }
 
    error:  null
 

	
 

	
 
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.
 
@@ -613,13 +599,12 @@ OUTPUT::
 
              "success":  True|False,  # depends on if member is in group
 
              "msg": "removed member <username> from user group <groupname> |
 
                      User wasn't in group"
 
            }
 
    error:  null
 

	
 

	
 
get_repo
 
--------
 

	
 
Get an existing repository by its name or repository_id. Members will contain
 
either users_group or users associated to that repository.
 
This command can only be executed using the api_key of a user with admin rights,
 
@@ -703,13 +688,12 @@ OUTPUT::
 
                                  },
 
                                  …
 
                 ]
 
            }
 
    error:  null
 

	
 

	
 
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.
 
@@ -742,13 +726,12 @@ OUTPUT::
 
                "enable_statistics": "<bool>",
 
              },
 
              …
 
            ]
 
    error:  null
 

	
 

	
 
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.
 
@@ -775,13 +758,12 @@ OUTPUT::
 
                "type" :        "<type>",
 
              },
 
              …
 
            ]
 
    error:  null
 

	
 

	
 
create_repo
 
-----------
 

	
 
Create a repository. If the repository name contains "/", all needed repository
 
groups will be created. For example "foo/bar/baz" will create repository groups
 
"foo", "bar" (with "foo" as parent), and create "baz" repository with
 
@@ -829,13 +811,12 @@ OUTPUT::
 
                "enable_locking":    "<bool>",
 
                "enable_statistics": "<bool>",
 
              },
 
            }
 
    error:  null
 

	
 

	
 
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.
 
@@ -891,13 +872,12 @@ OUTPUT::
 
                "locked_by": "<username>",
 
                "locked_date": "<float lock_time>",
 
              },
 
            }
 
    error:  null
 

	
 

	
 
fork_repo
 
---------
 

	
 
Create a fork of the given repo. If using Celery, this will
 
return success message immediately and a fork will be created
 
asynchronously.
 
@@ -929,13 +909,12 @@ OUTPUT::
 
    result: {
 
              "msg": "Created fork of `<reponame>` as `<forkname>`",
 
              "success": true
 
            }
 
    error:  null
 

	
 

	
 
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.
 
@@ -958,13 +937,12 @@ OUTPUT::
 
    result: {
 
              "msg": "Deleted repository `<reponame>`",
 
              "success": true
 
            }
 
    error:  null
 

	
 

	
 
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.
 

	
 
@@ -986,13 +964,12 @@ OUTPUT::
 
    result: {
 
              "msg" : "Granted perm: `<perm>` for user: `<username>` in repo: `<reponame>`",
 
              "success": true
 
            }
 
    error:  null
 

	
 

	
 
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.
 

	
 
@@ -1013,13 +990,12 @@ OUTPUT::
 
    result: {
 
              "msg" : "Revoked perm for user: `<username>` in repo: `<reponame>`",
 
              "success": true
 
            }
 
    error:  null
 

	
 

	
 
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.
 
@@ -1042,13 +1018,12 @@ OUTPUT::
 
    result: {
 
              "msg" : "Granted perm: `<perm>` for group: `<usersgroupname>` in repo: `<reponame>`",
 
              "success": true
 
            }
 
    error:  null
 

	
 

	
 
revoke_user_group_permission
 
----------------------------
 

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

	
docs/changelog.rst
Show inline comments
 
@@ -3,7 +3,8 @@
 
=========
 
Changelog
 
=========
 

	
 
Kallithea project doesn't keep its changelog here.  We refer you to our `Mercurial logs`__.
 

	
 

	
 
.. __: https://kallithea-scm.org/repos/kallithea/changelog
docs/contributing.rst
Show inline comments
 
@@ -21,12 +21,13 @@ please use the `mailing list`_ or :ref:`
 

	
 
We use Weblate_ to translate the user interface messages into languages other
 
than English. Join our project on `Hosted Weblate`_ to help us.
 
To register, you can use your Bitbucket or GitHub account. See :ref:`translations`
 
for more details.
 

	
 

	
 
Getting started
 
---------------
 

	
 
To get started with development::
 

	
 
        hg clone https://kallithea-scm.org/repos/kallithea
 
@@ -66,12 +67,13 @@ are::
 

	
 
    -x, --stop            Stop running tests after the first error or failure
 
    -s, --nocapture       Don't capture stdout (any stdout output will be
 
                          printed immediately) [NOSE_NOCAPTURE]
 
    --failed              Run the tests that failed in the last test run.
 

	
 

	
 
Coding/contribution guidelines
 
------------------------------
 

	
 
Kallithea is GPLv3 and we assume all contributions are made by the
 
committer/contributor and under GPLv3 unless explicitly stated. We do care a
 
lot about preservation of copyright and license information for existing code
 
@@ -131,12 +133,13 @@ For now we just have one official branch
 
that it can be (and is) used in production. Experimental changes should live
 
elsewhere (for example in a pull request) until they are ready.
 

	
 
.. _translations:
 
.. include:: ./../kallithea/i18n/how_to
 

	
 

	
 
"Roadmap"
 
---------
 

	
 
We do not have a road map but are waiting for your contributions. Refer to the
 
wiki_ for some ideas of places we might want to go -- contributions in these
 
areas are very welcome.
docs/index.rst
Show inline comments
 
.. _index:
 

	
 
#######################
 
Kallithea Documentation
 
#######################
 

	
 

	
 
**Readme**
 

	
 
.. toctree::
 
   :maxdepth: 1
 

	
 
   readme
 
@@ -65,12 +64,13 @@ Kallithea Documentation
 
Other topics
 
------------
 

	
 
* :ref:`genindex`
 
* :ref:`search`
 

	
 

	
 
.. _virtualenv: http://pypi.python.org/pypi/virtualenv
 
.. _python: http://www.python.org/
 
.. _django: http://www.djangoproject.com/
 
.. _mercurial: http://mercurial.selenic.com/
 
.. _bitbucket: http://bitbucket.org/
 
.. _subversion: http://subversion.tigris.org/
docs/installation.rst
Show inline comments
 
@@ -25,12 +25,13 @@ The following describes three different 
 
  result, removing it is not as straightforward as with a virtualenv, as you'd
 
  have to remove its dependencies manually and make sure that they are not
 
  needed by other packages.
 

	
 
.. _installation-source:
 

	
 

	
 
Installation from repository source
 
-----------------------------------
 

	
 
To install Kallithea in a virtualenv_ using the stable branch of the development
 
repository, follow the instructions below::
 

	
 
@@ -45,12 +46,13 @@ You can now proceed to :ref:`setup`.
 

	
 
To upgrade, simply update the repository with ``hg pull -u`` and restart the
 
server.
 

	
 
.. _installation-virtualenv:
 

	
 

	
 
Installing a released version in a virtualenv
 
---------------------------------------------
 

	
 
It is highly recommended to use a separate virtualenv_ for installing Kallithea.
 
This way, all libraries required by Kallithea will be installed separately from your
 
main Python installation and other applications and things will be less
 
@@ -88,12 +90,13 @@ An additional benefit of virtualenv_ is 
 
  python libraries into the activated virtualenv.
 

	
 
You can now proceed to :ref:`setup`.
 

	
 
.. _installation-without-virtualenv:
 

	
 

	
 
Installing a released version without virtualenv
 
------------------------------------------------
 

	
 
For installation without virtualenv, 'just' use::
 

	
 
    pip install kallithea
 
@@ -104,12 +107,13 @@ globally without using the system's pack
 
To install as a regular user in ``~/.local``, you can use::
 

	
 
    pip install --user kallithea
 

	
 
You can now proceed to :ref:`setup`.
 

	
 

	
 
Upgrading Kallithea from Python Package Index (PyPI)
 
----------------------------------------------------
 

	
 
.. note::
 
   It is strongly recommended that you **always** perform a database and
 
   configuration backup before doing an upgrade.
docs/installation_iis.rst
Show inline comments
 
@@ -9,18 +9,20 @@ preventing you from applying this on IIS
 

	
 
.. note::
 

	
 
    For the best security, it is strongly recommended to only host the site over
 
    a secure connection, e.g. using TLS.
 

	
 

	
 
Prerequisites
 
-------------
 

	
 
Apart from the normal requirements for Kallithea, it is also necessary to get an
 
ISAPI-WSGI bridge module, e.g. isapi-wsgi.
 

	
 

	
 
Installation
 
------------
 

	
 
The following assumes that your Kallithea is at ``c:\inetpub\kallithea``, and
 
will be served from the root of its own website. The changes to serve it in its
 
own virtual folder will be noted where appropriate.
 
@@ -38,13 +40,12 @@ to run on the website and neither will K
 

	
 
.. note::
 

	
 
    The application pool can be the same as an existing application pool,
 
    as long as the Kallithea requirements are met by the existing pool.
 

	
 

	
 
ISAPI handler
 
.............
 

	
 
The ISAPI handler can be generated using::
 

	
 
    paster install-iis my.ini --root=/
 
@@ -86,12 +87,13 @@ disable external auth account activation
 
user database with an external tool, or set it to *Automatic activation of
 
external account*. Finally, save the changes.
 

	
 
The last necessary step is to enable the relevant authentication in IIS, e.g.
 
Windows authentication.
 

	
 

	
 
Troubleshooting
 
---------------
 

	
 
Typically, any issues in this setup will either be entirely in IIS or entirely
 
in Kallithea (or Kallithea's WSGI/paster middleware). Consequently, two
 
different options for finding issues exist: IIS' failed request tracking which
docs/installation_win.rst
Show inline comments
 
.. _installation_win:
 

	
 
================================================================
 
Installation and upgrade on Windows (7/Server 2008 R2 and newer)
 
================================================================
 

	
 

	
 
First time install
 
::::::::::::::::::
 

	
 
Target OS: Windows 7 and newer or Windows Server 2008 R2 and newer
 

	
 
Tested on Windows 8.1, Windows Server 2008 R2 and Windows Server 2012
 

	
 
To install on an older version of Windows, see `<installation_win_old.html>`_
 

	
 

	
 
Step 1 - Install Python
 
-----------------------
 

	
 
Install Python 2.x.y (x = 6 or 7). Latest version is recommended. If you need another version, they can run side by side.
 

	
 
.. warning:: Python 3.x is not supported.
 
@@ -27,13 +27,12 @@ Install Python 2.x.y (x = 6 or 7). Lates
 
- Disable UAC or run the installer with admin privileges. If you chose to disable UAC, do not forget to reboot afterwards.
 

	
 
While writing this guide, the latest version was v2.7.9.
 
Remember the specific major and minor versions installed, because they will
 
be needed in the next step. In this case, it is "2.7".
 

	
 

	
 
Step 2 - Python BIN
 
-------------------
 

	
 
Add Python BIN folder to the path. This can be done manually (editing
 
"PATH" environment variable) or by using Windows Support Tools that
 
come pre-installed in Windows Vista/7 and later.
 
@@ -42,13 +41,12 @@ Open a CMD and type::
 

	
 
  SETX PATH "%PATH%;[your-python-path]" /M
 

	
 
Please substitute [your-python-path] with your Python installation
 
path. Typically this is ``C:\\Python27``.
 

	
 

	
 
Step 3 - Install pywin32 extensions
 
-----------------------------------
 

	
 
Download pywin32 from:
 
http://sourceforge.net/projects/pywin32/files/
 

	
 
@@ -59,13 +57,12 @@ http://sourceforge.net/projects/pywin32/
 
  When writing this guide, the file was:
 
  http://sourceforge.net/projects/pywin32/files/pywin32/Build%20219/pywin32-219.win-amd64-py2.7.exe/download
 
  (x64)
 
  http://sourceforge.net/projects/pywin32/files/pywin32/Build%20219/pywin32-219.win32-py2.7.exe/download
 
  (Win32)
 

	
 

	
 
Step 4 - Install pip
 
--------------------
 

	
 
pip is a package management system for Python. You will need it to install Kallithea and its dependencies.
 

	
 
If you installed Python 2.7.9+, you already have it (as long as you ran the installer with admin privileges or disabled UAC).
 
@@ -84,13 +81,12 @@ If it was not installed or if you are us
 
Note that pip.exe will be placed inside your Python installation's
 
Scripts folder, which is likely not on your path. To correct this,
 
open a CMD and type::
 

	
 
  SETX PATH "%PATH%;[your-python-path]\Scripts" /M
 

	
 

	
 
Step 5 - Kallithea folder structure
 
-----------------------------------
 

	
 
Create a Kallithea folder structure.
 

	
 
This is only an example to install Kallithea. Of course, you can
 
@@ -102,13 +98,12 @@ Create the following folder structure::
 

	
 
  C:\Kallithea
 
  C:\Kallithea\Bin
 
  C:\Kallithea\Env
 
  C:\Kallithea\Repos
 

	
 

	
 
Step 6 - Install virtualenv
 
---------------------------
 

	
 
.. note::
 
   A python virtual environment will allow for isolation between the Python packages of your system and those used for Kallithea.
 
   It is strongly recommended to use it to ensure that Kallithea does not change a dependency that other software uses or vice versa.
 
@@ -120,13 +115,12 @@ In a command prompt type::
 
Virtualenv will now be inside your Python Scripts path (C:\\Python27\\Scripts or similar).
 

	
 
To create a virtual environment, run::
 

	
 
  virtualenv C:\Kallithea\Env
 

	
 

	
 
Step 7 - Install Kallithea
 
--------------------------
 

	
 
In order to install Kallithea, you need to be able to run "pip install kallithea". It will use pip to install the Kallithea Python package and its dependencies.
 
Some Python packages use managed code and need to be compiled.
 
This can be done on Linux without any special steps. On Windows, you will need to install Microsoft Visual C++ compiler for Python 2.7.
 
@@ -147,23 +141,21 @@ The prompt will change into "(Env) C:\\K
 
  pip install kallithea
 

	
 
.. note:: This will take some time. Please wait patiently until it is fully
 
          complete. Some warnings will appear. Don't worry, they are
 
          normal.
 

	
 

	
 
Step 8 - Install git (optional)
 
-------------------------------
 

	
 
Mercurial being a python package, it was installed automatically when doing "pip install kallithea".
 

	
 
You need to install git manually if you want Kallithea to be able to host git repositories.
 

	
 
See http://git-scm.com/book/en/v2/Getting-Started-Installing-Git#Installing-on-Windows for instructions.
 

	
 

	
 
Step 9 - Configuring Kallithea
 
------------------------------
 

	
 
Steps taken from `<setup.html>`_
 

	
 
You have to use the same command prompt as in Step 7, so if you closed
 
@@ -197,13 +189,12 @@ The script will ask you for the admin us
 
The script will ask you for admin mail, answer "admin@xxxx.com" (or whatever you want).
 

	
 
If you make a mistake and the script doesn't end, don't worry: start it again.
 

	
 
If you decided not to install git, you will get errors about it that you can ignore.
 

	
 

	
 
Step 10 - Running Kallithea
 
---------------------------
 

	
 
In the previous command prompt, being in the C:\\Kallithea\\Bin folder, type::
 

	
 
  paster serve production.ini
docs/installation_win_old.rst
Show inline comments
 
.. _installation_win_old:
 

	
 
======================================================================
 
Installation and upgrade on Windows (XP/Vista/Server 2003/Server 2008)
 
======================================================================
 

	
 

	
 
First-time install
 
::::::::::::::::::
 

	
 
Target OS: Windows XP SP3 32-bit English (Clean installation)
 
+ All Windows Updates until 24-may-2012
 

	
 
@@ -21,13 +22,12 @@ Target OS: Windows XP SP3 32-bit English
 
   - http://blog.victorjabur.com/2011/06/05/compiling-python-2-7-modules-on-windows-32-and-64-using-msvc-2008-express/
 
   - http://bugs.python.org/issue7511
 

	
 
Step 1 - Install Visual Studio 2008 Express
 
-------------------------------------------
 

	
 

	
 
Optional: You can also install MinGW, but VS2008 installation is easier.
 

	
 
Download "Visual C++ 2008 Express Edition with SP1" from:
 
http://download.microsoft.com/download/E/8/E/E8EEB394-7F42-4963-A2D8-29559B738298/VS2008ExpressWithSP1ENUX1504728.iso
 
(if not found or relocated, google for "visual studio 2008 express" for updated link. This link was taken from http://stackoverflow.com/questions/15318560/visual-c-2008-express-download-link-dead)
 

	
 
@@ -53,13 +53,12 @@ choose "Visual C++ 2008 Express" when in
 
.. note::
 

	
 
   64-bit: You also need to copy and rename a .bat file to make the Visual C++ compiler work.
 
   I am not sure why this is not necessary for 32-bit.
 
   Copy C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\vcvars64.bat to C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\amd64\vcvarsamd64.bat
 

	
 

	
 
Step 2 -- Install Python
 
------------------------
 

	
 
Install Python 2.x.y (x = 6 or 7) x86 version (32-bit). DO NOT USE A 3.x version.
 
Download Python 2.x.y from:
 
http://www.python.org/download/
 
@@ -70,13 +69,12 @@ Remember the specific major and minor ve
 
be needed in the next step. In this case, it is "2.7".
 

	
 
.. note::
 

	
 
   64-bit: Just download and install the 64-bit version of python.
 

	
 

	
 
Step 3 -- Install Win32py extensions
 
------------------------------------
 

	
 
Download pywin32 from:
 
http://sourceforge.net/projects/pywin32/files/
 

	
 
@@ -90,13 +88,12 @@ http://sourceforge.net/projects/pywin32/
 
  .. note::
 

	
 
     64-bit: Download and install the 64-bit version.
 
     At the time of writing you can find this at:
 
     http://sourceforge.net/projects/pywin32/files/pywin32/Build%20218/pywin32-218.win-amd64-py2.7.exe/download
 

	
 

	
 
Step 4 -- Python BIN
 
--------------------
 

	
 
Add Python BIN folder to the path
 

	
 
You have to add the Python folder to the path, you can do it manually
 
@@ -118,13 +115,12 @@ that came preinstalled in Vista/7 and ca
 

	
 
    SETX PATH "%PATH%;[your-python-path]" /M
 

	
 
  Please substitute [your-python-path] with your Python installation path.
 
  Typically: C:\\Python27
 

	
 

	
 
Step 5 -- Kallithea folder structure
 
------------------------------------
 

	
 
Create a Kallithea folder structure
 

	
 
This is only a example to install Kallithea, you can of course change
 
@@ -136,13 +132,12 @@ Create the following folder structure::
 

	
 
  C:\Kallithea
 
  C:\Kallithea\Bin
 
  C:\Kallithea\Env
 
  C:\Kallithea\Repos
 

	
 

	
 
Step 6 -- Install virtualenv
 
----------------------------
 

	
 
Install Virtual Env for Python
 

	
 
Navigate to: http://www.virtualenv.org/en/latest/index.html#installation
 
@@ -157,13 +152,12 @@ where you downloaded "virtualenv.py", an
 

	
 
 python virtualenv.py C:\Kallithea\Env
 

	
 
(--no-site-packages is now the default behaviour of virtualenv, no need
 
to include it)
 

	
 

	
 
Step 7 -- Install Kallithea
 
---------------------------
 

	
 
Finally, install Kallithea
 

	
 
Close previously opened command prompt/s, and open a Visual Studio 2008
 
@@ -196,13 +190,12 @@ The prompt will change into "(Env) C:\\K
 
 pip install kallithea
 

	
 
(long step, please wait until fully complete)
 

	
 
Some warnings will appear, don't worry as they are normal.
 

	
 

	
 
Step 8 -- Configuring Kallithea
 
-------------------------------
 

	
 
steps taken from http://packages.python.org/Kallithea/setup.html
 

	
 
You have to use the same Visual Studio 2008 command prompt as Step7, so
 
@@ -235,17 +228,15 @@ The script will ask you for admin userna
 
The script will ask you for admin mail, answer "admin@xxxx.com" (or
 
whatever you want)
 

	
 
If you make some mistake and the script does not end, don't worry, start
 
it again.
 

	
 

	
 
Step 9 -- Running Kallithea
 
---------------------------
 

	
 

	
 
In the previous command prompt, being in the C:\\Kallithea\\Bin folder,
 
just type::
 

	
 
 paster serve production.ini
 

	
 
Open yout web server, and go to http://127.0.0.1:5000
 
@@ -254,13 +245,12 @@ 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/overview.rst
Show inline comments
 
.. _overview:
 

	
 
=====================
 
Installation overview
 
=====================
 

	
 

	
 
Some overview and some details that can help understanding the options when
 
installing Kallithea.
 

	
 

	
 
Python environment
 
------------------
docs/setup.rst
Show inline comments
 
@@ -118,12 +118,13 @@ authentication is fully supported.
 
.. note:: In an advanced setup, in order for your ssh access to use
 
          the same permissions as set up via the Kallithea web
 
          interface, you can create an authentication hook to connect
 
          to the Kallithea db and run check functions for permissions
 
          against that.
 

	
 

	
 
Setting up Whoosh full text search
 
----------------------------------
 

	
 
Kallithea provides full text search of repositories using `Whoosh`__.
 

	
 
.. __: https://pythonhosted.org/Whoosh/
 
@@ -381,24 +382,22 @@ When a user logs in for the first time u
 
a matching user account is created in Kallithea with default permissions. An
 
administrator can then modify it using Kallithea's admin interface.
 

	
 
It's also possible for an administrator to create accounts and configure their
 
permissions before the user logs in for the first time, using the :ref:`create-user` API.
 

	
 

	
 
Container-based authentication
 
''''''''''''''''''''''''''''''
 

	
 
In a container-based authentication setup, Kallithea reads the user name from
 
the ``REMOTE_USER`` server variable provided by the WSGI container.
 

	
 
After setting up your container (see `Apache with mod_wsgi`_), you'll need
 
to configure it to require authentication on the location configured for
 
Kallithea.
 

	
 

	
 
Proxy pass-through authentication
 
'''''''''''''''''''''''''''''''''
 

	
 
In a proxy pass-through authentication setup, Kallithea reads the user name
 
from the ``X-Forwarded-User`` request header, which should be configured to be
 
sent by the reverse-proxy server.
 
@@ -707,12 +706,13 @@ Add the following at the end of the .ini
 
    use = egg:PasteDeploy#prefix
 
    prefix = /<someprefix>
 

	
 

	
 
then change ``<someprefix>`` into your chosen prefix
 

	
 

	
 
Apache with mod_wsgi
 
--------------------
 

	
 
Alternatively, Kallithea can be set up with Apache under mod_wsgi. For
 
that, you'll need to:
 

	
 
@@ -804,12 +804,13 @@ Other configuration files
 

	
 
A number of `example init.d scripts`__ can be found in
 
the ``init.d`` directory of the Kallithea source.
 

	
 
.. __: https://kallithea-scm.org/repos/kallithea/files/tip/init.d/ .
 

	
 

	
 
.. _virtualenv: http://pypi.python.org/pypi/virtualenv
 
.. _python: http://www.python.org/
 
.. _Mercurial: http://mercurial.selenic.com/
 
.. _Celery: http://celeryproject.org/
 
.. _Celery documentation: http://docs.celeryproject.org/en/latest/getting-started/index.html
 
.. _RabbitMQ: http://www.rabbitmq.com/
docs/usage/backup.rst
Show inline comments
 
@@ -7,12 +7,13 @@ Backing up Kallithea
 

	
 
Settings
 
--------
 

	
 
Just copy your .ini file, it contains all Kallithea settings.
 

	
 

	
 
Whoosh index
 
------------
 

	
 
The Whoosh index is located in the ``data/index`` directory where you installed
 
Kallithea, i.e., the same place where the ini file is located
 

	
docs/usage/debugging.rst
Show inline comments
 
@@ -6,12 +6,13 @@ Debugging Kallithea
 

	
 
If you encounter problems with Kallithea, here are some instructions
 
on how to debug them.
 

	
 
.. note:: First make sure you're using the latest version available.
 

	
 

	
 
Enable detailed debug
 
---------------------
 

	
 
Kallithea uses the standard Python ``logging`` module to log its output.
 
By default only loggers with ``INFO`` level are displayed. To enable full output
 
change ``level = DEBUG`` for all logging handlers in the currently used .ini file.
docs/usage/email.rst
Show inline comments
 
@@ -12,12 +12,13 @@ cannot be sent, all mails will show up i
 
Before any email can be sent, an SMTP server has to be configured using the
 
configuration file setting ``smtp_server``. If required for that server, specify
 
a username (``smtp_username``) and password (``smtp_password``), a non-standard
 
port (``smtp_port``), encryption settings (``smtp_use_tls`` or ``smtp_use_ssl``)
 
and/or specific authentication parameters (``smtp_auth``).
 

	
 

	
 
Application emails
 
------------------
 

	
 
Kallithea sends an email to `users` on several occasions:
 

	
 
- when comments are given on one of their changesets
 
@@ -39,12 +40,13 @@ Recipients will see these emails origina
 
contain only an email address, like `kallithea-noreply@example.com`, or both
 
a name and an address in the following format: `Kallithea
 
<kallithea-noreply@example.com>`. The subject of these emails can
 
optionally be prefixed with the value of ``email_prefix`` in the configuration
 
file.
 

	
 

	
 
Error emails
 
------------
 

	
 
When an exception occurs in Kallithea -- and unless interactive debugging is
 
enabled using ``set debug = true`` in the ``[app:main]`` section of the
 
configuration file -- an email with exception details is sent by WebError_'s
 
@@ -58,13 +60,15 @@ a name and an address in the following f
 
<kallithea-noreply@example.com>`.
 

	
 
*Note:* The WebError_ package does not respect ``smtp_port`` and assumes the
 
standard SMTP port (25). If you have a remote SMTP server with a different port,
 
you could set up a local forwarding SMTP server on port 25.
 

	
 

	
 
References
 
----------
 

	
 
- `Error Middleware (Pylons documentation) <http://pylons-webframework.readthedocs.org/en/latest/debugging.html#error-middleware>`_
 
- `ErrorHandler (Pylons modules documentation) <http://pylons-webframework.readthedocs.org/en/latest/modules/middleware.html#pylons.middleware.ErrorHandler>`_
 

	
 

	
 
.. _WebError: https://pypi.python.org/pypi/WebError
docs/usage/general.rst
Show inline comments
 
@@ -24,12 +24,13 @@ forks that are constantly being deleted,
 
command via crontab.
 

	
 
It is worth noting that even if someone is given administrative access to
 
Kallithea and deletes a repository, you can easily restore such an action by
 
renaming the repository directory, removing the ``rm__<date>`` prefix.
 

	
 

	
 
File view: follow current branch
 
--------------------------------
 

	
 
In the file view, left and right arrows allow to jump to the previous and next
 
revision. Depending on the way revisions were created in the repository, this
 
could jump to a different branch.  When the checkbox ``Follow current branch``
docs/usage/performance.rst
Show inline comments
 
@@ -51,7 +51,8 @@ Follow these few steps to improve perfor
 
      the message broker should be common to all of them (e.g.,  one
 
      shared RabbitMQ server)
 
    - Load balance using round robin or IP hash, recommended is writing LB rules
 
      that will separate regular user traffic from automated processes like CI
 
      servers or build bots.
 

	
 

	
 
.. _SQLAlchemyGrate: https://github.com/shazow/sqlalchemygrate
docs/usage/vcs_support.rst
Show inline comments
 
@@ -14,17 +14,20 @@ file ``kallithea/__init__.py`` and comme
 

	
 
   BACKENDS = {
 
       'hg': 'Mercurial repository',
 
       #'git': 'Git repository',
 
   }
 

	
 

	
 
Git support
 
-----------
 

	
 

	
 
Web server with chunked encoding
 
````````````````````````````````
 

	
 
Large Git pushes require an HTTP server with support for
 
chunked encoding for POST. The Python web servers waitress_ and
 
gunicorn_ (Linux only) can be used. By default, Kallithea uses
 
waitress_ for `paster serve` instead of the built-in `paste` WSGI
 
server.
 

	
 
@@ -44,14 +47,16 @@ Also make sure to comment out the follow
 
    use_threadpool =
 

	
 

	
 
Mercurial support
 
-----------------
 

	
 

	
 
Working with Mercurial subrepositories
 
``````````````````````````````````````
 

	
 
This section explains how to use Mercurial subrepositories_ in Kallithea.
 

	
 
Example usage::
 

	
 
    ## init a simple repo
 
    hg init mainrepo
 
@@ -74,9 +79,10 @@ subrepository link sends you to the prop
 

	
 
Cloning ``mainrepo`` will also clone the attached subrepository.
 

	
 
Next we can edit the subrepository data, and push back to Kallithea. This will
 
update both repositories.
 

	
 

	
 
.. _waitress: http://pypi.python.org/pypi/waitress
 
.. _gunicorn: http://pypi.python.org/pypi/gunicorn
 
.. _subrepositories: http://mercurial.aragost.com/kick-start/en/subrepositories/
kallithea/i18n/how_to
Show inline comments
 
@@ -6,12 +6,13 @@ Translations are available on Hosted Web
 

	
 
    https://hosted.weblate.org/projects/kallithea/kallithea/
 

	
 
Registered users may contribute to the existing languages, or request a new
 
language translations.
 

	
 

	
 
Translating using Weblate
 
-------------------------
 

	
 
Weblate_ offers a simple and easy to use interface featuring glossary, machine
 
translation, suggestions based on similar translations in other projects,
 
automatic checks etc. Weblate imports the source code tree directly from
 
@@ -23,12 +24,13 @@ coming from Weblate, but having things r
 

	
 
Weblate performs sanity checks all the time and tries to prevent you from ignoring
 
them. Most common mistakes are inconsistent punctuation, whitespaces, missing or extra
 
format parameters, untranslated strings copied into the translation. Please perform
 
necessary corrections when they're needed, or override the false positives.
 

	
 

	
 
Merging translations from Weblate
 
---------------------------------
 

	
 
Weblate rebases its changes every time it pulls from our repository. Pulls are triggered
 
by a web hook from Our Own Kallithea every time it receives new commits. Usually merging
 
the new translations is a straightforward process consisting of a pull from Weblate-hosted
 
@@ -38,12 +40,13 @@ Weblate tries to minimise the number of 
 
when two translators work with different languages at more or less the same time.
 
It makes sense sometimes to re-order or fold commits by the same author when they touch
 
just the same language translation. That, however, may confuse Weblate sometimes, in
 
which case it should be manually convinced it has to discard the commits it created by
 
using its administrative interface.
 

	
 

	
 
Manual creation of a new language translation
 
---------------------------------------------
 

	
 
In the prepared development environment, run the following to ensure
 
all translation strings are extracted and up-to-date::
 

	
 
@@ -63,12 +66,13 @@ translation file for errors by executing
 
    msgfmt -f -c kallithea/i18n/<new_language_code>/LC_MESSAGES/<updated_file.po>
 

	
 
Finally, compile the translations::
 

	
 
    python setup.py compile_catalog -l <new_language_code>
 

	
 

	
 
Updating translations
 
---------------------
 

	
 
Extract the latest versions of strings for translation by running::
 

	
 
    python setup.py extract_messages
 
@@ -77,12 +81,13 @@ Update the PO file by doing::
 

	
 
    python setup.py update_catalog -l <new_language_code>
 

	
 
Edit the new updated translation file. Repeat all steps after `init_catalog` step from
 
new translation instructions
 

	
 

	
 
Testing translations
 
--------------------
 

	
 
Edit kallithea/tests/test.ini file and set lang attribute to::
 

	
 
    lang=<new_language_code>
0 comments (0 inline, 0 general)