Commits

Marcin Kuzminski committed 63e58ef Merge

Merge beta branch into stable

  • Participants
  • Parent commits 9d097c2, 5d12768
  • Branches default

Comments (0)

Files changed (287)

 *.pyc
 *.swp
 *.sqlite
+*.tox
 *.egg-info
 *.egg
 
 ^RhodeCode\.egg-info$
 ^rc\.ini$
 ^fabfile.py
+^\.rhodecode$
+language: python
+python:
+  - "2.5"
+  - "2.6"
+  - "2.7"
+
+env:  
+  - TEST_DB=sqlite:////tmp/rhodecode_test.sqlite
+  - TEST_DB=mysql://root@127.0.0.1/rhodecode_test
+  - TEST_DB=postgresql://postgres@127.0.0.1/rhodecode_test
+
+# command to install dependencies
+before_script:
+  - mysql -e 'create database rhodecode_test;'
+  - psql -c 'create database rhodecode_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
+
+# command to run tests
+script: nosetests
+
+notifications:
+    email:
+        - marcinkuz@gmail.com
+    irc: "irc.freenode.org#rhodecode"
+
+branches:
+  only:
+    - dev

File CONTRIBUTORS

     Aras Pranckevicius <aras@unity3d.com>
     Tony Bussieres <t.bussieres@gmail.com>
     Erwin Kroon <e.kroon@smartmetersolutions.nl>
-    nansenat16 <nansenat16@null.tw>
+    nansenat16 <nansenat16@null.tw>
+    Vincent Duvert <vincent@duvert.net>
+    Takumi IINO <trot.thunder@gmail.com>
+    Indra Talip <indra.talip@gmail.com>
+    James Rhodes <jrhodes@redpointsoftware.com.au>
+    Dominik Ruf <dominikruf@gmail.com>
   Each request can be logged and authenticated.
 - Runs on threads unlike hgweb. You can make multiple pulls/pushes simultaneous.
   Supports http/https and LDAP
-- Full permissions (private/read/write/admin) and authentication per project. 
-  One account for web interface and mercurial_ push/pull/clone operations.
+- Full permissions (private/read/write/admin) for each repository, additional
+  explicit forking and repository permissions.
 - Have built in users groups for easier permission management
 - Repository groups let you group repos and manage them easier.
 - Users can fork other users repo. RhodeCode have also compare view to see
   combined changeset for all changeset made within single push.
 - Build in commit-api let's you add, edit and commit files right from RhodeCode
   interface using simple editor or upload form for binaries.
+- Powerfull pull-request driven review system with inline commenting, and
+  changeset statuses, notification system.
+- Importing SVN repositories from remote locations into RhodeCode.
 - Mako templates let's you customize the look and feel of the application.
 - Beautiful diffs, annotations and source code browsing all colored by pygments. 
-  Raw diffs are made in git-diff format, including git_ binary-patches
+  Raw diffs are made in git-diff format, including GIT_ binary-patches
 - Mercurial_ branch graph and yui-flot powered graphs with zooming and statistics
 - Admin interface with user/permission management. Admin activity journal, logs
   pulls, pushes, forks, registrations and other actions made by all users.
 - Server side forks. It is possible to fork a project and modify it freely 
   without breaking the main repository. You can even write Your own hooks 
   and install them
-- code review with notification system, inline commenting, all parsed using
-  rst syntax
 - rst and markdown README support for repositories  
 - Full text search powered by Whoosh on the source files, and file names.
   Build in indexing daemons, with optional incremental index build
 ----------------
 
 - Finer granular permissions per branch, repo group or subrepo
-- pull requests and web based merges
-- per line file history
+- Pull requests with web based merges
+- Per line file history
+- Simple issue tracker 
 - SSH based authentication with server side key management
 - Commit based built in wiki system
 - More statistics and graph (global annotation + some more statistics)
 
 .. note::
    
-   Please try to read the documentation before posting any issues
+   Please try to read the documentation before posting any issues, especially
+   the **troubleshooting section**
  
 - Join the `Google group <http://groups.google.com/group/rhodecode>`_ and ask
   any questions.

File development.ini

 
 [server:main]
 ##nr of threads to spawn
-threadpool_workers = 5
+#threadpool_workers = 5
 
 ##max request before thread respawn
-threadpool_max_requests = 10
+#threadpool_max_requests = 10
 
 ##option to use threads of process
-use_threadpool = true
+#use_threadpool = true
 
-use = egg:Paste#http
+#use = egg:Paste#http
+use = egg:waitress#main
 host = 0.0.0.0
 port = 5000
 
+[filter:proxy-prefix]
+# prefix middleware for rc
+use = egg:PasteDeploy#prefix
+prefix = /<your-prefix>
+
 [app:main]
 use = egg:rhodecode
+#filter-with = proxy-prefix
 full_stack = true
 static_files = true
+# Optional Languages
+# en, fr, ja, pt_BR, zh_CN, zh_TW
 lang = en
 cache_dir = %(here)s/data
 index_dir = %(here)s/data/index
 force_https = false
 commit_parse_limit = 25
 use_gravatar = true
