Commits

Marcin Kuzminski  committed 82a8801 Merge

merge 1.3 into stable

  • Participants
  • Parent commits ab0e122, 61f9aeb
  • Branches default

Comments (0)

Files changed (288)

 syntax: glob
 *.pyc
 *.swp
+*.sqlite
 *.egg-info
 *.egg
 
 ^\.settings$
 ^\.project$
 ^\.pydevproject$
+^\.coverage$
 ^rhodecode\.db$
 ^test\.db$
-^repositories\.config$
+^RhodeCode\.egg-info$
+^rc\.ini$
+^fabfile.py

File CONTRIBUTORS

     Ankit Solanki <ankit.solanki@gmail.com>    
     Liad Shani <liadff@gmail.com>
     Les Peabody <lpeabody@gmail.com>
+    Jonas Oberschweiber <jonas.oberschweiber@d-velop.de>
+    Matt Zuba <matt.zuba@goodwillaz.org>
+    Aras Pranckevicius <aras@unity3d.com>
-=================================================
-Welcome to RhodeCode (RhodiumCode) documentation!
-=================================================
+=========
+RhodeCode
+=========
 
-``RhodeCode`` is a Pylons framework based Mercurial repository 
-browser/management tool with a built in push/pull server and full text search.
+About
+-----
+
+``RhodeCode`` is a fast and powerful management tool for Mercurial_ and GIT_ 
+with a built in push/pull server and full text search and code-review.
 It works on http/https and has a built in permission/authentication system with 
-the ability to authenticate via LDAP or ActiveDirectory. RhodeCode also supports
-simple API so it's easy integrable with existing systems.
+the ability to authenticate via LDAP or ActiveDirectory. RhodeCode also provides
+simple API so it's easy integrable with existing external systems.
 
 RhodeCode is similar in some respects to github or bitbucket_, 
-however RhodeCode can be run as standalone hosted application on your own server.  
+however RhodeCode can be run as standalone hosted application on your own server.
 It is open source and donation ware and focuses more on providing a customized, 
-self administered interface for Mercurial(and soon GIT) repositories. 
+self administered interface for Mercurial and GIT repositories. 
 RhodeCode is powered by a vcs_ library that Lukasz Balcerzak and I created to 
 handle multiple different version control systems.
 
 RhodeCode uses `Semantic Versioning <http://semver.org/>`_
 
+Installation
+------------
+Stable releases of RhodeCode are best installed via::
+
+    easy_install rhodecode
+
+Or::
+
+    pip install rhodecode 
+
+Detailed instructions and links may be found on the Installation page.
+
+Please visit http://packages.python.org/RhodeCode/installation.html for
+more details
+
 RhodeCode demo
 --------------
 
 
 https://github.com/marcinkuzminski/rhodecode
 
-Installation
-------------
-
-Please visit http://packages.python.org/RhodeCode/installation.html
-
 
 RhodeCode Features
 ------------------
 
-- Has it's own middleware to handle mercurial_ protocol requests. 
+- Has its own middleware to handle mercurial_ protocol requests. 
   Each request can be logged and authenticated.
 - Runs on threads unlike hgweb. You can make multiple pulls/pushes simultaneous.
   Supports http/https and LDAP
 - 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
   (no external search servers required all in one application)
   location 
 - Based on pylons / sqlalchemy / sqlite / whoosh / vcs
 
-
-.. include:: ./docs/screenshots.rst
-    
     
 Incoming / Plans
 ----------------
 
 - Finer granular permissions per branch, repo group or subrepo
 - pull requests and web based merges
-- notification and message system 
+- per line file history
 - SSH based authentication with server side key management