+
+## alternative_gravatar_url allows you to use your own avatar server application
+## the following parts of the URL will be replaced
+## {email}        user email
+## {md5email}     md5 hash of the user email (like at gravatar.com)
+## {size}         size of the image that is expected from the server application
+#alternative_gravatar_url = http://myavatarserver.com/getbyemail/{email}/{size}
+#alternative_gravatar_url = http://myavatarserver.com/getbymd5/{md5email}?s={size}
+
 container_auth_enabled = false
 proxypass_auth_enabled = false
 default_encoding = utf8
 issue_pat = (?:\s*#)(\d+)
 
 ## server url to the issue, each {id} will be replaced with match
-## fetched from the regex and {repo} is replaced with repository name
+## fetched from the regex and {repo} is replaced with full repository name
+## including groups {repo_name} is replaced with just name of repo
 
 issue_server_link = https://myissueserver.com/{repo}/issue/{id}
 
 ## The storage uses the Container API 
 ## that is also used by the cache system.
 
-## db session example
-
+## db session ##
 #beaker.session.type = ext:database
 #beaker.session.sa.url = postgresql://postgres:qwe@localhost/rhodecode
 #beaker.session.table_name = db_session 
 
-## encrypted cookie session, good for many instances
+## encrypted cookie client side session, good for many instances ##
 #beaker.session.type = cookie
 
-beaker.session.type = file
+## file based cookies (default) ##
+#beaker.session.type = file
+
+
 beaker.session.key = rhodecode
-# secure cookie requires AES python libraries
+## secure cookie requires AES python libraries ##
 #beaker.session.encrypt_key = g654dcno0-9873jhgfreyu
 #beaker.session.validate_key = 9712sds2212c--zxc123
-beaker.session.timeout = 36000
+## sets session as invalid if it haven't been accessed for given amount of time
+beaker.session.timeout = 2592000
 beaker.session.httponly = true
+#beaker.session.cookie_path = /<your-prefix>
 
-## uncomment for https secure cookie
+## uncomment for https secure cookie ##
 beaker.session.secure = false
 
-##auto save the session to not to use .save()
+## auto save the session to not to use .save() ##
 beaker.session.auto = False
 
-##true exire at browser close
+## default cookie expiration time in seconds `true` expire at browser close ##
 #beaker.session.cookie_expires = 3600
 
 

File docs/api/api.rst

 
 Starting from RhodeCode version 1.2 a simple API was implemented.
 There's a single schema for calling all api methods. API is implemented
-with JSON protocol both ways. An url to send API request in RhodeCode is
+with JSON protocol both ways. An url to send API request to RhodeCode is
 <your_server>/_admin/api
 
 API ACCESS FOR WEB VIEWS
 calling api *error* key from response will contain failure description
 and result will be null.
 
+
+API CLIENT
+++++++++++
+
+From version 1.4 RhodeCode adds a script that allows to easily
+communicate with API. After installing RhodeCode a `rhodecode-api` script
+will be available.
+
+To get started quickly simply run::
+
+  rhodecode-api _create_config --apikey=<youapikey> --apihost=<rhodecode host>
+ 
+This will create a file named .config in the directory you executed it storing
+json config file with credentials. You can skip this step and always provide
+both of the arguments to be able to communicate with server
+
+
+after that simply run any api command for example get_repo::
+ 
+ rhodecode-api get_repo
+
+ calling {"api_key": "<apikey>", "id": 75, "args": {}, "method": "get_repo"} to http://127.0.0.1:5000
+ rhodecode said:
+ {'error': 'Missing non optional `repoid` arg in JSON DATA',
+  'id': 75,
+  'result': None}
+
+Ups looks like we forgot to add an argument
+
+Let's try again now giving the repoid as parameters::
+
+    rhodecode-api get_repo repoid:rhodecode   
+ 
+    calling {"api_key": "<apikey>", "id": 39, "args": {"repoid": "rhodecode"}, "method": "get_repo"} to http://127.0.0.1:5000
+    rhodecode said:
+    {'error': None,
+     'id': 39,
+     'result': <json data...>}
+
+
+
 API METHODS
 +++++++++++
 
     api_key : "<api_key>"
     method :  "pull"
     args :    {
-                "repo_name" : "<reponame>"
+                "repoid" : "<reponame or repo_id>"
               }
 
 OUTPUT::
 
-    result : "Pulled from <reponame>"
+    id : <id_given_in_input>
+    result : "Pulled from `<reponame>`"
+    error :  null
+
+
+rescan_repos
+------------
+
+Dispatch rescan repositories action. If remove_obsolete is set
+RhodeCode will delete repos that are in database but not in the filesystem.
+This command can be executed only using api_key belonging to user with admin 
+rights.
+
+INPUT::
+
+    id : <id_for_response>
+    api_key : "<api_key>"
+    method :  "rescan_repos"
+    args :    {
+                "remove_obsolete" : "<boolean = Optional(False)>"
+              }
+
+OUTPUT::
+
+    id : <id_given_in_input>
+    result : "{'added': [<list of names of added repos>], 
+               'removed': [<list of names of removed repos>]}"
+    error :  null
+
+
+lock
+----
+
+Set locking state on given repository by given user.
+This command can be executed only using api_key belonging to user with admin 
+rights.
+
+INPUT::
+
+    id : <id_for_response>
+    api_key : "<api_key>"
+    method :  "lock"
+    args :    {
+                "repoid" : "<reponame or repo_id>"
+                "userid" : "<user_id or username>",
+                "locked" : "<bool true|false>"
+                
+              }
+
+OUTPUT::
+
+    id : <id_given_in_input>
+    result : "User `<username>` set lock state for repo `<reponame>` to `true|false`"
     error :  null
 
 
 
 OUTPUT::
 
+    id : <id_given_in_input>
     result: None if user does not exist or 
             {
-                "id" :       "<id>",
+                "user_id" :  "<user_id>",
                 "username" : "<username>",
                 "firstname": "<firstname>",
                 "lastname" : "<lastname>",
                 "email" :    "<email>",
+                "emails":    "<list_of_all_additional_emails>",
                 "active" :   "<bool>",
                 "admin" :    "<bool>",
                 "ldap_dn" :  "<ldap_dn>",
 
 OUTPUT::
 
+    id : <id_given_in_input>
     result: [
               {
-                "id" :       "<id>",
+                "user_id" :  "<user_id>",
                 "username" : "<username>",
                 "firstname": "<firstname>",
                 "lastname" : "<lastname>",
                 "email" :    "<email>",
+                "emails":    "<list_of_all_additional_emails>",
                 "active" :   "<bool>",
                 "admin" :    "<bool>",
                 "ldap_dn" :  "<ldap_dn>",
     method :  "create_user"
     args :    {
                 "username" :  "<username>",
+                "email" :     "<useremail>",
                 "password" :  "<password>",
-                "email" :     "<useremail>",
-                "firstname" : "<firstname> = None",
-                "lastname" :  "<lastname> = None",
-                "active" :    "<bool> = True",
-                "admin" :     "<bool> = False",
-                "ldap_dn" :   "<ldap_dn> = None"
+                "firstname" : "<firstname> = Optional(None)",
+                "lastname" :  "<lastname> = Optional(None)",
+                "active" :    "<bool> = Optional(True)",
+                "admin" :     "<bool> = Optional(False)",
+                "ldap_dn" :   "<ldap_dn> = Optional(None)"
               }
 
 OUTPUT::
 
+    id : <id_given_in_input>
     result: {
-              "id" : "<new_user_id>",
-              "msg" : "created new user <username>"
+              "msg" : "created new user `<username>`",
+              "user": {
+                "user_id" :  "<user_id>",
+                "username" : "<username>",
+                "firstname": "<firstname>",
+                "lastname" : "<lastname>",
+                "email" :    "<email>",
+                "emails":    "<list_of_all_additional_emails>",
+                "active" :   "<bool>",
+                "admin" :    "<bool>",
+                "ldap_dn" :  "<ldap_dn>",
+                "last_login": "<last_login>",
+              },
             }
     error:  null
 
 update_user
 -----------
 
-updates current one if such user exists. This command can 
+updates given user if such user exists. This command can 
 be executed only using api_key belonging to user with admin rights.
 
 
     method :  "update_user"
     args :    {
                 "userid" : "<user_id or username>",
-                "username" :  "<username>",
-                "password" :  "<password>",
-                "email" :     "<useremail>",
-                "firstname" : "<firstname>",
-                "lastname" :  "<lastname>",
-                "active" :    "<bool>",
-                "admin" :     "<bool>",
-                "ldap_dn" :   "<ldap_dn>"
+                "username" :  "<username> = Optional",
+                "email" :     "<useremail> = Optional",
+                "password" :  "<password> = Optional",
+                "firstname" : "<firstname> = Optional",
+                "lastname" :  "<lastname> = Optional",
+                "active" :    "<bool> = Optional",
+                "admin" :     "<bool> = Optional",
+                "ldap_dn" :   "<ldap_dn> = Optional"
               }
 
 OUTPUT::
 
+    id : <id_given_in_input>
     result: {
-              "id" : "<edited_user_id>",
-              "msg" : "updated user <username>"
+              "msg" : "updated user ID:<userid> <username>",
+              "user": {
+                "user_id" :  "<user_id>",
+                "username" : "<username>",
+                "firstname": "<firstname>",
+                "lastname" : "<lastname>",
+                "email" :    "<email>",
+                "emails":    "<list_of_all_additional_emails>",
+                "active" :   "<bool>",
+                "admin" :    "<bool>",
+                "ldap_dn" :  "<ldap_dn>",
+                "last_login": "<last_login>",
+              },              
+            }
+    error:  null
+
+
+delete_user
+-----------
+
+
+deletes givenuser if such user exists. This command can 
+be executed only using api_key belonging to user with admin rights.
+
+
+INPUT::
+
+    id : <id_for_response>
+    api_key : "<api_key>"
+    method :  "delete_user"
+    args :    {
+                "userid" : "<user_id or username>",
+              }
+
+OUTPUT::
+
+    id : <id_given_in_input>
+    result: {
+              "msg" : "deleted user ID:<userid> <username>",
+              "user": null
             }
     error:  null
 
     api_key : "<api_key>"
     method :  "get_users_group"
     args :    {
-                "group_name" : "<name>"
+                "usersgroupid" : "<users group id or name>"
               }
 
 OUTPUT::
 
+    id : <id_given_in_input>
     result : None if group not exist
              {
-               "id" :         "<id>",
-               "group_name" : "<groupname>",
-               "active":      "<bool>",
+               "users_group_id" : "<id>",
+               "group_name" :     "<groupname>",
+               "active":          "<bool>",
                "members" :  [
-                              { "id" :       "<userid>",
+                              { 
+                                "user_id" :  "<user_id>",
                                 "username" : "<username>",
                                 "firstname": "<firstname>",
                                 "lastname" : "<lastname>",
                                 "email" :    "<email>",
+                                "emails":    "<list_of_all_additional_emails>",
                                 "active" :   "<bool>",
                                 "admin" :    "<bool>",
-                                "ldap" :     "<ldap_dn>"
+                                "ldap_dn" :  "<ldap_dn>",
+                                "last_login": "<last_login>",
                               },
                             ]
 
 OUTPUT::
 
+    id : <id_given_in_input>
     result : [
                {
-                 "id" :         "<id>",
-                 "group_name" : "<groupname>",
-                 "active":      "<bool>",
-                 "members" :  [
-	    	                    {
-	    	                      "id" :       "<userid>",
-	                              "username" : "<username>",
-	                              "firstname": "<firstname>",
-	                              "lastname" : "<lastname>",
-	                              "email" :    "<email>",
-	                              "active" :   "<bool>",
-	                              "admin" :    "<bool>",
-	                              "ldap" :     "<ldap_dn>"
-	                            },
-	    	                    …
-	                          ]
-	            }
+               "users_group_id" : "<id>",
+               "group_name" :     "<groupname>",
+               "active":          "<bool>",
+               "members" :  [
+                              { 
+                                "user_id" :  "<user_id>",
+                                "username" : "<username>",
+                                "firstname": "<firstname>",
+                                "lastname" : "<lastname>",
+                                "email" :    "<email>",
+                                "emails":    "<list_of_all_additional_emails>",
+                                "active" :   "<bool>",
+                                "admin" :    "<bool>",
+                                "ldap_dn" :  "<ldap_dn>",
+                                "last_login": "<last_login>",
+                              },
+                              …
+                            ]
+               },
+               …
               ]
     error : null
 
     method :  "create_users_group"
     args:     {
                 "group_name":  "<groupname>",
-                "active":"<bool> = True"
+                "active":"<bool> = Optional(True)"
               }
 
 OUTPUT::
 
+    id : <id_given_in_input>
     result: {
-              "id":  "<newusersgroupid>",
-              "msg": "created new users group <groupname>"
+              "msg": "created new users group `<groupname>`",
+              "users_group": {
+                     "users_group_id" : "<id>",
+                     "group_name" :     "<groupname>",
+                     "active":          "<bool>",
+                     "members" :  [
+                                  { 
+                                    "user_id" :  "<user_id>",
+                                    "username" : "<username>",
+                                    "firstname": "<firstname>",
+                                    "lastname" : "<lastname>",
+                                    "email" :    "<email>",
+                                    "emails":    "<list_of_all_additional_emails>",
+                                    "active" :   "<bool>",
+                                    "admin" :    "<bool>",
+                                    "ldap_dn" :  "<ldap_dn>",
+                                    "last_login": "<last_login>",
+                                  },
+                                  …
+                     ]
+               },
             }
     error:  null
 
     api_key : "<api_key>"
     method :  "add_user_users_group"
     args:     {
-                "group_name" :  "<groupname>",
-                "username" :   "<username>"
+                "usersgroupid" : "<users group id or name>",
+                "userid" : "<user_id or username>",
               }
 
 OUTPUT::
 
+    id : <id_given_in_input>
     result: {
-              "id":  "<newusersgroupmemberid>",
               "success": True|False # depends on if member is in group
-              "msg": "added member <username> to users group <groupname> | 
+              "msg": "added member `<username>` to users group `<groupname>` | 
                       User is already in that group"
             }
     error:  null
     api_key : "<api_key>"
     method :  "remove_user_from_users_group"
     args:     {
-                "group_name" :  "<groupname>",
-                "username" :   "<username>"
+                "usersgroupid" : "<users group id or name>",
+                "userid" : "<user_id or username>",
               }
 
 OUTPUT::
 
+    id : <id_given_in_input>
     result: {
               "success":  True|False,  # depends on if member is in group
               "msg": "removed member <username> from users group <groupname> | 
 
 OUTPUT::
 
+    id : <id_given_in_input>
     result: None if repository does not exist or
             {
-                "id" :          "<id>",
+                "repo_id" :     "<repo_id>",
                 "repo_name" :   "<reponame>"
-                "type" :        "<type>",
+                "repo_type" :   "<repo_type>",
+                "clone_uri" :   "<clone_uri>",
+                "private": :    "<bool>",
+                "created_on" :  "<datetimecreated>",                
                 "description" : "<description>",
+                "landing_rev":  "<landing_rev>",
+                "owner":        "<repo_owner>",
+                "fork_of":  "<name_of_fork_parent>",
                 "members" :     [
                                   { 
                                     "type": "user",
-                                    "id" :         "<userid>",
-                                    "username" :   "<username>",
-                                    "firstname":   "<firstname>",
-                                    "lastname" :   "<lastname>",
-                                    "email" :      "<email>",
-                                    "active" :     "<bool>",
-                                    "admin" :      "<bool>",
-                                    "ldap" :       "<ldap_dn>",
+                                    "user_id" :  "<user_id>",
+                                    "username" : "<username>",
+                                    "firstname": "<firstname>",
+                                    "lastname" : "<lastname>",
+                                    "email" :    "<email>",
+                                    "emails":    "<list_of_all_additional_emails>",
+                                    "active" :   "<bool>",
+                                    "admin" :    "<bool>",
+                                    "ldap_dn" :  "<ldap_dn>",
+                                    "last_login": "<last_login>",
                                     "permission" : "repository.(read|write|admin)"
                                   },
 
 OUTPUT::
 
+    id : <id_given_in_input>
     result: [
               {
-                "id" :          "<id>",
+                "repo_id" :     "<repo_id>",
                 "repo_name" :   "<reponame>"
-                "type" :        "<type>",
-                "description" : "<description>"
+                "repo_type" :   "<repo_type>",
+                "clone_uri" :   "<clone_uri>",
+                "private": :    "<bool>",
+                "created_on" :  "<datetimecreated>",                
+                "description" : "<description>",
+                "landing_rev":  "<landing_rev>",
+                "owner":        "<repo_owner>",
+                "fork_of":  "<name_of_fork_parent>",
               },
             ]
     api_key : "<api_key>"
     method :  "get_repo_nodes"
     args:     {
-                "repo_name" : "<reponame>",
+                "repoid" : "<reponame or repo_id>"
                 "revision"  : "<revision>",
                 "root_path" : "<root_path>",
-                "ret_type"  : "<ret_type>" = 'all'
+                "ret_type"  : "<ret_type> = Optional('all')"
               }
 
 OUTPUT::
 
+    id : <id_given_in_input>
     result: [
               {
                 "name" :        "<name>"
     method :  "create_repo"
     args:     {
                 "repo_name" :   "<reponame>",
-                "owner_name" :  "<ownername>",
-                "description" : "<description> = ''",
-                "repo_type" :   "<type> = 'hg'",
-                "private" :     "<bool> = False",
-                "clone_uri" :   "<clone_uri> = None",
+                "owner" :       "<onwer_name_or_id>",
+                "repo_type" :   "<repo_type>",
+                "description" : "<description> = Optional('')",
+                "private" :     "<bool> = Optional(False)",
+                "clone_uri" :   "<clone_uri> = Optional(None)",
+                "landing_rev" : "<landing_rev> = Optional('tip')",
               }
 
 OUTPUT::
 
+    id : <id_given_in_input>
     result: {
-              "id": "<newrepoid>",
-              "msg": "Created new repository <reponame>",
+              "msg": "Created new repository `<reponame>`",
+              "repo": {
+                "repo_id" :     "<repo_id>",
+                "repo_name" :   "<reponame>"
+                "repo_type" :   "<repo_type>",
+                "clone_uri" :   "<clone_uri>",
+                "private": :    "<bool>",
+                "created_on" :  "<datetimecreated>",                
+                "description" : "<description>",
+                "landing_rev":  "<landing_rev>",
+                "owner":        "<repo_owner>",
+                "fork_of":  "<name_of_fork_parent>",
+              },
             }
     error:  null
 
     api_key : "<api_key>"
     method :  "delete_repo"
     args:     {
-                "repo_name" :   "<reponame>",
+                "repoid" : "<reponame or repo_id>"
               }
 
 OUTPUT::
 
+    id : <id_given_in_input>
     result: {
-              "msg": "Deleted repository <reponame>",
+              "msg": "Deleted repository `<reponame>`",
+              "success": true
             }
     error:  null
 
     api_key : "<api_key>"
     method :  "grant_user_permission"
     args:     {
-                "repo_name" :  "<reponame>",
-                "username" :   "<username>",
+                "repoid" : "<reponame or repo_id>"
+                "userid" : "<username or user_id>"
                 "perm" :       "(repository.(none|read|write|admin))",
               }
 
 OUTPUT::
 
+    id : <id_given_in_input>
     result: {
-              "msg" : "Granted perm: <perm> for user: <username> in repo: <reponame>"
+              "msg" : "Granted perm: `<perm>` for user: `<username>` in repo: `<reponame>`",
+              "success": true
             }
     error:  null
 
     api_key : "<api_key>"
     method  : "revoke_user_permission"
     args:     {
-                "repo_name" :  "<reponame>",
-                "username" :   "<username>",
+                "repoid" : "<reponame or repo_id>"
+                "userid" : "<username or user_id>"
               }
 
 OUTPUT::
 
+    id : <id_given_in_input>
     result: {
-              "msg" : "Revoked perm for user: <suername> in repo: <reponame>"
+              "msg" : "Revoked perm for user: `<username>` in repo: `<reponame>`",
+              "success": true
             }
     error:  null
 
     api_key : "<api_key>"
     method :  "grant_users_group_permission"
     args:     {
-                "repo_name" : "<reponame>",
-                "group_name" : "<usersgroupname>",
+                "repoid" : "<reponame or repo_id>"
+                "usersgroupid" : "<users group id or name>"
                 "perm" : "(repository.(none|read|write|admin))",
               }
 
 OUTPUT::
 
+    id : <id_given_in_input>
     result: {
-              "msg" : "Granted perm: <perm> for group: <usersgroupname> in repo: <reponame>"
+              "msg" : "Granted perm: `<perm>` for group: `<usersgroupname>` in repo: `<reponame>`",
+              "success": true
             }
     error:  null
     
     api_key : "<api_key>"
     method  : "revoke_users_group_permission"
     args:     {
-                "repo_name" :  "<reponame>",
-                "users_group" :   "<usersgroupname>",
+                "repoid" : "<reponame or repo_id>"
+                "usersgroupid" : "<users group id or name>"
               }
 
 OUTPUT::
 
+    id : <id_given_in_input>
     result: {
-              "msg" : "Revoked perm for group: <usersgroupname> in repo: <reponame>"
+              "msg" : "Revoked perm for group: `<usersgroupname>` in repo: `<reponame>`",
+              "success": true
             }
     error:  null

File docs/changelog.rst

 Changelog
 =========
 
+1.4.0 (**2012-09-03**)
+----------------------
+
+news
+++++
+ 
+- new codereview system
+- email map, allowing users to have multiple email addresses mapped into
+  their accounts
+- improved git-hook system. Now all actions for git are logged into journal
+  including pushed revisions, user and IP address
+- changed setup-app into setup-rhodecode and added default options to it.
+- new git repos are created as bare now by default
+- #464 added links to groups in permission box
+- #465 mentions autocomplete inside comments boxes
+- #469 added --update-only option to whoosh to re-index only given list
+  of repos in index 
+- rhodecode-api CLI client
+- new git http protocol replaced buggy dulwich implementation.
+  Now based on pygrack & gitweb
+- Improved RSS/ATOM feeds. Discoverable by browsers using proper headers, and 
+  reformated based on user suggestions. Additional rss/atom feeds for user
+  journal
+- various i18n improvements
+- #478 permissions overview for admin in user edit view
+- File view now displays small gravatars off all authors of given file
+- Implemented landing revisions. Each repository will get landing_rev attribute
+  that defines 'default' revision/branch for generating readme files
+- Implemented #509, RhodeCode enforces SSL for push/pulling if requested at 
+  earliest possible call.
+- Import remote svn repositories to mercurial using hgsubversion.
+- Fixed #508 RhodeCode now has a option to explicitly set forking permissions
+- RhodeCode can use alternative server for generating avatar icons
+- implemented repositories locking. Pull locks, push unlocks. Also can be done
+  via API calls
+- #538 form for permissions can handle multiple users at once 
+
+fixes
++++++
+
+- improved translations
+- fixes issue #455 Creating an archive generates an exception on Windows
+- fixes #448 Download ZIP archive keeps file in /tmp open and results 
+  in out of disk space
+- fixes issue #454 Search results under Windows include proceeding
+  backslash
+- fixed issue #450. Rhodecode no longer will crash when bad revision is
+  present in journal data.
+- fix for issue #417, git execution was broken on windows for certain
+  commands.
+- fixed #413. Don't disable .git directory for bare repos on deleting
+- fixed issue #459. Changed the way of obtaining logger in reindex task.
+- fixed #453 added ID field in whoosh SCHEMA that solves the issue of
+  reindexing modified files
+- fixed #481 rhodecode emails are sent without Date header 
+- fixed #458 wrong count when no repos are present
+- fixed issue #492 missing `\ No newline at end of file` test at the end of 
+  new chunk in html diff
+- full text search now works also for commit messages
+
 1.3.6 (**2012-05-17**)
 ----------------------
 

File docs/conf.py

 # The short X.Y version.
 root = os.path.dirname(os.path.dirname(__file__))
 sys.path.append(root)
-from rhodecode import get_version, __version__
-version = get_version()
+from rhodecode import __version__
+version = __version__
 # The full version, including alpha/beta/rc tags.
 release = __version__
 

File docs/contributing.rst

 
 
 After finishing your changes make sure all tests passes ok. You can run
-the testsuite running nosetest from the project root.
+the testsuite running ``nosetest`` from the project root, or if you use tox
+run tox for python2.5-2.7 with multiple database test.
 
 | Thank you for any contributions!
 |  Marcin

File docs/index.rst

 
    usage/general
    usage/git_support
+   usage/performance
+   usage/locking
    usage/statistics
    usage/backup
    usage/debugging
+   usage/troubleshooting
 
 **Develop**
 

File docs/installation.rst

     pip install rhodecode
 
 If you prefer to install RhodeCode manually simply grab latest release from
-http://pypi.python.org/pypi/rhodecode, decompress the archive and run::
+http://pypi.python.org/pypi/RhodeCode, decompress the archive and run::
 
     python setup.py install
 
+Step by step installation example for Windows
+---------------------------------------------
 
-Step by step installation example
----------------------------------
+:ref:`installation_win`
+
+
+Step by step installation example for Linux
+-------------------------------------------
 
 
 For installing RhodeCode i highly recommend using separate virtualenv_. This
 - Assuming you have installed virtualenv_ create a new virtual environment 
   using virtualenv command:: 
 
-    virtualenv --no-site-packages /var/www/rhodecode-venv
+    virtualenv --no-site-packages /opt/rhodecode-venv
 
 
 .. note:: Using ``--no-site-packages`` when generating your
    Python's "main" site-packages dir.
 
 
-- this will install new virtualenv_ into `/var/www/rhodecode-venv`. 
+- this will install new virtualenv_ into `/opt/rhodecode-venv`. 
 - Activate the virtualenv_ by running::
 
-    source /var/www/rhodecode-venv/bin/activate
+    source /opt/rhodecode-venv/bin/activate
 
 .. note:: If you're using UNIX, *do not* use ``sudo`` to run the
    ``virtualenv`` script.  It's perfectly acceptable (and desirable)
 - Make a folder for rhodecode data files, and configuration somewhere on the 
   filesystem. For example::
 
-    mkdir /var/www/rhodecode
+    mkdir /opt/rhodecode
   
     
 - Go into the created directory run this command to install rhodecode::

File docs/installation_win.rst

+.. _installation_win:
+
+
+Step by step Installation for Windows
+=====================================
+
+
+RhodeCode step-by-step install Guide for Windows  
+
+Target OS: Windows XP SP3 English (Clean installation) 
++ All Windows Updates until 24-may-2012 
+
+Step1 - 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://www.microsoft.com/visualstudio/en-us/products/2008-editions/express 
+(if not found or relocated, google for "visual studio 2008 express" for 
+updated link) 
+
+You can also download full ISO file for offline installation, just 
+choose "All - Offline Install ISO image file" in the previous page and 
+choose "Visual C++ 2008 Express" when installing. 
+
+
+.. note::
+
+  Silverlight Runtime and SQL Server 2008 Express Edition are not 
+  required, you can uncheck them 
+
+
+Step2 - Install Python
+----------------------
+
+Install Python 2.x.y (x >= 5) x86 version (32bit). DO NOT USE A 3.x version.
+Download Python 2.x.y from: 
+http://www.python.org/download/ 
+
+Choose "Windows Installer" (32bit version) not "Windows X86-64 
+Installer". While writing this guide, the latest version was v2.7.3. 
+Remember the specific major and minor version installed, because it will 
+be needed in the next step. In this case, it is "2.7". 
+
+
+Step3 - Install Win32py extensions
+----------------------------------
+ 
+Download pywin32 from: 
+http://sourceforge.net/projects/pywin32/files/ 
+
+- Click on "pywin32" folder 
+- Click on the first folder (in this case, Build 217, maybe newer when you try) 
+- Choose the file ending with ".win32-py2.x.exe" -> x being the minor 
+  version of Python you installed (in this case, 7) 
+  When writing this guide, the file was: 
+  http://sourceforge.net/projects/pywin32/files/pywin32/Build%20217/pywin32-217.win32-py2.7.exe/download 
+
+
+Step4 - Python BIN
+------------------
+
+Add Python BIN folder to the path 
+
+You have to add the Python folder to the path, you can do it manually 
+(editing "PATH" environment variable) or using Windows Support Tools 
+that came preinstalled in Vista/7 and can be installed in Windows XP. 
+
+- Using support tools on WINDOWS XP: 
+  If you use Windows XP you can install them using Windows XP CD and 
+  navigating to \SUPPORT\TOOLS. There, execute Setup.EXE (not MSI). 
+  Afterwards, open a CMD and type::
+ 
+    SETX PATH "%PATH%;[your-python-path]" -M 
+
+  Close CMD (the path variable will be updated then) 
+
+- Using support tools on WINDOWS Vista/7: 
+
+  Open a CMD and type::
+
+    SETX PATH "%PATH%;[your-python-path]" /M 
+
+  Please substitute [your-python-path] with your Python installation path. 
+  Typically: C:\\Python27 
+
+
+Step5 - RhodeCode folder structure
+----------------------------------
+
+Create a RhodeCode folder structure 
+
+This is only a example to install RhodeCode, you can of course change 
+it. However, this guide will follow the proposed structure, so please 
+later adapt the paths if you change them. My recommendation is to use 
+folders with NO SPACES. But you can try if you are brave... 
+
+Create the following folder structure::
+
+  C:\RhodeCode 
+  C:\RhodeCode\Bin 
+  C:\RhodeCode\Env 
+  C:\RhodeCode\Repos 
+
+
+Step6 - Install virtualenv
+---------------------------
+
+Install Virtual Env for Python 
+
+Navigate to: http://www.virtualenv.org/en/latest/index.html#installation 
+Right click on "virtualenv.py" file and choose "Save link as...". 
+Download to C:\\RhodeCode (or whatever you want) 
+(the file is located at 
+https://raw.github.com/pypa/virtualenv/master/virtualenv.py) 
+
+Create a virtual Python environment in C:\\RhodeCode\\Env (or similar). To 
+do so, open a CMD (Python Path should be included in Step3), navigate 
+where you downloaded "virtualenv.py", and write:: 
+
+ python virtualenv.py C:\RhodeCode\Env 
+
+(--no-site-packages is now the default behaviour of virtualenv, no need 
+to include it) 
+
+
+Step7 - Install RhodeCode
+-------------------------
+
+Finally, install RhodeCode 
+
+Close previously opened command prompt/s, and open a Visual Studio 2008 
+Command Prompt (**IMPORTANT!!**). To do so, go to Start Menu, and then open 
+"Microsoft Visual C++ 2008 Express Edition" -> "Visual Studio Tools" -> 
+"Visual Studio 2008 Command Prompt" 
+
+In that CMD (loaded with VS2008 PATHs) type::
+ 
+  cd C:\RhodeCode\Env\Scripts (or similar) 
+  activate 
+
+The prompt will change into "(Env) C:\\RhodeCode\\Env\\Scripts" or similar 
+(depending of your folder structure). Then type:: 
+
+ pip install rhodecode 
+
+(long step, please wait until fully complete) 
+
+Some warnings will appear, don't worry as they are normal.
+
+
+Step8 - Configuring RhodeCode
+-----------------------------
+
+
+steps taken from http://packages.python.org/RhodeCode/setup.html 
+
+You have to use the same Visual Studio 2008 command prompt as Step7, so 
+if you closed it reopen it following the same commands (including the 
+"activate" one). When ready, just type::
+ 
+  cd C:\RhodeCode\Bin 
+  paster make-config RhodeCode production.ini 
+
+Then, you must edit production.ini to fit your needs (ip address, ip 
+port, mail settings, database, whatever). I recommend using NotePad++ 
+(free) or similar text editor, as it handles well the EndOfLine 
+character differences between Unix and Windows 
+(http://notepad-plus-plus.org/) 
+
+For the sake of simplicity lets run it with the default settings. After 
+your edits (if any), in the previous Command Prompt, type:: 
+ 
+ paster setup-rhodecode production.ini 
+
+(this time a NEW database will be installed, you must follow a different 
+step to later UPGRADE to a newer RhodeCode version) 
+
+The script will ask you for confirmation about creating a NEW database, 
+answer yes (y) 
+The script will ask you for repository path, answer C:\\RhodeCode\\Repos 
+(or similar) 
+The script will ask you for admin username and password, answer "admin" 
++ "123456" (or whatever you want) 
+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. 
+
+
+Step9 - Running RhodeCode
+-------------------------
+
+
+In the previous command prompt, being in the C:\\RhodeCode\\Bin folder, 
+just type::
+ 
+ paster serve production.ini 
+
+Open yout web server, and go to http://127.0.0.1:5000 
+
+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 RhodeCode as Windows Service. You can investigate here:
+ 
+  - http://pypi.python.org/pypi/wsgisvc 
+  - http://ryrobes.com/python/running-python-scripts-as-a-windows-service/     
+  - http://wiki.pylonshq.com/display/pylonscookbook/How+to+run+Pylons+as+a+Windows+service 
+
+- Using Apache. You can investigate here:
+
+  - https://groups.google.com/group/rhodecode/msg/c433074e813ffdc4 
+
+
+Upgrading
+=========
+ 
+Stop running RhodeCode 
+Open a CommandPrompt like in Step7 (VS2008 path + activate) and type::
+ 
+ easy_install -U rhodecode 
+ cd \RhodeCode\Bin 
+
+{ backup your production.ini file now} :: 
+
+ paster make-config RhodeCode production.ini 
+
+(check changes and update your production.ini accordingly) ::
+ 
+ paster upgrade-db production.ini (update database)
+
+Full steps in http://packages.python.org/RhodeCode/upgrade.html 

File docs/setup.rst

 and password for the initial admin account which ``setup-rhodecode`` sets 
 up for you.
 
+setup process can be fully automated, example for lazy::
+
+    paster setup-rhodecode production.ini --user=marcink --password=secret --email=marcin@rhodecode.org --repos=/home/marcink/my_repos
+    
+
 - The ``setup-rhodecode`` command will create all of the 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
        access_log      /var/log/nginx/rhodecode.access.log;
        error_log       /var/log/nginx/rhodecode.error.log;
 
+       # uncomment if you have nginx with chunking module compiled
+       # fixes the issues of having to put postBuffer data for large git
+       # pushes       
+       #chunkin on;
+       #error_page 411 = @my_411_error;
+       #location @my_411_error {
+       #    chunkin_resume;
+       #}
+       
+       # uncomment if you want to serve static files by nginx
+       #root /path/to/installation/rhodecode/public;
+       
        location / {
             try_files $uri @rhode;
        }
 Other configuration files
 -------------------------
 
-Some example init.d scripts can be found here, for debian and gentoo:
+Some example init.d scripts can be found in init.d directory::
 
-https://rhodecode.org/rhodecode/files/tip/init.d
-
-
-Troubleshooting
----------------
-
-:Q: **Missing static files?**
-:A: Make sure either to set the `static_files = true` in the .ini file or
-   double check the root path for your http setup. It should point to 
-   for example:
-   /home/my-virtual-python/lib/python2.6/site-packages/rhodecode/public
-   
-| 
-
-:Q: **Can't install celery/rabbitmq**
-:A: Don't worry RhodeCode works without them too. No extra setup is required.
-
-|
- 
-:Q: **Long lasting push timeouts?**
-:A: Make sure you set a longer timeouts in your proxy/fcgi settings, timeouts
-    are caused by https server and not RhodeCode.
-    
-| 
-
-:Q: **Large pushes timeouts?**
-:A: Make sure you set a proper max_body_size for the http server.
-
-|
-
-:Q: **Apache doesn't pass basicAuth on pull/push?**
-:A: Make sure you added `WSGIPassAuthorization true`.
-
-For further questions search the `Issues tracker`_, or post a message in the 
-`google group rhodecode`_
+  https://secure.rhodecode.org/rhodecode/files/beta/init.d
 
 .. _virtualenv: http://pypi.python.org/pypi/virtualenv
 .. _python: http://www.python.org/
 .. _mercurial-server: http://www.lshift.net/mercurial-server.html
 .. _PublishingRepositories: http://mercurial.selenic.com/wiki/PublishingRepositories
 .. _Issues tracker: https://bitbucket.org/marcinkuzminski/rhodecode/issues
-.. _google group rhodecode: http://groups.google.com/group/rhodecode
+.. _google group rhodecode: http://groups.google.com/group/rhodecode

File docs/usage/general.rst

 for changelogs, files and other can be exchanged with _<ID> syntax.
 
 
-
 Mailing
 -------
 
 Trending source files are calculated based on pre defined dict of known
 types and extensions. If You miss some extension or Would like to scan some
 custom files it's possible to add new types in `LANGUAGES_EXTENSIONS_MAP` dict
-located in `/rhodecode/lib/celerylib/tasks.py`
+located in `/rhodecode/lib/celerylib/tasks.py`
+
+
+Cloning remote repositories
+---------------------------
+
+RhodeCode has an ability to clone remote repos from given remote locations.
+Currently it support following options:
+
+- hg  -> hg clone
+- svn -> hg clone
+- git -> git clone
+
+
+.. note::
+    
+    - *`svn -> hg` cloning requires `hgsubversion` library to be installed.*
+
+If you need to clone repositories that are protected via basic auth, you
+might pass the url with stored credentials inside eg. 
+`http://user:passw@remote.server/repo, RhodeCode will try to login and clone
+using given credentials. Please take a note that they will be stored as
+plaintext inside the database. RhodeCode will remove auth info when showing the 
+clone url in summary page.

File docs/usage/git_support.rst

 ===========
 
 
-Git support in RhodeCode 1.3 was enabled by default. 
+Git support in RhodeCode 1.3 was enabled by default. You need to have a git
+client installed on the machine to make git fully work.
+
 Although There are some limitations on git usage.
 
-- No hooks are runned for git push/pull actions.
-- logs in action journals don't have git operations
+- hooks that are executed on pull/push are not *real* hooks, they are 
+  just emulating the behavior, and are executed **BEFORE** action takes place.
 - large pushes needs http server with chunked encoding support.
  
 if you plan to use git you need to run RhodeCode with some
 i recommend using waitress_ or gunicorn_ (linux only) for `paste` wsgi app 
 replacement.
 
-To use waitress simply change change the following in the .ini file::
+To use, simply change change the following in the .ini file::
 
     use = egg:Paste#http
 
-To::
+to::
     
     use = egg:waitress#main
 
+or::
+
+    use = egg:gunicorn#main
+    
+    
 And comment out bellow options::
 
     threadpool_workers = 

File docs/usage/locking.rst

+.. _locking:
+
+===================================
+RhodeCode repository locking system
+===================================
+
+
+| Repos with **locking function=disabled** is the default, that's how repos work 
+  today.
+| Repos with **locking function=enabled** behaves like follows:
+
+Repos have a state called `locked` that can be true or false.
+The hg/git commands `hg/git clone`, `hg/git pull`, and `hg/git push` 
+influence this state:
+
+- The command `hg/git pull <repo>` will lock that repo (locked=true) 
+  if the user has write/admin permissions on this repo
+
+- The command `hg/git clone <repo>` will lock that repo (locked=true) if the 
+  user has write/admin permissions on this repo
+
+
+RhodeCode will remember the user id who locked the repo
+only this specific user can unlock the repo (locked=false) by calling 
+
+- `hg/git push <repo>` 
+
+every other command on that repo from this user and 
+every command from any other user will result in http return code 423 (locked)
+
+
+additionally the http error includes the <user> that locked the repo 
+(e.g. “repository <repo> locked by user <user>”)
+
+
+So the scenario of use for repos with `locking function` enabled is that 
+every initial clone and every pull gives users (with write permission)
+the exclusive right to do a push.
+
+
+Each repo can be manually unlocked by admin from the repo settings menu.

File docs/usage/performance.rst

+.. _performance:
+
+================================
+Optimizing RhodeCode Performance
+================================
+
+When serving large amount of big repositories RhodeCode can start
+performing slower than expected. Because of demanding nature of handling large
+amount of data from version control systems here are some tips how to get
+the best performance.
+
+* RhodeCode will perform better on machines with faster disks (SSD/SAN). It's
+  more important to have faster disk than faster CPU.
+
+* Slowness on initial page can be easily fixed by grouping repositories, and/or
+  increasing cache size (see below)
+
+
+Follow these few steps to improve performance of RhodeCode system.
+
+
+1. Increase cache
+
+    in the .ini file::
+       
+     beaker.cache.sql_cache_long.expire=3600 <-- set this to higher number
+
+    This option affects the cache expiration time for main page. Having
+    few hundreds of repositories on main page can sometimes make the system
+    to behave slow when cache expires for all of them. Increasing `expire`
+    option to day (86400) or a week (604800) will improve general response
+    times for the main page. RhodeCode has an intelligent cache expiration
+    system and it will expire cache for repositories that had been changed.
+
+2. Switch from sqlite to postgres or mysql
+    
+    sqlite is a good option when having small load on the system. But due to
+    locking issues with sqlite, it's not recommended to use it for larger
+    setup. Switching to mysql or postgres will result in a immediate
+    performance increase.
+    
+3. Scale RhodeCode horizontally
+
+    - running two or more instances on the same server can speed up things a lot
+    - load balance using round robin or ip hash
+    - you need to handle consistent user session storage by switching to 
+      db sessions, client side sessions or sharing session data folder across 
+      instances. See http://beaker.readthedocs.org/ docs for details.
+    - remember that each instance needs it's own .ini file and unique
+      `instance_id` set in them

File docs/usage/troubleshooting.rst

+.. _troubleshooting:
+
+
+===============
+Troubleshooting
+===============
+
+:Q: **Missing static files?**
+:A: Make sure either to set the `static_files = true` in the .ini file or
+   double check the root path for your http setup. It should point to 
+   for example:
+   /home/my-virtual-python/lib/python2.6/site-packages/rhodecode/public
+   
+| 
+
+:Q: **Can't install celery/rabbitmq?**
+:A: Don't worry RhodeCode works without them too. No extra setup is required.
+    Try out great celery docs for further help.
+
+|
+ 
+:Q: **Long lasting push timeouts?**
+:A: Make sure you set a longer timeouts in your proxy/fcgi settings, timeouts
+    are caused by https server and not RhodeCode.
+    
+| 
+
+:Q: **Large pushes timeouts?**
+:A: Make sure you set a proper max_body_size for the http server. Very often
+    Apache, Nginx or other http servers kill the connection due to to large
+    body.
+
+|
+
+:Q: **Apache doesn't pass basicAuth on pull/push?**
+:A: Make sure you added `WSGIPassAuthorization true`.
+
+|
+
+:Q: **Git fails on push/pull?**
+:A: Make sure you're using an wsgi http server that can handle chunked encoding
+    such as `waitress` or `gunicorn`
+
+|
+
+:Q: **How i use hooks in RhodeCode?**
+:A: It's easy if they are python hooks just use advanced link in hooks section
+    in Admin panel, that works only for Mercurial. If you want to use githooks,
+    just install proper one in repository eg. create file in 
+    `/gitrepo/hooks/pre-receive`. You can also use RhodeCode-extensions to
+    connect to callback hooks, for both Git and Mercurial.
+
+|
+
+:Q: **RhodeCode is slow for me, how can i make it faster?**
+:A: See the :ref:`performance` section
+
+For further questions search the `Issues tracker`_, or post a message in the 
+`google group rhodecode`_
+
+.. _virtualenv: http://pypi.python.org/pypi/virtualenv
+.. _python: http://www.python.org/
+.. _mercurial: http://mercurial.selenic.com/
+.. _celery: http://celeryproject.org/
+.. _rabbitmq: http://www.rabbitmq.com/
+.. _python-ldap: http://www.python-ldap.org/
+.. _mercurial-server: http://www.lshift.net/mercurial-server.html
+.. _PublishingRepositories: http://mercurial.selenic.com/wiki/PublishingRepositories
+.. _Issues tracker: https://bitbucket.org/marcinkuzminski/rhodecode/issues
+.. _google group rhodecode: http://groups.google.com/group/rhodecode

File init.d/supervisord.conf

+; RhodeCode Supervisord
+; ##########################
+; for help see http://supervisord.org/configuration.html
+; ##########################
+
+[inet_http_server]         ; inet (TCP) server disabled by default
+port=127.0.0.1:9001        ; (ip_address:port specifier, *:port for all iface)
+;username=user              ; (default is no username (open server))
+;password=123               ; (default is no password (open server))
+
+[supervisord]
+logfile=/%(here)s/supervisord_rhodecode.log ; (main log file;default $CWD/supervisord.log)
+logfile_maxbytes=50MB        ; (max main logfile bytes b4 rotation;default 50MB)
+logfile_backups=10           ; (num of main logfile rotation backups;default 10)
+loglevel=info                ; (log level;default info; others: debug,warn,trace)
+pidfile=/%(here)s/supervisord_rhodecode.pid ; (supervisord pidfile;default supervisord.pid)
+nodaemon=true               ; (start in foreground if true;default false)
+minfds=1024                  ; (min. avail startup file descriptors;default 1024)
+minprocs=200                 ; (min. avail process descriptors;default 200)
+umask=022                    ; (process file creation umask;default 022)
+user=marcink                  ; (default is current user, required if root)
+;identifier=supervisor       ; (supervisord identifier, default is 'supervisor')
+;directory=/tmp              ; (default is not to cd during start)
+;nocleanup=true              ; (don't clean up tempfiles at start;default false)
+;childlogdir=/tmp            ; ('AUTO' child log dir, default $TEMP)
+environment=HOME=/home/marcink       ; (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 rhodecode:*
+[program:rhodecode]
+numprocs = 1
+numprocs_start = 5000 # possible should match ports
+directory=/home/marcink/rhodecode-dir
+command = /home/marcink/v-env/bin/paster serve rc.ini
+process_name = %(program_name)s_%(process_num)04d
+redirect_stderr=true 
+stdout_logfile=/%(here)s/rhodecode.log 

File production.ini

 
 [server:main]
 ##nr of threads to spawn
-threadpool_workers = 5
+#threadpool_workers = 5
 
 ##max request before thread respawn
-threadpool_max_requests = 10
+#threadpool_max_requests = 10
 
 ##option to use threads of process
-use_threadpool = true
+#use_threadpool = true
 
-use = egg:Paste#http
+#use = egg:Paste#http
+use = egg:waitress#main
 host = 127.0.0.1
 port = 8001
 
+[filter:proxy-prefix]
+# prefix middleware for rc
+use = egg:PasteDeploy#prefix
+prefix = /<your-prefix>
+
 [app:main]
 use = egg:rhodecode
+#filter-with = proxy-prefix
 full_stack = true
 static_files = true
+# Optional Languages
+# en, fr, ja, pt_BR, zh_CN, zh_TW