-- Code review (probably based on hg-review)
-- Full git_ support, with push/pull server (currently in beta tests)
-- Redmine and other bugtrackers integration
 - Commit based built in wiki system
 - More statistics and graph (global annotation + some more statistics)
 - Other advancements as development continues (or you can of course make 
 ``RhodeCode`` is released under the GPLv3 license.
 
 
-Mailing group Q&A
------------------
+Getting help
+------------
 
-Join the `Google group <http://groups.google.com/group/rhodecode>`_
+Listed bellow are various support resources that should help.
 
-Open an issue at `issue tracker <http://bitbucket.org/marcinkuzminski/rhodecode/issues>`_
+.. note::
+   
+   Please try to read the documentation before posting any issues
+ 
+- Join the `Google group <http://groups.google.com/group/rhodecode>`_ and ask
+  any questions.
 
-Join #rhodecode on FreeNode (irc.freenode.net)
-or use http://webchat.freenode.net/?channels=rhodecode for web access to irc.
+- Open an issue at `issue tracker <http://bitbucket.org/marcinkuzminski/rhodecode/issues>`_
+
+
+- Join #rhodecode on FreeNode (irc.freenode.net)
+  or use http://webchat.freenode.net/?channels=rhodecode for web access to irc.
+
+- You can also follow me on twitter @marcinkuzminski where i often post some
+  news about RhodeCode
+
 
 Online documentation
 --------------------
 
 Online documentation for the current version of RhodeCode is available at
-http://packages.python.org/RhodeCode/.
+ - http://packages.python.org/RhodeCode/
+ - http://rhodecode.readthedocs.org/en/latest/index.html
+
 You may also build the documentation for yourself - go into ``docs/`` and run::
 
    make html

File development.ini

 #error_email_from = paste_error@localhost
 #app_email_from = rhodecode-noreply@localhost
 #error_message =
+#email_prefix = [RhodeCode]
 
 #smtp_server = mail.server.com
 #smtp_username = 
 threadpool_workers = 5
 
 ##max request before thread respawn
-threadpool_max_requests = 6
+threadpool_max_requests = 10
 
 ##option to use threads of process
 use_threadpool = true
 use = egg:rhodecode
 full_stack = true
 static_files = true
-lang=en
+lang = en
 cache_dir = %(here)s/data
 index_dir = %(here)s/data/index
-app_instance_uuid = develop
+app_instance_uuid = rc-develop
 cut_off_limit = 256000
 force_https = false
 commit_parse_limit = 25
 use_gravatar = true
+container_auth_enabled = false
+proxypass_auth_enabled = false
+default_encoding = utf8
+
+## overwrite schema of clone url
+## available vars:
+## scheme - http/https
+## user - current user
+## pass - password 
+## netloc - network location
+## path - usually repo_name
+
+#clone_uri = {scheme}://{user}{pass}{netloc}{path}
+
+## issue tracking mapping for commits messages
+## comment out issue_pat, issue_server, issue_prefix to enable
+
+## pattern to get the issues from commit messages
+## default one used here is #<numbers> with a regex passive group for `#`
+## {id} will be all groups matched from this pattern
+
+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
+
+issue_server_link = https://myissueserver.com/{repo}/issue/{id}
+
+## prefix to add to link to indicate it's an url
+## #314 will be replaced by <issue_prefix><id>
+
+issue_prefix = #
+
+## instance-id prefix
+## a prefix key for this instance used for cache invalidation when running 
+## multiple instances of rhodecode, make sure it's globally unique for 
+## all running rhodecode instances. Leave empty if you don't use it
+instance_id = 
 
 ####################################
 ###        CELERY CONFIG        ####
 
 beaker.cache.super_short_term.type=memory
 beaker.cache.super_short_term.expire=10
+beaker.cache.super_short_term.key_length = 256
 
 beaker.cache.short_term.type=memory
 beaker.cache.short_term.expire=60
+beaker.cache.short_term.key_length = 256
 
 beaker.cache.long_term.type=memory
 beaker.cache.long_term.expire=36000
+beaker.cache.long_term.key_length = 256
 
 beaker.cache.sql_cache_short.type=memory
 beaker.cache.sql_cache_short.expire=10
+beaker.cache.sql_cache_short.key_length = 256
 
 beaker.cache.sql_cache_med.type=memory
 beaker.cache.sql_cache_med.expire=360
+beaker.cache.sql_cache_med.key_length = 256
 
 beaker.cache.sql_cache_long.type=file
 beaker.cache.sql_cache_long.expire=3600
+beaker.cache.sql_cache_long.key_length = 256
 
 ####################################
 ###       BEAKER SESSION        ####
 ## Type of storage used for the session, current types are 
 ## dbm, file, memcached, database, and memory. 
 ## The storage uses the Container API 
-##that is also used by the cache system.
+## that is also used by the cache system.
+
+## db session example
+
+#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
+#beaker.session.type = cookie
+
 beaker.session.type = file
+beaker.session.key = rhodecode
+#beaker.session.encrypt_key = g654dcno0-9873jhgfreyu
+#beaker.session.validate_key = 9712sds2212c--zxc123
+beaker.session.timeout = 36000
+beaker.session.httponly = true
 
-beaker.session.key = rhodecode
-beaker.session.secret = g654dcno0-9873jhgfreyu
-beaker.session.timeout = 36000
+## uncomment for https secure cookie
+beaker.session.secure = false
 
 ##auto save the session to not to use .save()
 beaker.session.auto = False
 ##true exire at browser close
 #beaker.session.cookie_expires = 3600
 
-    
+
 ################################################################################
 ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT*  ##
 ## Debug mode will enable the interactive debugging tool, allowing ANYONE to  ##

File docs/api/api.rst

 
 All clients are required to send JSON-RPC spec JSON data::
 
-    {
+    {   
+        "id:<id>,
         "api_key":"<api_key>",
         "method":"<method_name>",
         "args":{"<arg_key>":"<arg_val>"}
     }
 
 Example call for autopulling remotes repos using curl::
-    curl https://server.com/_admin/api -X POST -H 'content-type:text/plain' --data-binary '{"api_key":"xe7cdb2v278e4evbdf5vs04v832v0efvcbcve4a3","method":"pull","args":{"repo":"CPython"}}'
+    curl https://server.com/_admin/api -X POST -H 'content-type:text/plain' --data-binary '{"id":1,"api_key":"xe7cdb2v278e4evbdf5vs04v832v0efvcbcve4a3","method":"pull","args":{"repo":"CPython"}}'
 
 Simply provide
+ - *id* A value of any type, which is used to match the response with the request that it is replying to.
  - *api_key* for access and permission validation.
  - *method* is name of method to call
  - *args* is an key:value list of arguments to pass to method
 
 RhodeCode API will return always a JSON-RPC response::
 
-    {
+    {   
+        "id":<id>,
         "result": "<result>",
         "error": null
     }
     api_key : "<api_key>"
     method :  "pull"
     args :    {
-                "repo" : "<repo_name>"
+                "repo_name" : "<reponame>"
               }
 
 OUTPUT::
 
-    result : "Pulled from <repo_name>"
+    result : "Pulled from <reponame>"
     error :  null
 
 
+get_user
+--------
+
+Get's an user by username or user_id, Returns empty result if user is not found.
+This command can be executed only using api_key belonging to user with admin 
+rights.
+
+
+INPUT::
+
+    api_key : "<api_key>"
+    method :  "get_user"
+    args :    { 
+                "userid" : "<username or user_id>"
+              }
+
+OUTPUT::
+
+    result: None if user does not exist or 
+            {
+                "id" :       "<id>",
+                "username" : "<username>",
+                "firstname": "<firstname>",
+                "lastname" : "<lastname>",
+                "email" :    "<email>",
+                "active" :   "<bool>",
+                "admin" :    "<bool>",
+                "ldap_dn" :  "<ldap_dn>"
+            }
+
+    error:  null
+
+
 get_users
 ---------
 
 Lists all existing users. This command can be executed only using api_key
 belonging to user with admin rights.
 
+
 INPUT::
 
     api_key : "<api_key>"
                 "email" :    "<email>",
                 "active" :   "<bool>",
                 "admin" :    "<bool>",
-                "ldap" :     "<ldap_dn>"
+                "ldap_dn" :  "<ldap_dn>"
               },
             ]
     error:  null
 
+
 create_user
 -----------
 
-Creates new user or updates current one if such user exists. This command can 
+Creates new user. This command can 
 be executed only using api_key belonging to user with admin rights.
 
+
 INPUT::
 
     api_key : "<api_key>"
     args :    {
                 "username" :  "<username>",
                 "password" :  "<password>",
-                "firstname" : "<firstname>",
-                "lastname" :  "<lastname>",
-                "email" :     "<useremail>"
+                "email" :     "<useremail>",
+                "firstname" : "<firstname> = None",
+                "lastname" :  "<lastname> = None",
                 "active" :    "<bool> = True",
                 "admin" :     "<bool> = False",
                 "ldap_dn" :   "<ldap_dn> = None"
 OUTPUT::
 
     result: {
+              "id" : "<new_user_id>",
               "msg" : "created new user <username>"
             }
     error:  null
 
+
+update_user
+-----------
+
+updates current one if such user exists. This command can 
+be executed only using api_key belonging to user with admin rights.
+
+
+INPUT::
+
+    api_key : "<api_key>"
+    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>"
+              }
+
+OUTPUT::
+
+    result: {
+              "id" : "<edited_user_id>",
+              "msg" : "updated user <username>"
+            }
+    error:  null
+
+
+get_users_group
+---------------
+
+Gets an existing users group. This command can be executed only using api_key
+belonging to user with admin rights.
+
+
+INPUT::
+
+    api_key : "<api_key>"
+    method :  "get_users_group"
+    args :    {
+                "group_name" : "<name>"
+              }
+
+OUTPUT::
+
+    result : None if group not exist
+             {
+               "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>"
+                              },
+                              …
+                            ]
+             }
+    error : null
+
+
 get_users_groups
 ----------------
 
-Lists all existing users groups. This command can be executed only using api_key
-belonging to user with admin rights.
+Lists all existing users groups. This command can be executed only using 
+api_key belonging to user with admin rights.
+
 
 INPUT::
 
 
     result : [
                {
-                 "id" :       "<id>",
-                 "name" :     "<name>",
-                 "active":    "<bool>",
+                 "id" :         "<id>",
+                 "group_name" : "<groupname>",
+                 "active":      "<bool>",
                  "members" :  [
 	    	                    {
 	    	                      "id" :       "<userid>",
               ]
     error : null
 
-get_users_group
----------------
-
-Gets an existing users group. This command can be executed only using api_key
-belonging to user with admin rights.
-
-INPUT::
-
-    api_key : "<api_key>"
-    method :  "get_users_group"
-    args :    {
-                "group_name" : "<name>"
-              }
-
-OUTPUT::
-
-    result : None if group not exist
-             {
-               "id" :       "<id>",
-               "name" :     "<name>",
-               "active":    "<bool>",
-               "members" :  [
-	    	                  { "id" :       "<userid>",
-	                            "username" : "<username>",
-	                            "firstname": "<firstname>",
-	                            "lastname" : "<lastname>",
-	                            "email" :    "<email>",
-	                            "active" :   "<bool>",
-	                            "admin" :    "<bool>",
-	                            "ldap" :     "<ldap_dn>"
-	                          },
-	    	                  …
-	                        ]
-             }
-    error : null
 
 create_users_group
 ------------------
 Creates new users group. This command can be executed only using api_key
 belonging to user with admin rights
 
+
 INPUT::
 
     api_key : "<api_key>"
     method :  "create_users_group"
     args:     {
-                "name":  "<name>",
+                "group_name":  "<groupname>",
                 "active":"<bool> = True"
               }
 
 
     result: {
               "id":  "<newusersgroupid>",
-              "msg": "created new users group <name>"
+              "msg": "created new users group <groupname>"
             }
     error:  null
 
+
 add_user_to_users_group
 -----------------------
 
-Adds a user to a users group. This command can be executed only using api_key
+Adds a user to a users group. If user exists in that group success will be 
+`false`. This command can be executed only using api_key
 belonging to user with admin rights
 
+
 INPUT::
 
     api_key : "<api_key>"
     method :  "add_user_users_group"
     args:     {
                 "group_name" :  "<groupname>",
-                "user_name" :   "<username>"
+                "username" :   "<username>"
               }
 
 OUTPUT::
 
     result: {
               "id":  "<newusersgroupmemberid>",
-              "msg": "created new users group member"
+              "success": True|False # depends on if member is in group
+              "msg": "added member <username> to users group <groupname> | 
+                      User is already in that group"
             }
     error:  null
 
+
+remove_user_from_users_group
+----------------------------
+
+Removes a user from a users group. If user is not in given group success will
+be `false`. This command can be executed only 
+using api_key belonging to user with admin rights
+
+
+INPUT::
+
+    api_key : "<api_key>"
+    method :  "remove_user_from_users_group"
+    args:     {
+                "group_name" :  "<groupname>",
+                "username" :   "<username>"
+              }
+
+OUTPUT::
+
+    result: {
+              "success":  True|False,  # depends on if member is in group
+              "msg": "removed member <username> from users group <groupname> | 
+                      User wasn't in group"
+            }
+    error:  null
+
+
+get_repo
+--------
+
+Gets an existing repository by it's name or repository_id. This command can 
+be executed only using api_key belonging to user with admin rights.
+
+
+INPUT::
+
+    api_key : "<api_key>"
+    method :  "get_repo"
+    args:     {
+                "repoid" : "<reponame or repo_id>"
+              }
+
+OUTPUT::
+
+    result: None if repository does not exist or
+            {
+                "id" :          "<id>",
+                "repo_name" :   "<reponame>"
+                "type" :        "<type>",
+                "description" : "<description>",
+                "members" :     [
+                                  { "id" :         "<userid>",
+                                    "username" :   "<username>",
+                                    "firstname":   "<firstname>",
+                                    "lastname" :   "<lastname>",
+                                    "email" :      "<email>",
+                                    "active" :     "<bool>",
+                                    "admin" :      "<bool>",
+                                    "ldap" :       "<ldap_dn>",
+                                    "permission" : "repository.(read|write|admin)"
+                                  },
+                                  …
+                                  {
+                                    "id" :       "<usersgroupid>",
+                                    "name" :     "<usersgroupname>",
+                                    "active":    "<bool>",
+                                    "permission" : "repository.(read|write|admin)"
+                                  },
+                                  …
+                                ]
+            }
+    error:  null
+
+
 get_repos
 ---------
 
 Lists all existing repositories. This command can be executed only using api_key
 belonging to user with admin rights
 
+
 INPUT::
 
     api_key : "<api_key>"
     result: [
               {
                 "id" :          "<id>",
-                "name" :        "<name>"
+                "repo_name" :   "<reponame>"
                 "type" :        "<type>",
                 "description" : "<description>"
               },
             ]
     error:  null
 
-get_repo
---------
 
-Gets an existing repository. This command can be executed only using api_key
-belonging to user with admin rights
+get_repo_nodes
+--------------
+
+returns a list of nodes and it's children in a flat list for a given path 
+at given revision. It's possible to specify ret_type to show only `files` or 
+`dirs`. This command can be executed only using api_key belonging to user 
+with admin rights
+
 
 INPUT::
 
     api_key : "<api_key>"
-    method :  "get_repo"
+    method :  "get_repo_nodes"
     args:     {
-                "name" : "<name>"
+                "repo_name" : "<reponame>",
+                "revision"  : "<revision>",
+                "root_path" : "<root_path>",
+                "ret_type"  : "<ret_type>" = 'all'
               }
 
 OUTPUT::
 
-    result: None if repository not exist
-            {
-                "id" :          "<id>",
+    result: [
+              {
                 "name" :        "<name>"
                 "type" :        "<type>",
-                "description" : "<description>",
-                "members" :     [
-                                  { "id" :         "<userid>",
-	                                "username" :   "<username>",
-	                                "firstname":   "<firstname>",
-	                                "lastname" :   "<lastname>",
-	                                "email" :      "<email>",
-	                                "active" :     "<bool>",
-	                                "admin" :      "<bool>",
-	                                "ldap" :       "<ldap_dn>",
-	                                "permission" : "repository.(read|write|admin)"
-	                              },
-                                  …
-                                  {
-                                    "id" :       "<usersgroupid>",
-                                    "name" :     "<usersgroupname>",
-                                    "active":    "<bool>",
-                                    "permission" : "repository.(read|write|admin)"
-                                  },
-                                  …
-                                ]
-            }
+              },
+              …
+            ]
     error:  null
 
+
 create_repo
 -----------
 
 For example "foo/bar/baz" will create groups "foo", "bar" (with "foo" as parent),
 and create "baz" repository with "bar" as group.
 
+
 INPUT::
 
     api_key : "<api_key>"
     method :  "create_repo"
     args:     {
-                "name" :        "<name>",
+                "repo_name" :   "<reponame>",
                 "owner_name" :  "<ownername>",
                 "description" : "<description> = ''",
                 "repo_type" :   "<type> = 'hg'",
-                "private" :     "<bool> = False"
+                "private" :     "<bool> = False",
+                "clone_uri" :   "<clone_uri> = None",
               }
 
 OUTPUT::
 
-    result: None
+    result: {
+              "id": "<newrepoid>",
+              "msg": "Created new repository <reponame>",
+            }
     error:  null
 
-add_user_to_repo
-----------------
 
-Add a user to a repository. This command can be executed only using api_key
+delete_repo
+-----------
+
+Deletes a repository. This command can be executed only using api_key
 belonging to user with admin rights.
-If "perm" is None, user will be removed from the repository.
+
 
 INPUT::
 
     api_key : "<api_key>"
-    method :  "add_user_to_repo"
+    method :  "delete_repo"
     args:     {
-                "repo_name" :  "<reponame>",
-                "user_name" :  "<username>",
-                "perm" :       "(None|repository.(read|write|admin))",
+                "repo_name" :   "<reponame>",
               }
 
 OUTPUT::
 
-    result: None
+    result: {
+              "msg": "Deleted repository <reponame>",
+            }
     error:  null
 
-add_users_group_to_repo
------------------------
 
-Add a users group to a repository. This command can be executed only using 
-api_key belonging to user with admin rights. If "perm" is None, group will 
-be removed from the repository.
+grant_user_permission
+---------------------
+
+Grant permission for user on given repository, or update existing one
+if found. This command can be executed only using api_key belonging to user 
+with admin rights.
+
 
 INPUT::
 
     api_key : "<api_key>"
-    method :  "add_users_group_to_repo"
+    method :  "grant_user_permission"
     args:     {
                 "repo_name" :  "<reponame>",
-                "group_name" :  "<groupname>",
-                "perm" :       "(None|repository.(read|write|admin))",
-              }
+                "username" :   "<username>",
+                "perm" :       "(repository.(none|read|write|admin))",
+              }
+
+OUTPUT::
+
+    result: {
+              "msg" : "Granted perm: <perm> for user: <username> in repo: <reponame>"
+            }
+    error:  null
+
+
+revoke_user_permission
+----------------------
+
+Revoke permission for user on given repository. This command can be executed 
+only using api_key belonging to user with admin rights.
+
+
+INPUT::
+
+    api_key : "<api_key>"
+    method  : "revoke_user_permission"
+    args:     {
+                "repo_name" :  "<reponame>",
+                "username" :   "<username>",
+              }
+
+OUTPUT::
+
+    result: {
+              "msg" : "Revoked perm for user: <suername> in repo: <reponame>"
+            }
+    error:  null
+
+
+grant_users_group_permission
+----------------------------
+
+Grant permission for users group on given repository, or update
+existing one if found. This command can be executed only using 
+api_key belonging to user with admin rights.
+
+
+INPUT::
+
+    api_key : "<api_key>"
+    method :  "grant_users_group_permission"
+    args:     {
+                "repo_name" : "<reponame>",
+                "group_name" : "<usersgroupname>",
+                "perm" : "(repository.(none|read|write|admin))",
+              }
+
+OUTPUT::
+
+    result: {
+              "msg" : "Granted perm: <perm> for group: <usersgroupname> in repo: <reponame>"
+            }
+    error:  null
+    
+    
+revoke_users_group_permission
+-----------------------------
+
+Revoke permission for users group on given repository.This command can be 
+executed only using api_key belonging to user with admin rights.
+
+INPUT::
+
+    api_key : "<api_key>"
+    method  : "revoke_users_group_permission"
+    args:     {
+                "repo_name" :  "<reponame>",
+                "users_group" :   "<usersgroupname>",
+              }
+
+OUTPUT::
+
+    result: {
+              "msg" : "Revoked perm for group: <usersgroupname> in repo: <reponame>"
+            }
+    error:  null

File docs/api/index.rst

-.. _indexapi:
-
-API Reference
-=============
-
-.. toctree::
-   :maxdepth: 3
-
-   models
-   api 

File docs/api/models.rst

 .. automodule:: rhodecode.model
    :members:
    
+.. automodule:: rhodecode.model.comment
+   :members:
+  
+.. automodule:: rhodecode.model.notification
+   :members:   
+
 .. automodule:: rhodecode.model.permission
    :members:
-  
+
+.. automodule:: rhodecode.model.repo_permission
+   :members:      
+
 .. automodule:: rhodecode.model.repo
    :members:   
 
+.. automodule:: rhodecode.model.repos_group
+   :members:
+   
 .. automodule:: rhodecode.model.scm
    :members:
-
+   
 .. automodule:: rhodecode.model.user
    :members:      
+   
+.. automodule:: rhodecode.model.users_group
+   :members:   

File docs/changelog.rst

 =========
 
 
-1.2.5 (**2012-01-28**)
-======================
+1.3.0 (**2012-02-XX**)
+----------------------
+
+:status: in-progress
+:branch: beta
 
 news
-----
+++++
+
+- code review, inspired by github code-comments 
+- #215 rst and markdown README files support
+- #252 Container-based and proxy pass-through authentication support
+- #44 branch browser. Filtering of changelog by branches
+- mercurial bookmarks support
+- new hover top menu, optimized to add maximum size for important views
+- configurable clone url template with possibility to specify  protocol like 
+  ssh:// or http:// and also manually alter other parts of clone_url.
+- enabled largefiles extension by default
+- optimized summary file pages and saved a lot of unused space in them
+- #239 option to manually mark repository as fork
+- #320 mapping of commit authors to RhodeCode users
+- #304 hashes are displayed using monospace font    
+- diff configuration, toggle white lines and context lines
+- #307 configurable diffs, whitespace toggle, increasing context lines
+- sorting on branches, tags and bookmarks using YUI datatable
+- improved file filter on files page
+- implements #330 api method for listing nodes ar particular revision
+- #73 added linking issues in commit messages to chosen issue tracker url
+  based on user defined regular expression
+- added linking of changesets in commit messages  
+- new compact changelog with expandable commit messages
+- firstname and lastname are optional in user creation
+- #348 added post-create repository hook
+- #212 global encoding settings is now configurable from .ini files 
+- #227 added repository groups permissions
+- markdown gets codehilite extensions
+- new API methods, delete_repositories, grante/revoke permissions for groups 
+  and repos
+  
+    
+fixes
++++++
+
+- rewrote dbsession management for atomic operations, and better error handling
+- fixed sorting of repo tables
+- #326 escape of special html entities in diffs
+- normalized user_name => username in api attributes
+- fixes #298 ldap created users with mixed case emails created conflicts 
+  on saving a form
+- fixes issue when owner of a repo couldn't revoke permissions for users 
+  and groups
+- fixes #271 rare JSON serialization problem with statistics
+- fixes #337 missing validation check for conflicting names of a group with a
+  repositories group
+- #340 fixed session problem for mysql and celery tasks
+- fixed #331 RhodeCode mangles repository names if the a repository group 
+  contains the "full path" to the repositories
+- #355 RhodeCode doesn't store encrypted LDAP passwords
+
+1.2.5 (**2012-01-28**)
+----------------------
+
+news
+++++
 
 fixes
------
++++++
 
 - #340 Celery complains about MySQL server gone away, added session cleanup
   for celery tasks
   forking on windows impossible 
 
 1.2.4 (**2012-01-19**)
-======================
+----------------------
 
 news
-----
+++++
 
 - RhodeCode is bundled with mercurial series 2.0.X by default, with
   full support to largefiles extension. Enabled by default in new installations
 - added requires.txt file with requirements
      
 fixes
------
++++++
 
 - fixes db session issues with celery when emailing admins
 - #331 RhodeCode mangles repository names if the a repository group 
 - #316 fixes issues with web description in hgrc files 
 
 1.2.3 (**2011-11-02**)
-======================
+----------------------
 
 news
-----
+++++
 
 - added option to manage repos group for non admin users
 - added following API methods for get_users, create_user, get_users_groups, 
   administrator users, and global config email.
      
 fixes
------
++++++
 
 - added option for passing auth method for smtp mailer
 - #276 issue with adding a single user with id>10 to usergroups
 - #277 fixes windows LDAP settings in which missing values breaks the ldap auth 
 - #288 fixes managing of repos in a group for non admin user
 
-
 1.2.2 (**2011-10-17**)
-======================
+----------------------
 
 news
-----
+++++
 
 - #226 repo groups are available by path instead of numerical id
  
 fixes
------
++++++
 
 - #259 Groups with the same name but with different parent group
 - #260 Put repo in group, then move group to another group -> repo becomes unavailable
 - fixes #248 cannot edit repos inside a group on windows
 - fixes #219 forking problems on windows
 
-
 1.2.1 (**2011-10-08**)
-======================
+----------------------
 
 news
-----
+++++
 
 
 fixes
------
++++++
 
 - fixed problems with basic auth and push problems 
 - gui fixes
 - fixed logger
 
-
 1.2.0 (**2011-10-07**)
-======================
+----------------------
 
 news
-----
+++++
 
 - implemented #47 repository groups
 - implemented #89 Can setup google analytics code from settings menu
 - Implemented advanced hook management
 
 fixes
------
++++++
 
 - fixed file browser bug, when switching into given form revision the url was 
   not changing
 - fixes #218 os.kill patch for windows was missing sig param
 - improved rendering of dag (they are not trimmed anymore when number of 
   heads exceeds 5)
-
-
+    
 1.1.8 (**2011-04-12**)
-======================
+----------------------
 
 news
-----
+++++
 
 - improved windows support
 
 fixes
------
++++++
 
 - fixed #140 freeze of python dateutil library, since new version is python2.x
   incompatible
 
 
 1.1.7 (**2011-03-23**)
-======================
+----------------------
 
 news
-----
+++++
 
 fixes
------
++++++
 
 - fixed (again) #136 installation support for FreeBSD
 
 
 1.1.6 (**2011-03-21**)
-======================
+----------------------
 
 news
-----
+++++
 
 fixes
------
++++++
 
 - fixed #136 installation support for FreeBSD
 - RhodeCode will check for python version during installation
 
 1.1.5 (**2011-03-17**)
-======================
+----------------------
 
 news
-----
+++++
 
 - basic windows support, by exchanging pybcrypt into sha256 for windows only
   highly inspired by idea of mantis406
 
 fixes
------
++++++
 
 - fixed sorting by author in main page
 - fixed crashes with diffs on binary files
 - cleaned out docs, big thanks to Jason Harris
 
 1.1.4 (**2011-02-19**)
-======================
+----------------------
 
 news
-----
+++++
 
 fixes
------
++++++
 
 - fixed formencode import problem on settings page, that caused server crash
   when that page was accessed as first after server start
 - fixed option to access repository just by entering http://server/<repo_name> 
 
 1.1.3 (**2011-02-16**)
-======================
+----------------------
 
 news
-----
+++++
 
 - implemented #102 allowing the '.' character in username
 - added option to access repository just by entering http://server/<repo_name>
 - celery task ignores result for better performance
 
 fixes
------
++++++
 
 - fixed ehlo command and non auth mail servers on smtp_lib. Thanks to 
   apollo13 and Johan Walles
 - fixed static files paths links to use of url() method
 
 1.1.2 (**2011-01-12**)
-======================
+----------------------
 
 news
-----
+++++
 
 
 fixes
------
++++++
 
 - fixes #98 protection against float division of percentage stats
 - fixed graph bug
 - forced webhelpers version since it was making troubles during installation 
 
 1.1.1 (**2011-01-06**)
-======================
+----------------------
  
 news
-----
+++++
 
 - added force https option into ini files for easier https usage (no need to
   set server headers with this options)
 - small css updates
 
 fixes
------
++++++
 
 - fixed #96 redirect loop on files view on repositories without changesets
 - fixed #97 unicode string passed into server header in special cases (mod_wsgi)
 - fixed #92 whoosh indexer is more error proof
 
 1.1.0 (**2010-12-18**)
-======================
+----------------------
 
 news
-----
+++++
 
 - rewrite of internals for vcs >=0.1.10
 - uses mercurial 1.7 with dotencode disabled for maintaining compatibility 
   with older clients
 - anonymous access, authentication via ldap
-- performance upgrade for cached repos list - each repository has it's own 
+- performance upgrade for cached repos list - each repository has its own 
   cache that's invalidated when needed.
 - performance upgrades on repositories with large amount of commits (20K+)
 - main page quick filter for filtering repositories
 - other than sqlite database backends can be used
 
 fixes
------
++++++
 
 - fixes #61 forked repo was showing only after cache expired
 - fixes #76 no confirmation on user deletes
 
 
 1.0.2 (**2010-11-12**)
-======================
+----------------------
 
 news
-----
+++++
 
 - tested under python2.7
 - bumped sqlalchemy and celery versions
 
 fixes
------
++++++
 
 - fixed #59 missing graph.js
 - fixed repo_size crash when repository had broken symlinks
 
 
 1.0.1 (**2010-11-10**)
-======================
+----------------------
 
 news
-----
+++++
 
 - small css updated
 
 fixes
------
++++++
 
 - fixed #53 python2.5 incompatible enumerate calls
 - fixed #52 disable mercurial extension for web
 
 
 1.0.0 (**2010-11-02**)
-======================
+----------------------
 
 - security bugfix simplehg wasn't checking for permissions on commands
   other than pull or push.
 - permissions cached queries
 
 1.0.0rc4  (**2010-10-12**)
-==========================
+--------------------------
 
 - fixed python2.5 missing simplejson imports (thanks to Jens Bäckman)
 - removed cache_manager settings from sqlalchemy meta
 
 
 1.0.0rc3 (**2010-10-11**)
-=========================
+-------------------------
 
 - fixed i18n during installation.
 
 1.0.0rc2 (**2010-10-11**)
-=========================
+-------------------------
 
 - Disabled dirsize in file browser, it's causing nasty bug when dir renames 
   occure. After vcs is fixed it'll be put back again.

File docs/images/.img

Empty file added.

File docs/images/screenshot1_main_page.png

Removed
Old image

File docs/images/screenshot2_summary_page.png

Removed
Old image

File docs/images/screenshot3_changelog_page.png

Removed
Old image

File docs/index.rst

 
 .. include:: ./../README.rst
 
-Documentation
--------------
+Users Guide
+-----------
 
 **Installation:**
 
    :maxdepth: 1
 
    usage/general
-   usage/enable_git
+   usage/git_support
    usage/statistics
    usage/backup
-   usage/api_key_access
    
 **Develop**
 
 **API**
 
 .. toctree::
-   :maxdepth: 2
+   :maxdepth: 1
 
-   api/index
+   api/api
+   api/models
    
 
 Other topics

File docs/screenshots.rst

-.. _screenshots:
-
-.. figure::  images/screenshot1_main_page.png
-
-   Main page of RhodeCode
-
-.. figure::  images/screenshot2_summary_page.png
-
-   Summary page
-   
-.. figure::  images/screenshot3_changelog_page.png
-
-   Changelog with DAG graph

File docs/setup.rst

 appropriately configured.
 
 
+Authentication by container or reverse-proxy
+--------------------------------------------
+
+Starting with version 1.3, RhodeCode supports delegating the authentication
+of users to its WSGI container, or to a reverse-proxy server through which all
+clients access the application.
+
+When these authentication methods are enabled in RhodeCode, it uses the
+username that the container/proxy (Apache/Nginx/etc) authenticated and doesn't
+perform the authentication itself. The authorization, however, is still done by
+RhodeCode according to its settings.
+
+When a user logs in for the first time using these authentication methods,
+a matching user account is created in RhodeCode with default permissions. An
+administrator can then modify it using RhodeCode'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.
+
+Container-based authentication
+''''''''''''''''''''''''''''''
+
+In a container-based authentication setup, RhodeCode reads the user name from
+the ``REMOTE_USER`` server variable provided by the WSGI container.
+
+After setting up your container (see `Apache's WSGI config`_), you'd need
+to configure it to require authentication on the location configured for
+RhodeCode.
+
+In order for RhodeCode to start using the provided username, you should set the
+following in the [app:main] section of your .ini file::
+
+    container_auth_enabled = true
+
+
+Proxy pass-through authentication
+'''''''''''''''''''''''''''''''''
+
+In a proxy pass-through authentication setup, RhodeCode reads the user name
+from the ``X-Forwarded-User`` request header, which should be configured to be
+sent by the reverse-proxy server.
+
+After setting up your proxy solution (see `Apache virtual host reverse proxy example`_,
+`Apache as subdirectory`_ or `Nginx virtual host example`_), you'd need to
+configure the authentication and add the username in a request header named
+``X-Forwarded-User``.
+
+For example, the following config section for Apache sets a subdirectory in a
+reverse-proxy setup with basic auth::
+
+    <Location /<someprefix> >
+      ProxyPass http://127.0.0.1:5000/<someprefix>
+      ProxyPassReverse http://127.0.0.1:5000/<someprefix>
+      SetEnvIf X-Url-Scheme https HTTPS=1
+
+      AuthType Basic
+      AuthName "RhodeCode authentication"
+      AuthUserFile /home/web/rhodecode/.htpasswd
+      require valid-user
+
+      RequestHeader unset X-Forwarded-User
+
+      RewriteEngine On
+      RewriteCond %{LA-U:REMOTE_USER} (.+)
+      RewriteRule .* - [E=RU:%1]
+      RequestHeader set X-Forwarded-User %{RU}e
+    </Location> 
+
+In order for RhodeCode to start using the forwarded username, you should set
+the following in the [app:main] section of your .ini file::
+
+    proxypass_auth_enabled = true
+
+.. note::
+   If you enable proxy pass-through authentication, make sure your server is
+   only accessible through the proxy. Otherwise, any client would be able to
+   forge the authentication header and could effectively become authenticated
+   using any account of their liking.
+
+Integration with Issue trackers
+-------------------------------
+
+RhodeCode provides a simple integration with issue trackers. It's possible
+to define a regular expression that will fetch issue id stored in commit
+messages and replace that with an url to this issue. To enable this simply
+uncomment following variables in the ini file::
+
+    url_pat = (?:^#|\s#)(\w+)
+    issue_server_link = https://myissueserver.com/{repo}/issue/{id}
+    issue_prefix = #
+
+`url_pat` is the regular expression that will fetch issues from commit messages.
+Default regex will match issues in format of #<number> eg. #300.
+ 
+Matched issues will be replace with the link specified as `issue_server_link` 
+{id} will be replaced with issue id, and {repo} with repository name.
+Since the # is striped `issue_prefix` is added as a prefix to url. 
+`issue_prefix` can be something different than # if you pass 
+ISSUE- as issue prefix this will generate an url in format::
+ 
+  <a href="https://myissueserver.com/example_repo/issue/300">ISSUE-300</a>  
 
 Hook management
 ---------------
 can be found at *rhodecode.lib.hooks*. 
 
 
+Changing default encoding
+-------------------------
+
+By default RhodeCode uses utf8 encoding, starting from 1.3 series this
+can be changed, simply edit default_encoding in .ini file to desired one.
+This affects many parts in rhodecode including commiters names, filenames,
+encoding of commit messages. In addition RhodeCode can detect if `chardet`
+library is installed. If `chardet` is detected RhodeCode will fallback to it
+when there are encode/decode errors.
+
+
 Setting Up Celery
 -----------------
 
 
 Sample config for nginx using proxy::
 
+    upstream rc {
+        server 127.0.0.1:5000;
+        # add more instances for load balancing
+        #server 127.0.0.1:5001;
+        #server 127.0.0.1:5002;
+    }
+    
     server {
        listen          80;
        server_name     hg.myserver.com;
        access_log      /var/log/nginx/rhodecode.access.log;
        error_log       /var/log/nginx/rhodecode.error.log;
+
        location / {
-               root /var/www/rhodecode/rhodecode/public/;
-               if (!-f $request_filename){
-                   proxy_pass      http://127.0.0.1:5000;
-               }
-               #this is important if you want to use https !!!
-               proxy_set_header X-Url-Scheme $scheme;
-               include         /etc/nginx/proxy.conf;  
+            try_files $uri @rhode;
        }
+    
+       location @rhode {
+            proxy_pass      http://rc;
+            include         /etc/nginx/proxy.conf;
+       }
+
     }  
   
 Here's the proxy.conf. It's tuned so it will not timeout on long
 pushes or large pushes::
-
+    
     proxy_redirect              off;
     proxy_set_header            Host $host;
+    proxy_set_header            X-Url-Scheme $scheme;
     proxy_set_header            X-Host $http_host;
     proxy_set_header            X-Real-IP $remote_addr;
     proxy_set_header            X-Forwarded-For $proxy_add_x_forwarded_for;

File docs/theme/nature/layout.html

 {% extends "basic/layout.html" %}
 
 {% block sidebarlogo %}
-<h3>Support my development effort.</h3>
+<h3>Support RhodeCode development.</h3>
 <div style="text-align:center">
 	<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
 	<input type="hidden" name="cmd" value="_s-xclick">
 	<input type="hidden" name="hosted_button_id" value="8U2LLRPLBKWDU">
-	<input style="border:0px !important" type="image" src="https://www.paypal.com/en_US/i/btn/btn_donate_SM.gif" 
+	<input style="border:0px !important" type="image" src="https://www.paypal.com/en_US/i/btn/btn_donate_SM.gif"
 	border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
 	<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
 	</form>

File docs/usage/api_key_access.rst

-.. _api_key_access:
-
-Access to RhodeCode via API KEY
-===============================
-
-Starting from version 1.2 rss/atom feeds and journal feeds
-can be accessed via **api_key**. This unique key is automatically generated for
-each user in RhodeCode application. Using this key it is possible to access 
-feeds without having to log in. When user changes his password a new API KEY
-is generated for him automatically. You can check your API KEY in account 
-settings page. 

File docs/usage/enable_git.rst

-.. _enable_git:
-
-Enabling GIT support (beta)
-===========================
-
-
-Git support in RhodeCode 1.1 was disabled due to current instability issues. 
-However,if you would like to test git support please feel free to re-enable it. 
-To re-enable GIT support just uncomment the git line in the 
-file **rhodecode/__init__.py**
-
-.. code-block:: python
- 
-   BACKENDS = {
-       'hg': 'Mercurial repository',
-       #'git': 'Git repository',
-   }
-
-.. note::
-   Please note that the git support provided by RhodeCode is not yet fully
-   stable and RhodeCode might crash while using git repositories. (That is why
-   it is currently disabled.) Thus be careful about enabling git support, and
-   certainly don't use it in a production setting!
-   

File docs/usage/general.rst

 one changeset
 
 
+Non changeable repository urls
+------------------------------
+
+Due to complicated nature of repository grouping, often urls of repositories
+can change.
+
+example::
+  
+  #before
+  http://server.com/repo_name