Changeset - 7e5f8c12a3fc
[Not reviewed]
Bradley M. Kuhn - 11 years ago 2014-07-03 01:04:28
bkuhn@sfconservancy.org
First step in two-part process to rename directories to kallithea.
This first step is to change all references in the files where they refer
to the old directory name.
60 files changed:
.tx/config
10
10
Changeset was too big and was cut off... Show full diff anyway
0 comments (0 inline, 0 general)
.tx/config
Show inline comments
 
[main]
 
host = https://www.transifex.com
 

	
 
[RhodeCode.pot]
 
source_file = rhodecode/i18n/rhodecode.pot
 
[Kallithea.pot]
 
source_file = kallithea/i18n/kallithea.pot
 
source_lang = en
 

	
 
trans.pl    = rhodecode/i18n/pl/LC_MESSAGES/rhodecode.po
 
trans.ru    = rhodecode/i18n/ru/LC_MESSAGES/rhodecode.po
 
trans.fr    = rhodecode/i18n/fr/LC_MESSAGES/rhodecode.po
 
trans.ja    = rhodecode/i18n/ja/LC_MESSAGES/rhodecode.po
 
trans.pt_BR = rhodecode/i18n/pt_BR/LC_MESSAGES/rhodecode.po
 
trans.zh_CN = rhodecode/i18n/zh_CN/LC_MESSAGES/rhodecode.po
 
trans.zh_TW = rhodecode/i18n/zh_TW/LC_MESSAGES/rhodecode.po
 
trans.de    = rhodecode/i18n/de/LC_MESSAGES/rhodecode.po
 
trans.pl    = kallithea/i18n/pl/LC_MESSAGES/kallithea.po
 
trans.ru    = kallithea/i18n/ru/LC_MESSAGES/kallithea.po
 
trans.fr    = kallithea/i18n/fr/LC_MESSAGES/kallithea.po
 
trans.ja    = kallithea/i18n/ja/LC_MESSAGES/kallithea.po
 
trans.pt_BR = kallithea/i18n/pt_BR/LC_MESSAGES/kallithea.po
 
trans.zh_CN = kallithea/i18n/zh_CN/LC_MESSAGES/kallithea.po
 
trans.zh_TW = kallithea/i18n/zh_TW/LC_MESSAGES/kallithea.po
 
trans.de    = kallithea/i18n/de/LC_MESSAGES/kallithea.po
 
type = PO
LICENSE.md
Show inline comments
 
@@ -32,24 +32,24 @@ Copyright © 2013 by Marijn Haverbek
 

	
 
and licensed under the MIT-permissive license, which is
 
[included in this distribution](MIT-Permissive-License.txt).
 

	
 
Additional files from upstream Codemirror are copyrighted by various authors
 
and licensed under other permissive licenses.  The sub-directories under
 
[.../public/js/mode/](rhodecode/public/js/mode) include the copyright and
 
[.../public/js/mode/](kallithea/public/js/mode) include the copyright and
 
license notice and information as they appeared in Codemirror's upstream
 
release.
 

	
 

	
 

	
 
jQuery
 
------
 

	
 
Kallithea incorporates the Javascript system called
 
[jQuery](http://jquery.org/),
 
[herein](rhodecode/public/js/jquery-1.10.2.min.js), and the Corresponding
 
[herein](kallithea/public/js/jquery-1.10.2.min.js), and the Corresponding
 
Source can be found in https://github.com/jquery/jquery at tag 1.10.2
 
(mirrored at https://kallithea-scm.org/repos/mirror/jquery/files/1.10.2/ ).
 

	
 
It is Copyright 2013 jQuery Foundation and other contributors http://jquery.com/ and is under an
 
[MIT-permissive license](MIT-Permissive-License.txt).
 

	
 
@@ -224,13 +224,13 @@ in this distribution.
 

	
 

	
 

	
 
Migrate
 
-------
 

	
 
Kallithea incorporates in rhodecode/lib/dbmigrate/migrate parts of the Python
 
Kallithea incorporates in kallithea/lib/dbmigrate/migrate parts of the Python
 
system called [Migrate or sqlalchemy-migrate](https://github.com/stackforge/sqlalchemy-migrate),
 
which is:
 

	
 
Copyright (c) 2009 Evan Rosson, Jan Dittberner, Domen Kožar
 

	
 
and licensed under the MIT-permissive license, which is
MANIFEST.in
Show inline comments
 
include rhodecode/config/deployment.ini_tmpl
 
include rhodecode/lib/dbmigrate/migrate.cfg
 
include kallithea/config/deployment.ini_tmpl
 
include kallithea/lib/dbmigrate/migrate.cfg
 

	
 
include README.rst
 
recursive-include rhodecode/i18n *
 
recursive-include kallithea/i18n *
 

	
 
#docs
 
recursive-include docs *
 

	
 
#init.d
 
recursive-include init.d *
 

	
 
#images
 
recursive-include rhodecode/public/css *
 
recursive-include rhodecode/public/images *
 
recursive-include kallithea/public/css *
 
recursive-include kallithea/public/images *
 
#js
 
recursive-include rhodecode/public/js *
 
recursive-include kallithea/public/js *
 
#templates
 
recursive-include rhodecode/templates *
 
recursive-include kallithea/templates *
development.ini
Show inline comments
 
@@ -130,13 +130,13 @@ port = 5000
 
## prefix middleware for rc
 
#[filter:proxy-prefix]
 
#use = egg:PasteDeploy#prefix
 
#prefix = /<your-prefix>
 

	
 
[app:main]
 
use = egg:rhodecode
 
use = egg:kallithea
 
## enable proxy prefix middleware
 
#filter-with = proxy-prefix
 

	
 
full_stack = true
 
static_files = true
 
## Optional Languages
 
@@ -298,13 +298,13 @@ use_celery = false
 
broker.host = localhost
 
broker.vhost = rabbitmqhost
 
broker.port = 5672
 
broker.user = rabbitmq
 
broker.password = qweqwe
 

	
 
celery.imports = rhodecode.lib.celerylib.tasks
 
celery.imports = kallithea.lib.celerylib.tasks
 

	
 
celery.result.backend = amqp
 
celery.result.dburi = amqp://
 
celery.result.serialier = json
 

	
 
#celery.send.task.error.emails = true
 
@@ -575,14 +575,14 @@ formatter = color_formatter_sql
 

	
 
[formatter_generic]
 
format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
 
datefmt = %Y-%m-%d %H:%M:%S
 

	
 
[formatter_color_formatter]
 
class=rhodecode.lib.colored_formatter.ColorFormatter
 
class=kallithea.lib.colored_formatter.ColorFormatter
 
format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
 
datefmt = %Y-%m-%d %H:%M:%S
 

	
 
[formatter_color_formatter_sql]
 
class=rhodecode.lib.colored_formatter.ColorFormatterSql
 
class=kallithea.lib.colored_formatter.ColorFormatterSql
 
format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
 
datefmt = %Y-%m-%d %H:%M:%S
docs/api/models.rst
Show inline comments
 
.. _models:
 

	
 
========================
 
The :mod:`models` Module
 
========================
 

	
 
.. automodule:: rhodecode.model
 
.. automodule:: kallithea.model
 
   :members:
 

	
 
.. automodule:: rhodecode.model.comment
 
.. automodule:: kallithea.model.comment
 
   :members:
 

	
 
.. automodule:: rhodecode.model.notification
 
.. automodule:: kallithea.model.notification
 
   :members:
 

	
 
.. automodule:: rhodecode.model.permission
 
.. automodule:: kallithea.model.permission
 
   :members:
 

	
 
.. automodule:: rhodecode.model.repo_permission
 
.. automodule:: kallithea.model.repo_permission
 
   :members:
 

	
 
.. automodule:: rhodecode.model.repo
 
.. automodule:: kallithea.model.repo
 
   :members:
 

	
 
.. automodule:: rhodecode.model.repos_group
 
.. automodule:: kallithea.model.repos_group
 
   :members:
 

	
 
.. automodule:: rhodecode.model.scm
 
.. automodule:: kallithea.model.scm
 
   :members:
 

	
 
.. automodule:: rhodecode.model.user
 
.. automodule:: kallithea.model.user
 
   :members:
 

	
 
.. automodule:: rhodecode.model.users_group
 
.. automodule:: kallithea.model.users_group
 
   :members:
docs/conf.py
Show inline comments
 
@@ -51,13 +51,13 @@ copyright = u'%s, Marcin Kuzminski' % (d
 
# |version| and |release|, also used in various other places throughout the
 
# built documents.
 
#
 
# The short X.Y version.
 
root = os.path.dirname(os.path.dirname(__file__))
 
sys.path.append(root)
 
from rhodecode import __version__
 
from kallithea import __version__
 
version = __version__
 
# The full version, including alpha/beta/rc tags.
 
release = __version__
 

	
 
# The language for content autogenerated by Sphinx. Refer to documentation
 
# for a list of supported languages.
 
@@ -215,13 +215,13 @@ latex_documents = [
 

	
 
# -- Options for manual page output --------------------------------------------
 

	
 
# One entry per manual page. List of tuples
 
# (source start file, name, description, authors, manual section).
 
man_pages = [
 
    ('index', 'rhodecode', u'RhodeCode Documentation',
 
    ('index', 'kallithea', u'RhodeCode Documentation',
 
     [u'Marcin Kuzminski'], 1)
 
]
 

	
 

	
 
# Example configuration for intersphinx: refer to the Python standard library.
 
intersphinx_mapping = {'http://docs.python.org/': None}
docs/contributing.rst
Show inline comments
 
@@ -38,13 +38,13 @@ test.ini file is used and by default it 
 
to change your testing enviroment.
 

	
 

	
 
There's a special set of tests for push/pull operations, you can runn them using::
 

	
 
    paster serve test.ini --pid-file=test.pid --daemon
 
    RC_WHOOSH_TEST_DISABLE=1 RC_NO_TMP_PATH=1 nosetests -x rhodecode/tests/other/test_vcs_operations.py
 
    RC_WHOOSH_TEST_DISABLE=1 RC_NO_TMP_PATH=1 nosetests -x kallithea/tests/other/test_vcs_operations.py
 
    kill -9 $(cat test.pid)
 

	
 

	
 
| Thank you for any contributions!
 
|  Marcin
 

	
docs/setup.rst
Show inline comments
 
@@ -474,13 +474,13 @@ To access hooks setting click `advanced 
 
Settings in Admin.
 

	
 
There are 4 built in hooks that cannot be changed (only enable/disable by
 
checkboxes on previos section).
 
To add another custom hook simply fill in first section with
 
<name>.<hook_type> and the second one with hook path. Example hooks
 
can be found at *rhodecode.lib.hooks*.
 
can be found at *kallithea.lib.hooks*.
 

	
 

	
 
Changing default encoding
 
-------------------------
 

	
 
By default RhodeCode uses utf8 encoding, starting from 1.3 series this
 
@@ -570,13 +570,13 @@ Sample config for nginx using proxy::
 
       ssl_protocols SSLv3 TLSv1;
 
       ssl_ciphers DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:EDH-RSA-DES-CBC3-SHA:AES256-SHA:DES-CBC3-SHA:AES128-SHA:RC4-SHA:RC4-MD5;
 
       ssl_prefer_server_ciphers on;
 

	
 
       ## uncomment root directive if you want to serve static files by nginx
 
       ## requires static_files = false in .ini file
 
       #root /path/to/installation/rhodecode/public;
 
       #root /path/to/installation/kallithea/public;
 
       include         /etc/nginx/proxy.conf;
 
       location / {
 
            try_files $uri @rhode;
 
       }
 

	
 
       location @rhode {
docs/usage/general.rst
Show inline comments
 
@@ -86,13 +86,13 @@ mail is sent to all participants, the pe
 
Trending source files
 
---------------------
 

	
 
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 `/kallithea/lib/celerylib/tasks.py`
 

	
 

	
 
Cloning remote repositories
 
---------------------------
 

	
 
RhodeCode has an ability to clone remote repos from given remote locations.
docs/usage/git_support.rst
Show inline comments
 
@@ -39,13 +39,13 @@ And comment out bellow options::
 

	
 

	
 
You can simply run `paster serve` as usual.
 

	
 

	
 
You can always disable git/hg support by editing a
 
file **rhodecode/__init__.py** and commenting out backends
 
file **kallithea/__init__.py** and commenting out backends
 

	
 
.. code-block:: python
 

	
 
   BACKENDS = {
 
       'hg': 'Mercurial repository',
 
       #'git': 'Git repository',
docs/usage/troubleshooting.rst
Show inline comments
 
@@ -6,13 +6,13 @@ 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
 
   /home/my-virtual-python/lib/python2.6/site-packages/kallithea/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.
production.ini
Show inline comments
 
@@ -130,13 +130,13 @@ port = 5000
 
## prefix middleware for rc
 
#[filter:proxy-prefix]
 
#use = egg:PasteDeploy#prefix
 
#prefix = /<your-prefix>
 

	
 
[app:main]
 
use = egg:rhodecode
 
use = egg:kallithea
 
## enable proxy prefix middleware
 
#filter-with = proxy-prefix
 

	
 
full_stack = true
 
static_files = true
 
## Optional Languages
 
@@ -298,13 +298,13 @@ use_celery = false
 
broker.host = localhost
 
broker.vhost = rabbitmqhost
 
broker.port = 5672
 
broker.user = rabbitmq
 
broker.password = qweqwe
 

	
 
celery.imports = rhodecode.lib.celerylib.tasks
 
celery.imports = kallithea.lib.celerylib.tasks
 

	
 
celery.result.backend = amqp
 
celery.result.dburi = amqp://
 
celery.result.serialier = json
 

	
 
#celery.send.task.error.emails = true
 
@@ -575,14 +575,14 @@ formatter = generic
 

	
 
[formatter_generic]
 
format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
 
datefmt = %Y-%m-%d %H:%M:%S
 

	
 
[formatter_color_formatter]
 
class=rhodecode.lib.colored_formatter.ColorFormatter
 
class=kallithea.lib.colored_formatter.ColorFormatter
 
format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
 
datefmt = %Y-%m-%d %H:%M:%S
 

	
 
[formatter_color_formatter_sql]
 
class=rhodecode.lib.colored_formatter.ColorFormatterSql
 
class=kallithea.lib.colored_formatter.ColorFormatterSql
 
format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
 
datefmt = %Y-%m-%d %H:%M:%S
rhodecode/__init__.py
Show inline comments
 
@@ -9,13 +9,13 @@
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
"""
 
rhodecode.__init__
 
kallithea.__init__
 
~~~~~~~~~~~~~~~~~~
 

	
 
RhodeCode, a web based repository management based on pylons
 
versioning implementation: http://www.python.org/dev/peps/pep-0386/
 

	
 
:created_on: Apr 9, 2010
 
@@ -40,13 +40,13 @@ CELERY_EAGER = False
 
CONFIG = {}
 

	
 
# Linked module for extensions
 
EXTENSIONS = {}
 

	
 
try:
 
    from rhodecode.lib import get_current_revision
 
    from kallithea.lib import get_current_revision
 
    _rev = get_current_revision(quiet=True)
 
    if _rev and len(VERSION) > 3:
 
        VERSION += ('%s' % _rev[0],)
 
except ImportError:
 
    pass
 

	
rhodecode/bin/__init__.py
Show inline comments
 
@@ -9,13 +9,13 @@
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
"""
 
rhodecode.bin.__init__
 
kallithea.bin.__init__
 
~~~~~~~~~~~~~~~~~~~~~~
 

	
 
Binary scripts for RhodeCode
 

	
 
:created_on: Jun 03, 2012
 
:author: marcink
rhodecode/bin/base.py
Show inline comments
 
@@ -9,13 +9,13 @@
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
"""
 
rhodecode.bin.base
 
kallithea.bin.base
 
~~~~~~~~~~~~~~~~~~
 

	
 
Base utils for shell scripts
 

	
 
:created_on: May 09, 2013
 
:author: marcink
 
@@ -27,13 +27,13 @@ import os
 
import sys
 
import random
 
import urllib2
 
import pprint
 

	
 
try:
 
    from rhodecode.lib.ext_json import json
 
    from kallithea.lib.ext_json import json
 
except ImportError:
 
    try:
 
        import simplejson as json
 
    except ImportError:
 
        import json
 

	
rhodecode/bin/ldap_sync.py
Show inline comments
 
@@ -9,13 +9,13 @@
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
"""
 
rhodecode.bin.__init__
 
kallithea.bin.__init__
 
~~~~~~~~~~~~~~~~~~~~~~
 

	
 
LDAP sync script
 

	
 
:created_on: Mar 06, 2013
 
:author: marcink
 
@@ -25,13 +25,13 @@ LDAP sync script
 

	
 
import ldap
 
import urllib2
 
import uuid
 

	
 
try:
 
    from rhodecode.lib.compat import json
 
    from kallithea.lib.compat import json
 
except ImportError:
 
    try:
 
        import simplejson as json
 
    except ImportError:
 
        import json
 

	
rhodecode/bin/rhodecode_api.py
Show inline comments
 
@@ -9,13 +9,13 @@
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
"""
 
rhodecode.bin.api
 
kallithea.bin.api
 
~~~~~~~~~~~~~~~~~
 

	
 
Api CLI client for RhodeCode
 

	
 
:created_on: Jun 3, 2012
 
:author: marcink
 
@@ -24,13 +24,13 @@ Api CLI client for RhodeCode
 
"""
 

	
 
from __future__ import with_statement
 
import sys
 
import argparse
 

	
 
from rhodecode.bin.base import json, api_call, RcConf, FORMAT_JSON, FORMAT_PRETTY
 
from kallithea.bin.base import json, api_call, RcConf, FORMAT_JSON, FORMAT_PRETTY
 

	
 

	
 
def argparser(argv):
 
    usage = (
 
      "rhodecode-api [-h] [--format=FORMAT] [--apikey=APIKEY] [--apihost=APIHOST] "
 
      "[--config=CONFIG] [--save-config] "
rhodecode/bin/rhodecode_backup.py
Show inline comments
 
@@ -9,13 +9,13 @@
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
"""
 
rhodecode.bin.backup_manager
 
kallithea.bin.backup_manager
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 

	
 
Repositories backup manager, it allows to backups all
 
repositories and send it to backup server using RSA key via ssh.
 

	
 
:created_on: Feb 28, 2010
rhodecode/bin/rhodecode_config.py
Show inline comments
 
@@ -9,13 +9,13 @@
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
"""
 
rhodecode.bin.rhodecode_config
 
kallithea.bin.rhodecode_config
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 

	
 
configuration generator for RhodeCode
 

	
 
:created_on: Jun 18, 2013
 
:author: marcink
rhodecode/bin/rhodecode_gist.py
Show inline comments
 
@@ -9,13 +9,13 @@
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
"""
 
rhodecode.bin.rhodecode_gist
 
kallithea.bin.rhodecode_gist
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 

	
 
Gist CLI client for RhodeCode
 

	
 
:created_on: May 9, 2013
 
:author: marcink
 
@@ -27,13 +27,13 @@ from __future__ import with_statement
 
import os
 
import sys
 
import stat
 
import argparse
 
import fileinput
 

	
 
from rhodecode.bin.base import json, api_call, RcConf, FORMAT_JSON, FORMAT_PRETTY
 
from kallithea.bin.base import json, api_call, RcConf, FORMAT_JSON, FORMAT_PRETTY
 

	
 

	
 
def argparser(argv):
 
    usage = (
 
      "rhodecode-gist [-h] [--format=FORMAT] [--apikey=APIKEY] [--apihost=APIHOST] "
 
      "[--config=CONFIG] [--save-config] [GIST OPTIONS] "
rhodecode/bin/template.ini.mako
Show inline comments
 
@@ -139,13 +139,13 @@ port = ${port}
 
<%text>## prefix middleware for rc</%text>
 
#[filter:proxy-prefix]
 
#use = egg:PasteDeploy#prefix
 
#prefix = /<your-prefix>
 

	
 
[app:main]
 
use = egg:rhodecode
 
use = egg:kallithea
 
<%text>## enable proxy prefix middleware</%text>
 
#filter-with = proxy-prefix
 

	
 
full_stack = true
 
static_files = true
 
<%text>## Optional Languages</%text>
 
@@ -303,13 +303,13 @@ use_celery = false
 
broker.host = localhost
 
broker.vhost = rabbitmqhost
 
broker.port = 5672
 
broker.user = rabbitmq
 
broker.password = qweqwe
 

	
 
celery.imports = rhodecode.lib.celerylib.tasks
 
celery.imports = kallithea.lib.celerylib.tasks
 

	
 
celery.result.backend = amqp
 
celery.result.dburi = amqp://
 
celery.result.serialier = json
 

	
 
#celery.send.task.error.emails = true
 
@@ -596,14 +596,14 @@ formatter = generic
 
</%text>
 
[formatter_generic]
 
format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
 
datefmt = %Y-%m-%d %H:%M:%S
 

	
 
[formatter_color_formatter]
 
class=rhodecode.lib.colored_formatter.ColorFormatter
 
class=kallithea.lib.colored_formatter.ColorFormatter
 
format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
 
datefmt = %Y-%m-%d %H:%M:%S
 

	
 
[formatter_color_formatter_sql]
 
class=rhodecode.lib.colored_formatter.ColorFormatterSql
 
class=kallithea.lib.colored_formatter.ColorFormatterSql
 
format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
 
datefmt = %Y-%m-%d %H:%M:%S
rhodecode/config/conf.py
Show inline comments
 
@@ -9,25 +9,25 @@
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
"""
 
rhodecode.config.conf
 
kallithea.config.conf
 
~~~~~~~~~~~~~~~~~~~~~
 

	
 
Various config settings for RhodeCode
 

	
 
:created_on: Mar 7, 2012
 
:author: marcink
 
:copyright: (c) 2013 RhodeCode GmbH.
 
:license: GPLv3, see LICENSE for more details.
 
"""
 
from rhodecode import EXTENSIONS
 
from kallithea import EXTENSIONS
 

	
 
from rhodecode.lib.utils2 import __get_lem
 
from kallithea.lib.utils2 import __get_lem
 

	
 

	
 
# language map is also used by whoosh indexer, which for those specified
 
# extensions will index it's content
 
LANGUAGES_EXTENSIONS_MAP = __get_lem()
 

	
rhodecode/config/deployment.ini_tmpl
Show inline comments
 
@@ -130,13 +130,13 @@ port = 5000
 
## prefix middleware for rc
 
#[filter:proxy-prefix]
 
#use = egg:PasteDeploy#prefix
 
#prefix = /<your-prefix>
 

	
 
[app:main]
 
use = egg:rhodecode
 
use = egg:kallithea
 
## enable proxy prefix middleware
 
#filter-with = proxy-prefix
 

	
 
full_stack = true
 
static_files = true
 
## Optional Languages
 
@@ -298,13 +298,13 @@ use_celery = false
 
broker.host = localhost
 
broker.vhost = rabbitmqhost
 
broker.port = 5672
 
broker.user = rabbitmq
 
broker.password = qweqwe
 

	
 
celery.imports = rhodecode.lib.celerylib.tasks
 
celery.imports = kallithea.lib.celerylib.tasks
 

	
 
celery.result.backend = amqp
 
celery.result.dburi = amqp://
 
celery.result.serialier = json
 

	
 
#celery.send.task.error.emails = true
 
@@ -584,14 +584,14 @@ formatter = generic
 

	
 
[formatter_generic]
 
format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
 
datefmt = %Y-%m-%d %H:%M:%S
 

	
 
[formatter_color_formatter]
 
class=rhodecode.lib.colored_formatter.ColorFormatter
 
class=kallithea.lib.colored_formatter.ColorFormatter
 
format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
 
datefmt = %Y-%m-%d %H:%M:%S
 

	
 
[formatter_color_formatter_sql]
 
class=rhodecode.lib.colored_formatter.ColorFormatterSql
 
class=kallithea.lib.colored_formatter.ColorFormatterSql
 
format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
 
datefmt = %Y-%m-%d %H:%M:%S
rhodecode/config/environment.py
Show inline comments
 
@@ -14,34 +14,34 @@
 
"""
 
    Pylons environment configuration
 
"""
 

	
 
import os
 
import logging
 
import rhodecode
 
import kallithea
 
import platform
 

	
 
from mako.lookup import TemplateLookup
 
from pylons.configuration import PylonsConfig
 
from pylons.error import handle_mako_error
 

	
 
# don't remove this import it does magic for celery
 
from rhodecode.lib import celerypylons
 
from kallithea.lib import celerypylons
 

	
 
import rhodecode.lib.app_globals as app_globals
 
import kallithea.lib.app_globals as app_globals
 

	
 
from rhodecode.config.routing import make_map
 
from kallithea.config.routing import make_map
 

	
 
from rhodecode.lib import helpers
 
from rhodecode.lib.auth import set_available_permissions
 
from rhodecode.lib.utils import repo2db_mapper, make_ui, set_rhodecode_config,\
 
from kallithea.lib import helpers
 
from kallithea.lib.auth import set_available_permissions
 
from kallithea.lib.utils import repo2db_mapper, make_ui, set_rhodecode_config,\
 
    load_rcextensions, check_git_version, set_vcs_config
 
from rhodecode.lib.utils2 import engine_from_config, str2bool
 
from rhodecode.lib.db_manage import DbManage
 
from rhodecode.model import init_model
 
from rhodecode.model.scm import ScmModel
 
from kallithea.lib.utils2 import engine_from_config, str2bool
 
from kallithea.lib.db_manage import DbManage
 
from kallithea.model import init_model
 
from kallithea.model.scm import ScmModel
 

	
 
log = logging.getLogger(__name__)
 

	
 

	
 
def load_environment(global_conf, app_conf, initial=False,
 
                     test_env=None, test_index=None):
 
@@ -58,22 +58,22 @@ def load_environment(global_conf, app_co
 
        controllers=os.path.join(root, 'controllers'),
 
        static_files=os.path.join(root, 'public'),
 
        templates=[os.path.join(root, 'templates')]
 
    )
 

	
 
    # Initialize config with the basic options
 
    config.init_app(global_conf, app_conf, package='rhodecode', paths=paths)
 
    config.init_app(global_conf, app_conf, package='kallithea', paths=paths)
 

	
 
    # store some globals into rhodecode
 
    rhodecode.CELERY_ON = str2bool(config['app_conf'].get('use_celery'))
 
    rhodecode.CELERY_EAGER = str2bool(config['app_conf'].get('celery.always.eager'))
 
    kallithea.CELERY_ON = str2bool(config['app_conf'].get('use_celery'))
 
    kallithea.CELERY_EAGER = str2bool(config['app_conf'].get('celery.always.eager'))
 

	
 
    config['routes.map'] = make_map(config)
 
    config['pylons.app_globals'] = app_globals.Globals(config)
 
    config['pylons.h'] = helpers
 
    rhodecode.CONFIG = config
 
    kallithea.CONFIG = config
 

	
 
    load_rcextensions(root_path=config['here'])
 

	
 
    # Setup cache object as early as possible
 
    import pylons
 
    pylons.cache._push_object(config['pylons.app_globals'].cache)
 
@@ -95,14 +95,14 @@ def load_environment(global_conf, app_co
 
        if test_index is None:
 
            test_index = not int(os.environ.get('RC_WHOOSH_TEST_DISABLE', 0))
 
        if os.environ.get('TEST_DB'):
 
            # swap config if we pass enviroment variable
 
            config['sqlalchemy.db1.url'] = os.environ.get('TEST_DB')
 

	
 
        from rhodecode.lib.utils import create_test_env, create_test_index
 
        from rhodecode.tests import TESTS_TMP_PATH
 
        from kallithea.lib.utils import create_test_env, create_test_index
 
        from kallithea.tests import TESTS_TMP_PATH
 
        #set RC_NO_TMP_PATH=1 to disable re-creating the database and
 
        #test repos
 
        if test_env:
 
            create_test_env(TESTS_TMP_PATH, config)
 
        #set RC_WHOOSH_TEST_DISABLE=1 to disable whoosh index during tests
 
        if test_index:
 
@@ -116,24 +116,24 @@ def load_environment(global_conf, app_co
 

	
 
    set_available_permissions(config)
 
    repos_path = make_ui('db').configitems('paths')[0][1]
 
    config['base_path'] = repos_path
 
    set_rhodecode_config(config)
 

	
 
    instance_id = rhodecode.CONFIG.get('instance_id')
 
    instance_id = kallithea.CONFIG.get('instance_id')
 
    if instance_id == '*':
 
        instance_id = '%s-%s' % (platform.uname()[1], os.getpid())
 
        rhodecode.CONFIG['instance_id'] = instance_id
 
        kallithea.CONFIG['instance_id'] = instance_id
 

	
 
    # CONFIGURATION OPTIONS HERE (note: all config options will override
 
    # any Pylons config options)
 

	
 
    # store config reference into our module to skip import magic of
 
    # pylons
 
    rhodecode.CONFIG.update(config)
 
    set_vcs_config(rhodecode.CONFIG)
 
    kallithea.CONFIG.update(config)
 
    set_vcs_config(kallithea.CONFIG)
 

	
 
    #check git version
 
    check_git_version()
 

	
 
    if str2bool(config.get('initial_repo_scan', True)):
 
        repo2db_mapper(ScmModel().repo_scan(repos_path),
rhodecode/config/middleware.py
Show inline comments
 
@@ -23,17 +23,17 @@ from paste.urlparser import StaticURLPar
 
from paste.deploy.converters import asbool
 
from paste.gzipper import make_gzip_middleware
 

	
 
from pylons.middleware import ErrorHandler, StatusCodeRedirect
 
from pylons.wsgiapp import PylonsApp
 

	
 
from rhodecode.lib.middleware.simplehg import SimpleHg
 
from rhodecode.lib.middleware.simplegit import SimpleGit
 
from rhodecode.lib.middleware.https_fixup import HttpsFixup
 
from rhodecode.config.environment import load_environment
 
from rhodecode.lib.middleware.wrapper import RequestWrapper
 
from kallithea.lib.middleware.simplehg import SimpleHg
 
from kallithea.lib.middleware.simplegit import SimpleGit
 
from kallithea.lib.middleware.https_fixup import HttpsFixup
 
from kallithea.config.environment import load_environment
 
from kallithea.lib.middleware.wrapper import RequestWrapper
 

	
 

	
 
def make_app(global_conf, full_stack=True, static_files=True, **app_conf):
 
    """Create a Pylons WSGI application and return it
 

	
 
    ``global_conf``
 
@@ -61,19 +61,19 @@ def make_app(global_conf, full_stack=Tru
 
    # Routing/Session/Cache Middleware
 
    app = RoutesMiddleware(app, config['routes.map'])
 
    app = SessionMiddleware(app, config)
 

	
 
    # CUSTOM MIDDLEWARE HERE (filtered by error handling middlewares)
 
    if asbool(config['pdebug']):
 
        from rhodecode.lib.profiler import ProfilingMiddleware
 
        from kallithea.lib.profiler import ProfilingMiddleware
 
        app = ProfilingMiddleware(app)
 

	
 
    if asbool(full_stack):
 

	
 
        from rhodecode.lib.middleware.sentry import Sentry
 
        from rhodecode.lib.middleware.errormator import Errormator
 
        from kallithea.lib.middleware.sentry import Sentry
 
        from kallithea.lib.middleware.errormator import Errormator
 
        if Errormator and asbool(config['app_conf'].get('errormator')):
 
            app = Errormator(app, config)
 
        elif Sentry:
 
            app = Sentry(app, config)
 

	
 
        # Handle Python exceptions
rhodecode/config/post_receive_tmpl.py
Show inline comments
 
#!/usr/bin/env python
 
import os
 
import sys
 

	
 
try:
 
    import rhodecode
 
    import kallithea
 
    RC_HOOK_VER = '_TMPL_'
 
    os.environ['RC_HOOK_VER'] = RC_HOOK_VER
 
    from rhodecode.lib.hooks import handle_git_post_receive as _handler
 
    from kallithea.lib.hooks import handle_git_post_receive as _handler
 
except ImportError:
 
    if os.environ.get('RC_DEBUG_GIT_HOOK'):
 
        import traceback
 
        print traceback.format_exc()
 
    rhodecode = None
 
    kallithea = None
 

	
 

	
 
def main():
 
    if rhodecode is None:
 
    if kallithea is None:
 
        # exit with success if we cannot import rhodecode !!
 
        # this allows simply push to this repo even without
 
        # rhodecode
 
        sys.exit(0)
 

	
 
    repo_path = os.path.abspath('.')
rhodecode/config/pre_receive_tmpl.py
Show inline comments
 
#!/usr/bin/env python
 
import os
 
import sys
 

	
 
try:
 
    import rhodecode
 
    import kallithea
 
    RC_HOOK_VER = '_TMPL_'
 
    os.environ['RC_HOOK_VER'] = RC_HOOK_VER
 
    from rhodecode.lib.hooks import handle_git_pre_receive as _handler
 
    from kallithea.lib.hooks import handle_git_pre_receive as _handler
 
except ImportError:
 
    if os.environ.get('RC_DEBUG_GIT_HOOK'):
 
        import traceback
 
        print traceback.format_exc()
 
    rhodecode = None
 
    kallithea = None
 

	
 

	
 
def main():
 
    if rhodecode is None:
 
    if kallithea is None:
 
        # exit with success if we cannot import rhodecode !!
 
        # this allows simply push to this repo even without
 
        # rhodecode
 
        sys.exit(0)
 

	
 
    repo_path = os.path.abspath('.')
rhodecode/config/routing.py
Show inline comments
 
@@ -30,13 +30,13 @@ def make_map(config):
 
    """Create, configure and return the routes Mapper"""
 
    rmap = Mapper(directory=config['pylons.paths']['controllers'],
 
                  always_scan=config['debug'])
 
    rmap.minimization = False
 
    rmap.explicit = False
 

	
 
    from rhodecode.lib.utils import (is_valid_repo, is_valid_repo_group,
 
    from kallithea.lib.utils import (is_valid_repo, is_valid_repo_group,
 
                                     get_repo_by_id)
 

	
 
    def check_repo(environ, match_dict):
 
        """
 
        check for valid repository for proper 404 handling
 

	
rhodecode/controllers/admin/admin.py
Show inline comments
 
@@ -9,13 +9,13 @@
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
"""
 
rhodecode.controllers.admin.admin
 
kallithea.controllers.admin.admin
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 

	
 
Controller for Admin panel of Rhodecode
 

	
 
:created_on: Apr 7, 2010
 
:author: marcink
 
@@ -30,18 +30,18 @@ from pylons import request, tmpl_context
 
from sqlalchemy.orm import joinedload
 
from whoosh.qparser.default import QueryParser
 
from whoosh.qparser.dateparse import DateParserPlugin
 
from whoosh import query
 
from sqlalchemy.sql.expression import or_, and_, func
 

	
 
from rhodecode.model.db import UserLog, User
 
from rhodecode.lib.auth import LoginRequired, HasPermissionAllDecorator
 
from rhodecode.lib.base import BaseController, render
 
from rhodecode.lib.utils2 import safe_int, remove_prefix, remove_suffix
 
from rhodecode.lib.indexers import JOURNAL_SCHEMA
 
from rhodecode.lib.helpers import Page
 
from kallithea.model.db import UserLog, User
 
from kallithea.lib.auth import LoginRequired, HasPermissionAllDecorator
 
from kallithea.lib.base import BaseController, render
 
from kallithea.lib.utils2 import safe_int, remove_prefix, remove_suffix
 
from kallithea.lib.indexers import JOURNAL_SCHEMA
 
from kallithea.lib.helpers import Page
 

	
 

	
 
log = logging.getLogger(__name__)
 

	
 

	
 
def _journal_filter(user_log, search_term):
rhodecode/controllers/admin/auth_settings.py
Show inline comments
 
@@ -9,13 +9,13 @@
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
"""
 
rhodecode.controllers.admin.auth_settings
 
kallithea.controllers.admin.auth_settings
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 

	
 
pluggable authentication controller for RhodeCode
 

	
 
:created_on: Nov 26, 2010
 
:author: akesterson
 
@@ -29,20 +29,20 @@ import traceback
 
from pylons import request, response, session, tmpl_context as c, url
 
from pylons.controllers.util import abort, redirect
 
from pylons.i18n.translation import _
 

	
 
from sqlalchemy.exc import DatabaseError
 

	
 
from rhodecode.lib import helpers as h
 
from rhodecode.lib.compat import json, formatted_json
 
from rhodecode.lib.base import BaseController, render
 
from rhodecode.lib.auth import LoginRequired, HasPermissionAllDecorator
 
from rhodecode.lib import auth_modules
 
from rhodecode.model.forms import AuthSettingsForm
 
from rhodecode.model.db import RhodeCodeSetting
 
from rhodecode.model.meta import Session
 
from kallithea.lib import helpers as h
 
from kallithea.lib.compat import json, formatted_json
 
from kallithea.lib.base import BaseController, render
 
from kallithea.lib.auth import LoginRequired, HasPermissionAllDecorator
 
from kallithea.lib import auth_modules
 
from kallithea.model.forms import AuthSettingsForm
 
from kallithea.model.db import RhodeCodeSetting
 
from kallithea.model.meta import Session
 

	
 
log = logging.getLogger(__name__)
 

	
 

	
 
class AuthSettingsController(BaseController):
 

	
 
@@ -50,25 +50,25 @@ class AuthSettingsController(BaseControl
 
    @HasPermissionAllDecorator('hg.admin')
 
    def __before__(self):
 
        super(AuthSettingsController, self).__before__()
 

	
 
    def __load_defaults(self):
 
        c.available_plugins = [
 
            'rhodecode.lib.auth_modules.auth_rhodecode',
 
            'rhodecode.lib.auth_modules.auth_container',
 
            'rhodecode.lib.auth_modules.auth_ldap',
 
            'rhodecode.lib.auth_modules.auth_crowd',
 
            'kallithea.lib.auth_modules.auth_rhodecode',
 
            'kallithea.lib.auth_modules.auth_container',
 
            'kallithea.lib.auth_modules.auth_ldap',
 
            'kallithea.lib.auth_modules.auth_crowd',
 
        ]
 
        c.enabled_plugins = RhodeCodeSetting.get_auth_plugins()
 

	
 
    def index(self, defaults=None, errors=None, prefix_error=False):
 
        self.__load_defaults()
 
        _defaults = {}
 
        # default plugins loaded
 
        formglobals = {
 
            "auth_plugins": ["rhodecode.lib.auth_modules.auth_rhodecode"]
 
            "auth_plugins": ["kallithea.lib.auth_modules.auth_rhodecode"]
 
        }
 
        formglobals.update(RhodeCodeSetting.get_auth_settings())
 
        formglobals["plugin_settings"] = {}
 
        formglobals["auth_plugins_shortnames"] = {}
 
        _defaults["auth_plugins"] = formglobals["auth_plugins"]
 

	
rhodecode/controllers/admin/defaults.py
Show inline comments
 
@@ -9,13 +9,13 @@
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
"""
 
rhodecode.controllers.admin.defaults
 
kallithea.controllers.admin.defaults
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 

	
 
default settings controller for Rhodecode
 

	
 
:created_on: Apr 27, 2010
 
:author: marcink
 
@@ -29,19 +29,19 @@ import formencode
 
from formencode import htmlfill
 

	
 
from pylons import request, session, tmpl_context as c, url
 
from pylons.controllers.util import abort, redirect
 
from pylons.i18n.translation import _
 

	
 
from rhodecode.lib import helpers as h
 
from rhodecode.lib.auth import LoginRequired, HasPermissionAllDecorator
 
from rhodecode.lib.base import BaseController, render
 
from rhodecode.model.forms import DefaultsForm
 
from rhodecode.model.meta import Session
 
from rhodecode import BACKENDS
 
from rhodecode.model.db import RhodeCodeSetting
 
from kallithea.lib import helpers as h
 
from kallithea.lib.auth import LoginRequired, HasPermissionAllDecorator
 
from kallithea.lib.base import BaseController, render
 
from kallithea.model.forms import DefaultsForm
 
from kallithea.model.meta import Session
 
from kallithea import BACKENDS
 
from kallithea.model.db import RhodeCodeSetting
 

	
 
log = logging.getLogger(__name__)
 

	
 

	
 
class DefaultsController(BaseController):
 
    """REST Controller styled on the Atom Publishing Protocol"""
rhodecode/controllers/admin/gists.py
Show inline comments
 
@@ -9,13 +9,13 @@
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
"""
 
rhodecode.controllers.admin.gist
 
kallithea.controllers.admin.gist
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 

	
 
gist controller for RhodeCode
 

	
 
:created_on: May 9, 2013
 
:author: marcink
 
@@ -30,25 +30,25 @@ import formencode
 
from formencode import htmlfill
 

	
 
from pylons import request, response, tmpl_context as c, url
 
from pylons.controllers.util import abort, redirect
 
from pylons.i18n.translation import _
 

	
 
from rhodecode.model.forms import GistForm
 
from rhodecode.model.gist import GistModel
 
from rhodecode.model.meta import Session
 
from rhodecode.model.db import Gist, User
 
from rhodecode.lib import helpers as h
 
from rhodecode.lib.base import BaseController, render
 
from rhodecode.lib.auth import LoginRequired, NotAnonymous
 
from rhodecode.lib.utils import jsonify
 
from rhodecode.lib.utils2 import safe_str, safe_int, time_to_datetime
 
from rhodecode.lib.helpers import Page
 
from kallithea.model.forms import GistForm
 
from kallithea.model.gist import GistModel
 
from kallithea.model.meta import Session
 
from kallithea.model.db import Gist, User
 
from kallithea.lib import helpers as h
 
from kallithea.lib.base import BaseController, render
 
from kallithea.lib.auth import LoginRequired, NotAnonymous
 
from kallithea.lib.utils import jsonify
 
from kallithea.lib.utils2 import safe_str, safe_int, time_to_datetime
 
from kallithea.lib.helpers import Page
 
from webob.exc import HTTPNotFound, HTTPForbidden
 
from sqlalchemy.sql.expression import or_
 
from rhodecode.lib.vcs.exceptions import VCSError, NodeNotChangedError
 
from kallithea.lib.vcs.exceptions import VCSError, NodeNotChangedError
 

	
 
log = logging.getLogger(__name__)
 

	
 

	
 
class GistsController(BaseController):
 
    """REST Controller styled on the Atom Publishing Protocol"""
rhodecode/controllers/admin/my_account.py
Show inline comments
 
@@ -9,13 +9,13 @@
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
"""
 
rhodecode.controllers.admin.my_account
 
kallithea.controllers.admin.my_account
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 

	
 
my account controller for rhodecode admin
 

	
 
:created_on: August 20, 2013
 
:author: marcink
 
@@ -31,24 +31,24 @@ import formencode
 
from sqlalchemy import func, or_
 
from formencode import htmlfill
 
from pylons import request, tmpl_context as c, url
 
from pylons.controllers.util import redirect
 
from pylons.i18n.translation import _
 

	
 
from rhodecode.lib import helpers as h
 
from rhodecode.lib.auth import LoginRequired, NotAnonymous, AuthUser
 
from rhodecode.lib.base import BaseController, render
 
from rhodecode.lib.utils2 import generate_api_key, safe_int
 
from rhodecode.lib.compat import json
 
from rhodecode.model.db import Repository, PullRequest, PullRequestReviewers, \
 
from kallithea.lib import helpers as h
 
from kallithea.lib.auth import LoginRequired, NotAnonymous, AuthUser
 
from kallithea.lib.base import BaseController, render
 
from kallithea.lib.utils2 import generate_api_key, safe_int
 
from kallithea.lib.compat import json
 
from kallithea.model.db import Repository, PullRequest, PullRequestReviewers, \
 
    UserEmailMap, UserApiKeys, User, UserFollowing
 
from rhodecode.model.forms import UserForm, PasswordChangeForm
 
from rhodecode.model.user import UserModel
 
from rhodecode.model.repo import RepoModel
 
from rhodecode.model.api_key import ApiKeyModel
 
from rhodecode.model.meta import Session
 
from kallithea.model.forms import UserForm, PasswordChangeForm
 
from kallithea.model.user import UserModel
 
from kallithea.model.repo import RepoModel
 
from kallithea.model.api_key import ApiKeyModel
 
from kallithea.model.meta import Session
 

	
 
log = logging.getLogger(__name__)
 

	
 

	
 
class MyAccountController(BaseController):
 
    """REST Controller styled on the Atom Publishing Protocol"""
rhodecode/controllers/admin/notifications.py
Show inline comments
 
@@ -9,13 +9,13 @@
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
"""
 
rhodecode.controllers.admin.notifications
 
kallithea.controllers.admin.notifications
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 

	
 
notifications controller for RhodeCode
 

	
 
:created_on: Nov 23, 2010
 
:author: marcink
 
@@ -28,20 +28,20 @@ import traceback
 

	
 
from pylons import request
 
from pylons import tmpl_context as c, url
 
from pylons.controllers.util import redirect, abort
 
from webob.exc import HTTPBadRequest
 

	
 
from rhodecode.model.db import Notification
 
from rhodecode.model.notification import NotificationModel
 
from rhodecode.model.meta import Session
 
from rhodecode.lib.auth import LoginRequired, NotAnonymous
 
from rhodecode.lib.base import BaseController, render
 
from rhodecode.lib import helpers as h
 
from rhodecode.lib.helpers import Page
 
from rhodecode.lib.utils2 import safe_int
 
from kallithea.model.db import Notification
 
from kallithea.model.notification import NotificationModel
 
from kallithea.model.meta import Session
 
from kallithea.lib.auth import LoginRequired, NotAnonymous
 
from kallithea.lib.base import BaseController, render
 
from kallithea.lib import helpers as h
 
from kallithea.lib.helpers import Page
 
from kallithea.lib.utils2 import safe_int
 

	
 

	
 
log = logging.getLogger(__name__)
 

	
 

	
 
class NotificationsController(BaseController):
rhodecode/controllers/admin/permissions.py
Show inline comments
 
@@ -9,13 +9,13 @@
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
"""
 
rhodecode.controllers.admin.permissions
 
kallithea.controllers.admin.permissions
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 

	
 
permissions controller for Rhodecode
 

	
 
:created_on: Apr 27, 2010
 
:author: marcink
 
@@ -30,20 +30,20 @@ import formencode
 
from formencode import htmlfill
 

	
 
from pylons import request, session, tmpl_context as c, url
 
from pylons.controllers.util import abort, redirect
 
from pylons.i18n.translation import _
 

	
 
from rhodecode.lib import helpers as h
 
from rhodecode.lib.auth import LoginRequired, HasPermissionAllDecorator,\
 
from kallithea.lib import helpers as h
 
from kallithea.lib.auth import LoginRequired, HasPermissionAllDecorator,\
 
    AuthUser
 
from rhodecode.lib.base import BaseController, render
 
from rhodecode.model.forms import DefaultPermissionsForm
 
from rhodecode.model.permission import PermissionModel
 
from rhodecode.model.db import User, UserIpMap, Permission
 
from rhodecode.model.meta import Session
 
from kallithea.lib.base import BaseController, render
 
from kallithea.model.forms import DefaultPermissionsForm
 
from kallithea.model.permission import PermissionModel
 
from kallithea.model.db import User, UserIpMap, Permission
 
from kallithea.model.meta import Session
 

	
 
log = logging.getLogger(__name__)
 

	
 

	
 
class PermissionsController(BaseController):
 
    """REST Controller styled on the Atom Publishing Protocol"""
rhodecode/controllers/admin/repo_groups.py
Show inline comments
 
@@ -9,13 +9,13 @@
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
"""
 
rhodecode.controllers.admin.repo_groups
 
kallithea.controllers.admin.repo_groups
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 

	
 
Repository groups controller for RhodeCode
 

	
 
:created_on: Mar 23, 2010
 
:author: marcink
 
@@ -33,27 +33,27 @@ from formencode import htmlfill
 
from pylons import request, tmpl_context as c, url
 
from pylons.controllers.util import abort, redirect
 
from pylons.i18n.translation import _, ungettext
 

	
 
from sqlalchemy.exc import IntegrityError
 

	
 
import rhodecode
 
from rhodecode.lib import helpers as h
 
from rhodecode.lib.compat import json
 
from rhodecode.lib.auth import LoginRequired, HasPermissionAnyDecorator,\
 
import kallithea
 
from kallithea.lib import helpers as h
 
from kallithea.lib.compat import json
 
from kallithea.lib.auth import LoginRequired, HasPermissionAnyDecorator,\
 
    HasRepoGroupPermissionAnyDecorator, HasRepoGroupPermissionAll,\
 
    HasPermissionAll
 
from rhodecode.lib.base import BaseController, render
 
from rhodecode.model.db import RepoGroup, Repository
 
from rhodecode.model.scm import RepoGroupList
 
from rhodecode.model.repo_group import RepoGroupModel
 
from rhodecode.model.forms import RepoGroupForm, RepoGroupPermsForm
 
from rhodecode.model.meta import Session
 
from rhodecode.model.repo import RepoModel
 
from kallithea.lib.base import BaseController, render
 
from kallithea.model.db import RepoGroup, Repository
 
from kallithea.model.scm import RepoGroupList
 
from kallithea.model.repo_group import RepoGroupModel
 
from kallithea.model.forms import RepoGroupForm, RepoGroupPermsForm
 
from kallithea.model.meta import Session
 
from kallithea.model.repo import RepoModel
 
from webob.exc import HTTPInternalServerError, HTTPNotFound
 
from rhodecode.lib.utils2 import str2bool, safe_int
 
from kallithea.lib.utils2 import str2bool, safe_int
 
from sqlalchemy.sql.expression import func
 

	
 

	
 
log = logging.getLogger(__name__)
 

	
 

	
 
@@ -120,13 +120,13 @@ class RepoGroupsController(BaseControlle
 
        _list = RepoGroup.query()\
 
                    .order_by(func.lower(RepoGroup.group_name))\
 
                    .all()
 
        group_iter = RepoGroupList(_list, perm_set=['group.admin'])
 
        repo_groups_data = []
 
        total_records = len(group_iter)
 
        _tmpl_lookup = rhodecode.CONFIG['pylons.app_globals'].mako_lookup
 
        _tmpl_lookup = kallithea.CONFIG['pylons.app_globals'].mako_lookup
 
        template = _tmpl_lookup.get_template('data_table/_dt_elements.html')
 

	
 
        repo_group_name = lambda repo_group_name, children_groups: (
 
            template.get_def("repo_group_name")
 
            .render(repo_group_name, children_groups, _=_, h=h, c=c)
 
        )
rhodecode/controllers/admin/repos.py
Show inline comments
 
@@ -9,13 +9,13 @@
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
"""
 
rhodecode.controllers.admin.repos
 
kallithea.controllers.admin.repos
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 

	
 
Repositories controller for RhodeCode
 

	
 
:created_on: Apr 7, 2010
 
:author: marcink
 
@@ -30,29 +30,29 @@ from formencode import htmlfill
 
from webob.exc import HTTPInternalServerError, HTTPForbidden, HTTPNotFound
 
from pylons import request, tmpl_context as c, url
 
from pylons.controllers.util import redirect
 
from pylons.i18n.translation import _
 
from sqlalchemy.sql.expression import func
 

	
 
from rhodecode.lib import helpers as h
 
from rhodecode.lib.auth import LoginRequired, HasPermissionAllDecorator, \
 
from kallithea.lib import helpers as h
 
from kallithea.lib.auth import LoginRequired, HasPermissionAllDecorator, \
 
    HasRepoPermissionAllDecorator, NotAnonymous,HasPermissionAny, \
 
    HasRepoGroupPermissionAny, HasRepoPermissionAnyDecorator
 
from rhodecode.lib.base import BaseRepoController, render
 
from rhodecode.lib.utils import action_logger, repo_name_slug, jsonify
 
from rhodecode.lib.helpers import get_token
 
from rhodecode.lib.vcs import RepositoryError
 
from rhodecode.model.meta import Session
 
from rhodecode.model.db import User, Repository, UserFollowing, RepoGroup,\
 
from kallithea.lib.base import BaseRepoController, render
 
from kallithea.lib.utils import action_logger, repo_name_slug, jsonify
 
from kallithea.lib.helpers import get_token
 
from kallithea.lib.vcs import RepositoryError
 
from kallithea.model.meta import Session
 
from kallithea.model.db import User, Repository, UserFollowing, RepoGroup,\
 
    RhodeCodeSetting, RepositoryField
 
from rhodecode.model.forms import RepoForm, RepoFieldForm, RepoPermsForm
 
from rhodecode.model.scm import ScmModel, RepoGroupList, RepoList
 
from rhodecode.model.repo import RepoModel
 
from rhodecode.lib.compat import json
 
from rhodecode.lib.exceptions import AttachedForksError
 
from rhodecode.lib.utils2 import safe_int
 
from kallithea.model.forms import RepoForm, RepoFieldForm, RepoPermsForm
 
from kallithea.model.scm import ScmModel, RepoGroupList, RepoList
 
from kallithea.model.repo import RepoModel
 
from kallithea.lib.compat import json
 
from kallithea.lib.exceptions import AttachedForksError
 
from kallithea.lib.utils2 import safe_int
 

	
 
log = logging.getLogger(__name__)
 

	
 

	
 
class ReposController(BaseRepoController):
 
    """
 
@@ -218,13 +218,13 @@ class ReposController(BaseRepoController
 
    @jsonify
 
    def repo_check(self, repo_name):
 
        c.repo = repo_name
 
        task_id = request.GET.get('task_id')
 

	
 
        if task_id and task_id not in ['None']:
 
            from rhodecode import CELERY_ON
 
            from kallithea import CELERY_ON
 
            from celery.result import AsyncResult
 
            if CELERY_ON:
 
                task = AsyncResult(task_id)
 
                if task.failed():
 
                    raise HTTPInternalServerError(task.traceback)
 

	
rhodecode/controllers/admin/settings.py
Show inline comments
 
@@ -9,13 +9,13 @@
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
"""
 
rhodecode.controllers.admin.settings
 
kallithea.controllers.admin.settings
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 

	
 
settings controller for rhodecode admin
 

	
 
:created_on: Jul 14, 2010
 
:author: marcink
 
@@ -30,26 +30,26 @@ import formencode
 

	
 
from formencode import htmlfill
 
from pylons import request, tmpl_context as c, url, config
 
from pylons.controllers.util import redirect
 
from pylons.i18n.translation import _
 

	
 
from rhodecode.lib import helpers as h
 
from rhodecode.lib.auth import LoginRequired, HasPermissionAllDecorator
 
from rhodecode.lib.base import BaseController, render
 
from rhodecode.lib.celerylib import tasks, run_task
 
from rhodecode.lib.exceptions import HgsubversionImportError
 
from rhodecode.lib.utils import repo2db_mapper, set_rhodecode_config
 
from rhodecode.model.db import RhodeCodeUi, Repository, RhodeCodeSetting
 
from rhodecode.model.forms import ApplicationSettingsForm, \
 
from kallithea.lib import helpers as h
 
from kallithea.lib.auth import LoginRequired, HasPermissionAllDecorator
 
from kallithea.lib.base import BaseController, render
 
from kallithea.lib.celerylib import tasks, run_task
 
from kallithea.lib.exceptions import HgsubversionImportError
 
from kallithea.lib.utils import repo2db_mapper, set_rhodecode_config
 
from kallithea.model.db import RhodeCodeUi, Repository, RhodeCodeSetting
 
from kallithea.model.forms import ApplicationSettingsForm, \
 
    ApplicationUiSettingsForm, ApplicationVisualisationForm
 
from rhodecode.model.scm import ScmModel
 
from rhodecode.model.notification import EmailNotificationModel
 
from rhodecode.model.meta import Session
 
from rhodecode.lib.utils2 import str2bool, safe_unicode, safe_str
 
from rhodecode.lib.compat import json
 
from kallithea.model.scm import ScmModel
 
from kallithea.model.notification import EmailNotificationModel
 
from kallithea.model.meta import Session
 
from kallithea.lib.utils2 import str2bool, safe_unicode, safe_str
 
from kallithea.lib.compat import json
 
log = logging.getLogger(__name__)
 

	
 

	
 
class SettingsController(BaseController):
 
    """REST Controller styled on the Atom Publishing Protocol"""
 
    # To properly map this controller, ensure your config/routing.py
 
@@ -368,14 +368,14 @@ class SettingsController(BaseController)
 
            h.flash(_('Send email task created'), category='success')
 
            return redirect(url('admin_settings_email'))
 

	
 
        defaults = RhodeCodeSetting.get_app_settings()
 
        defaults.update(self._get_hg_ui_settings())
 

	
 
        import rhodecode
 
        c.rhodecode_ini = rhodecode.CONFIG
 
        import kallithea
 
        c.rhodecode_ini = kallithea.CONFIG
 

	
 
        return htmlfill.render(
 
            render('admin/settings/settings.html'),
 
            defaults=defaults,
 
            encoding="UTF-8",
 
            force_defaults=False)
 
@@ -457,14 +457,14 @@ class SettingsController(BaseController)
 
        # url('admin_settings_system')
 
        c.active = 'system'
 

	
 
        defaults = RhodeCodeSetting.get_app_settings()
 
        defaults.update(self._get_hg_ui_settings())
 

	
 
        import rhodecode
 
        c.rhodecode_ini = rhodecode.CONFIG
 
        import kallithea
 
        c.rhodecode_ini = kallithea.CONFIG
 
        c.rhodecode_update_url = defaults.get('rhodecode_update_url')
 
        server_info = RhodeCodeSetting.get_server_info()
 
        for key, val in server_info.iteritems():
 
            setattr(c, key, val)
 

	
 
        return htmlfill.render(
 
@@ -476,23 +476,23 @@ class SettingsController(BaseController)
 
    @HasPermissionAllDecorator('hg.admin')
 
    def settings_system_update(self):
 
        """GET /admin/settings/system/updates: All items in the collection"""
 
        # url('admin_settings_system_update')
 
        import json
 
        import urllib2
 
        from rhodecode.lib.verlib import NormalizedVersion
 
        from rhodecode import __version__
 
        from kallithea.lib.verlib import NormalizedVersion
 
        from kallithea import __version__
 

	
 
        defaults = RhodeCodeSetting.get_app_settings()
 
        defaults.update(self._get_hg_ui_settings())
 
        _update_url = defaults.get('rhodecode_update_url', '')
 

	
 
        _err = lambda s: '<div style="color:#ff8888; padding:4px 0px">%s</div>' % (s)
 
        try:
 
            import rhodecode
 
            ver = rhodecode.__version__
 
            import kallithea
 
            ver = kallithea.__version__
 
            log.debug('Checking for upgrade on `%s` server' % _update_url)
 
            opener = urllib2.build_opener()
 
            opener.addheaders = [('User-agent', 'RhodeCode-SCM/%s' % ver)]
 
            response = opener.open(_update_url)
 
            response_data = response.read()
 
            data = json.loads(response_data)
rhodecode/controllers/admin/user_groups.py
Show inline comments
 
@@ -9,13 +9,13 @@
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
"""
 
rhodecode.controllers.admin.users_groups
 
kallithea.controllers.admin.users_groups
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 

	
 
User Groups crud controller for pylons
 

	
 
:created_on: Jan 25, 2011
 
:author: marcink
 
@@ -33,30 +33,30 @@ from pylons.controllers.util import abor
 
from pylons.i18n.translation import _
 

	
 
from sqlalchemy.orm import joinedload
 
from sqlalchemy.sql.expression import func
 
from webob.exc import HTTPInternalServerError
 

	
 
import rhodecode
 
from rhodecode.lib import helpers as h
 
from rhodecode.lib.exceptions import UserGroupsAssignedException,\
 
import kallithea
 
from kallithea.lib import helpers as h
 
from kallithea.lib.exceptions import UserGroupsAssignedException,\
 
    RepoGroupAssignmentError
 
from rhodecode.lib.utils2 import safe_unicode, str2bool, safe_int
 
from rhodecode.lib.auth import LoginRequired, HasPermissionAllDecorator,\
 
from kallithea.lib.utils2 import safe_unicode, str2bool, safe_int
 
from kallithea.lib.auth import LoginRequired, HasPermissionAllDecorator,\
 
    HasUserGroupPermissionAnyDecorator, HasPermissionAnyDecorator
 
from rhodecode.lib.base import BaseController, render
 
from rhodecode.model.scm import UserGroupList
 
from rhodecode.model.user_group import UserGroupModel
 
from rhodecode.model.repo import RepoModel
 
from rhodecode.model.db import User, UserGroup, UserGroupToPerm,\
 
from kallithea.lib.base import BaseController, render
 
from kallithea.model.scm import UserGroupList
 
from kallithea.model.user_group import UserGroupModel
 
from kallithea.model.repo import RepoModel
 
from kallithea.model.db import User, UserGroup, UserGroupToPerm,\
 
    UserGroupRepoToPerm, UserGroupRepoGroupToPerm
 
from rhodecode.model.forms import UserGroupForm, UserGroupPermsForm,\
 
from kallithea.model.forms import UserGroupForm, UserGroupPermsForm,\
 
    CustomDefaultPermissionsForm
 
from rhodecode.model.meta import Session
 
from rhodecode.lib.utils import action_logger
 
from rhodecode.lib.compat import json
 
from kallithea.model.meta import Session
 
from kallithea.lib.utils import action_logger
 
from kallithea.lib.compat import json
 

	
 
log = logging.getLogger(__name__)
 

	
 

	
 
class UserGroupsController(BaseController):
 
    """REST Controller styled on the Atom Publishing Protocol"""
 
@@ -91,13 +91,13 @@ class UserGroupsController(BaseControlle
 
        _list = UserGroup.query()\
 
                        .order_by(func.lower(UserGroup.users_group_name))\
 
                        .all()
 
        group_iter = UserGroupList(_list, perm_set=['usergroup.admin'])
 
        user_groups_data = []
 
        total_records = len(group_iter)
 
        _tmpl_lookup = rhodecode.CONFIG['pylons.app_globals'].mako_lookup
 
        _tmpl_lookup = kallithea.CONFIG['pylons.app_globals'].mako_lookup
 
        template = _tmpl_lookup.get_template('data_table/_dt_elements.html')
 

	
 
        user_group_name = lambda user_group_id, user_group_name: (
 
            template.get_def("user_group_name")
 
            .render(user_group_id, user_group_name, _=_, h=h, c=c)
 
        )
rhodecode/controllers/admin/users.py
Show inline comments
 
@@ -9,13 +9,13 @@
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
"""
 
rhodecode.controllers.admin.users
 
kallithea.controllers.admin.users
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 

	
 
Users crud controller for pylons
 

	
 
:created_on: Apr 4, 2010
 
:author: marcink
 
@@ -31,30 +31,30 @@ from pylons import response
 
from formencode import htmlfill
 
from pylons import request, session, tmpl_context as c, url, config
 
from pylons.controllers.util import redirect
 
from pylons.i18n.translation import _
 
from sqlalchemy.sql.expression import func
 

	
 
import rhodecode
 
from rhodecode.lib.exceptions import DefaultUserException, \
 
import kallithea
 
from kallithea.lib.exceptions import DefaultUserException, \
 
    UserOwnsReposException, UserCreationError
 
from rhodecode.lib import helpers as h
 
from rhodecode.lib.auth import LoginRequired, HasPermissionAllDecorator, \
 
from kallithea.lib import helpers as h
 
from kallithea.lib.auth import LoginRequired, HasPermissionAllDecorator, \
 
    AuthUser, generate_api_key
 
import rhodecode.lib.auth_modules.auth_rhodecode
 
from rhodecode.lib import auth_modules
 
from rhodecode.lib.base import BaseController, render
 
from rhodecode.model.api_key import ApiKeyModel
 
import kallithea.lib.auth_modules.auth_rhodecode
 
from kallithea.lib import auth_modules
 
from kallithea.lib.base import BaseController, render
 
from kallithea.model.api_key import ApiKeyModel
 

	
 
from rhodecode.model.db import User, UserEmailMap, UserIpMap, UserToPerm
 
from rhodecode.model.forms import UserForm, CustomDefaultPermissionsForm
 
from rhodecode.model.user import UserModel
 
from rhodecode.model.meta import Session
 
from rhodecode.lib.utils import action_logger
 
from rhodecode.lib.compat import json
 
from rhodecode.lib.utils2 import datetime_to_time, str2bool, safe_int
 
from kallithea.model.db import User, UserEmailMap, UserIpMap, UserToPerm
 
from kallithea.model.forms import UserForm, CustomDefaultPermissionsForm
 
from kallithea.model.user import UserModel
 
from kallithea.model.meta import Session
 
from kallithea.lib.utils import action_logger
 
from kallithea.lib.compat import json
 
from kallithea.lib.utils2 import datetime_to_time, str2bool, safe_int
 

	
 
log = logging.getLogger(__name__)
 

	
 

	
 
class UsersController(BaseController):
 
    """REST Controller styled on the Atom Publishing Protocol"""
 
@@ -73,13 +73,13 @@ class UsersController(BaseController):
 
                        .filter(User.username != User.DEFAULT_USER)\
 
                        .order_by(func.lower(User.username))\
 
                        .all()
 

	
 
        users_data = []
 
        total_records = len(c.users_list)
 
        _tmpl_lookup = rhodecode.CONFIG['pylons.app_globals'].mako_lookup
 
        _tmpl_lookup = kallithea.CONFIG['pylons.app_globals'].mako_lookup
 
        template = _tmpl_lookup.get_template('data_table/_dt_elements.html')
 

	
 
        grav_tmpl = lambda user_email, size: (
 
                template.get_def("user_gravatar")
 
                .render(user_email, size, _=_, h=h, c=c))
 

	
rhodecode/controllers/api/__init__.py
Show inline comments
 
@@ -9,13 +9,13 @@
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
"""
 
rhodecode.controllers.api
 
kallithea.controllers.api
 
~~~~~~~~~~~~~~~~~~~~~~~~~
 

	
 
JSON RPC controller
 

	
 
:created_on: Aug 20, 2011
 
:author: marcink
 
@@ -32,18 +32,18 @@ import time
 

	
 
from paste.response import replace_header
 
from pylons.controllers import WSGIController
 

	
 
from webob.exc import HTTPError
 

	
 
from rhodecode.model.db import User
 
from rhodecode.model import meta
 
from rhodecode.lib.compat import izip_longest, json
 
from rhodecode.lib.auth import AuthUser
 
from rhodecode.lib.base import _get_ip_addr as _get_ip, _get_access_path
 
from rhodecode.lib.utils2 import safe_unicode, safe_str
 
from kallithea.model.db import User
 
from kallithea.model import meta
 
from kallithea.lib.compat import izip_longest, json
 
from kallithea.lib.auth import AuthUser
 
from kallithea.lib.base import _get_ip_addr as _get_ip, _get_access_path
 
from kallithea.lib.utils2 import safe_unicode, safe_str
 

	
 
log = logging.getLogger('JSONRPC')
 

	
 

	
 
class JSONRPCError(BaseException):
 

	
rhodecode/controllers/api/api.py
Show inline comments
 
@@ -9,13 +9,13 @@
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
"""
 
rhodecode.controllers.api
 
kallithea.controllers.api
 
~~~~~~~~~~~~~~~~~~~~~~~~~
 

	
 
API controller for RhodeCode
 

	
 
:created_on: Aug 20, 2011
 
:author: marcink
 
@@ -26,32 +26,32 @@ API controller for RhodeCode
 

	
 
import time
 
import traceback
 
import logging
 
from sqlalchemy import or_
 

	
 
from rhodecode.controllers.api import JSONRPCController, JSONRPCError
 
from rhodecode.lib.auth import (
 
from kallithea.controllers.api import JSONRPCController, JSONRPCError
 
from kallithea.lib.auth import (
 
    PasswordGenerator, AuthUser, HasPermissionAllDecorator,
 
    HasPermissionAnyDecorator, HasPermissionAnyApi, HasRepoPermissionAnyApi,
 
    HasRepoGroupPermissionAnyApi, HasUserGroupPermissionAny)
 
from rhodecode.lib.utils import map_groups, repo2db_mapper
 
from rhodecode.lib.utils2 import (
 
from kallithea.lib.utils import map_groups, repo2db_mapper
 
from kallithea.lib.utils2 import (
 
    str2bool, time_to_datetime, safe_int, Optional, OAttr)
 
from rhodecode.model.meta import Session
 
from rhodecode.model.repo_group import RepoGroupModel
 
from rhodecode.model.scm import ScmModel, UserGroupList
 
from rhodecode.model.repo import RepoModel
 
from rhodecode.model.user import UserModel
 
from rhodecode.model.user_group import UserGroupModel
 
from rhodecode.model.gist import GistModel
 
from rhodecode.model.db import (
 
from kallithea.model.meta import Session
 
from kallithea.model.repo_group import RepoGroupModel
 
from kallithea.model.scm import ScmModel, UserGroupList
 
from kallithea.model.repo import RepoModel
 
from kallithea.model.user import UserModel
 
from kallithea.model.user_group import UserGroupModel
 
from kallithea.model.gist import GistModel
 
from kallithea.model.db import (
 
    Repository, RhodeCodeSetting, UserIpMap, Permission, User, Gist,
 
    RepoGroup)
 
from rhodecode.lib.compat import json
 
from rhodecode.lib.exceptions import (
 
from kallithea.lib.compat import json
 
from kallithea.lib.exceptions import (
 
    DefaultUserException, UserGroupsAssignedException)
 

	
 
log = logging.getLogger(__name__)
 

	
 

	
 
def store_update(updates, attr, name):
rhodecode/controllers/bookmarks.py
Show inline comments
 
@@ -9,13 +9,13 @@
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
"""
 
rhodecode.controllers.bookmarks
 
kallithea.controllers.bookmarks
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 

	
 
Bookmarks controller for rhodecode
 

	
 
:created_on: Dec 1, 2011
 
:author: marcink
 
@@ -24,15 +24,15 @@ Bookmarks controller for rhodecode
 
"""
 

	
 
import logging
 

	
 
from pylons import tmpl_context as c
 

	
 
from rhodecode.lib.auth import LoginRequired, HasRepoPermissionAnyDecorator
 
from rhodecode.lib.base import BaseRepoController, render
 
from rhodecode.lib.compat import OrderedDict
 
from kallithea.lib.auth import LoginRequired, HasRepoPermissionAnyDecorator
 
from kallithea.lib.base import BaseRepoController, render
 
from kallithea.lib.compat import OrderedDict
 
from webob.exc import HTTPNotFound
 

	
 
log = logging.getLogger(__name__)
 

	
 

	
 
class BookmarksController(BaseRepoController):
rhodecode/controllers/branches.py
Show inline comments
 
@@ -9,13 +9,13 @@
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
"""
 
rhodecode.controllers.branches
 
kallithea.controllers.branches
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 

	
 
branches controller for rhodecode
 

	
 
:created_on: Apr 21, 2010
 
:author: marcink
 
@@ -25,16 +25,16 @@ branches controller for rhodecode
 

	
 
import logging
 
import binascii
 

	
 
from pylons import tmpl_context as c
 

	
 
from rhodecode.lib.auth import LoginRequired, HasRepoPermissionAnyDecorator
 
from rhodecode.lib.base import BaseRepoController, render
 
from rhodecode.lib.compat import OrderedDict
 
from rhodecode.lib.utils2 import safe_unicode
 
from kallithea.lib.auth import LoginRequired, HasRepoPermissionAnyDecorator
 
from kallithea.lib.base import BaseRepoController, render
 
from kallithea.lib.compat import OrderedDict
 
from kallithea.lib.utils2 import safe_unicode
 

	
 
log = logging.getLogger(__name__)
 

	
 

	
 
class BranchesController(BaseRepoController):
 

	
rhodecode/controllers/changelog.py
Show inline comments
 
@@ -9,13 +9,13 @@
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
"""
 
rhodecode.controllers.changelog
 
kallithea.controllers.changelog
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 

	
 
changelog controller for rhodecode
 

	
 
:created_on: Apr 21, 2010
 
:author: marcink
 
@@ -28,21 +28,21 @@ import traceback
 

	
 
from pylons import request, url, session, tmpl_context as c
 
from pylons.controllers.util import redirect
 
from pylons.i18n.translation import _
 
from webob.exc import HTTPNotFound, HTTPBadRequest
 

	
 
import rhodecode.lib.helpers as h
 
from rhodecode.lib.auth import LoginRequired, HasRepoPermissionAnyDecorator
 
from rhodecode.lib.base import BaseRepoController, render
 
from rhodecode.lib.helpers import RepoPage
 
from rhodecode.lib.compat import json
 
from rhodecode.lib.graphmod import _colored, _dagwalker
 
from rhodecode.lib.vcs.exceptions import RepositoryError, ChangesetDoesNotExistError,\
 
import kallithea.lib.helpers as h
 
from kallithea.lib.auth import LoginRequired, HasRepoPermissionAnyDecorator
 
from kallithea.lib.base import BaseRepoController, render
 
from kallithea.lib.helpers import RepoPage
 
from kallithea.lib.compat import json
 
from kallithea.lib.graphmod import _colored, _dagwalker
 
from kallithea.lib.vcs.exceptions import RepositoryError, ChangesetDoesNotExistError,\
 
    ChangesetError, NodeDoesNotExistError, EmptyRepositoryError
 
from rhodecode.lib.utils2 import safe_int, safe_str
 
from kallithea.lib.utils2 import safe_int, safe_str
 

	
 

	
 
log = logging.getLogger(__name__)
 

	
 

	
 
def _load_changelog_summary():
rhodecode/controllers/changeset.py
Show inline comments
 
@@ -9,13 +9,13 @@
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
"""
 
rhodecode.controllers.changeset
 
kallithea.controllers.changeset
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 

	
 
changeset controller for pylons showoing changes beetween
 
revisions
 

	
 
:created_on: Apr 25, 2010
 
@@ -29,33 +29,33 @@ import traceback
 
from collections import defaultdict
 
from webob.exc import HTTPForbidden, HTTPBadRequest, HTTPNotFound
 

	
 
from pylons import tmpl_context as c, url, request, response
 
from pylons.i18n.translation import _
 
from pylons.controllers.util import redirect
 
from rhodecode.lib.utils import jsonify
 
from kallithea.lib.utils import jsonify
 

	
 
from rhodecode.lib.vcs.exceptions import RepositoryError, \
 
from kallithea.lib.vcs.exceptions import RepositoryError, \
 
    ChangesetDoesNotExistError
 

	
 
import rhodecode.lib.helpers as h
 
from rhodecode.lib.auth import LoginRequired, HasRepoPermissionAnyDecorator,\
 
import kallithea.lib.helpers as h
 
from kallithea.lib.auth import LoginRequired, HasRepoPermissionAnyDecorator,\
 
    NotAnonymous
 
from rhodecode.lib.base import BaseRepoController, render
 
from rhodecode.lib.utils import action_logger
 
from rhodecode.lib.compat import OrderedDict
 
from rhodecode.lib import diffs
 
from rhodecode.model.db import ChangesetComment, ChangesetStatus
 
from rhodecode.model.comment import ChangesetCommentsModel
 
from rhodecode.model.changeset_status import ChangesetStatusModel
 
from rhodecode.model.meta import Session
 
from rhodecode.model.repo import RepoModel
 
from rhodecode.lib.diffs import LimitedDiffContainer
 
from rhodecode.lib.exceptions import StatusChangeOnClosedPullRequestError
 
from rhodecode.lib.vcs.backends.base import EmptyChangeset
 
from rhodecode.lib.utils2 import safe_unicode, safe_str
 
from kallithea.lib.base import BaseRepoController, render
 
from kallithea.lib.utils import action_logger
 
from kallithea.lib.compat import OrderedDict
 
from kallithea.lib import diffs
 
from kallithea.model.db import ChangesetComment, ChangesetStatus
 
from kallithea.model.comment import ChangesetCommentsModel
 
from kallithea.model.changeset_status import ChangesetStatusModel
 
from kallithea.model.meta import Session
 
from kallithea.model.repo import RepoModel
 
from kallithea.lib.diffs import LimitedDiffContainer
 
from kallithea.lib.exceptions import StatusChangeOnClosedPullRequestError
 
from kallithea.lib.vcs.backends.base import EmptyChangeset
 
from kallithea.lib.utils2 import safe_unicode, safe_str
 

	
 
log = logging.getLogger(__name__)
 

	
 

	
 
def _update_with_GET(params, GET):
 
    for k in ['diff1', 'diff2', 'diff']:
rhodecode/controllers/compare.py
Show inline comments
 
@@ -9,13 +9,13 @@
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
"""
 
rhodecode.controllers.compare
 
kallithea.controllers.compare
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 

	
 
compare controller for pylons showing differences between two
 
repos, branches, bookmarks or tips
 

	
 
:created_on: May 6, 2012
 
@@ -31,21 +31,21 @@ import re
 

	
 
from webob.exc import HTTPNotFound, HTTPBadRequest
 
from pylons import request, response, session, tmpl_context as c, url
 
from pylons.controllers.util import abort, redirect
 
from pylons.i18n.translation import _
 

	
 
from rhodecode.lib.vcs.exceptions import EmptyRepositoryError, RepositoryError
 
from rhodecode.lib.vcs.utils import safe_str
 
from rhodecode.lib.vcs.utils.hgcompat import unionrepo
 
from rhodecode.lib import helpers as h
 
from rhodecode.lib.base import BaseRepoController, render
 
from rhodecode.lib.auth import LoginRequired, HasRepoPermissionAnyDecorator
 
from rhodecode.lib import diffs
 
from rhodecode.model.db import Repository
 
from rhodecode.lib.diffs import LimitedDiffContainer
 
from kallithea.lib.vcs.exceptions import EmptyRepositoryError, RepositoryError
 
from kallithea.lib.vcs.utils import safe_str
 
from kallithea.lib.vcs.utils.hgcompat import unionrepo
 
from kallithea.lib import helpers as h
 
from kallithea.lib.base import BaseRepoController, render
 
from kallithea.lib.auth import LoginRequired, HasRepoPermissionAnyDecorator
 
from kallithea.lib import diffs
 
from kallithea.model.db import Repository
 
from kallithea.lib.diffs import LimitedDiffContainer
 

	
 

	
 
log = logging.getLogger(__name__)
 

	
 

	
 
class CompareController(BaseRepoController):
rhodecode/controllers/error.py
Show inline comments
 
@@ -9,13 +9,13 @@
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
"""
 
rhodecode.controllers.error
 
kallithea.controllers.error
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~
 

	
 
RhodeCode error controller
 

	
 
:created_on: Dec 8, 2010
 
:author: marcink
 
@@ -29,13 +29,13 @@ import logging
 
import paste.fileapp
 

	
 
from pylons import tmpl_context as c, request, config, url
 
from pylons.i18n.translation import _
 
from pylons.middleware import  media_path
 

	
 
from rhodecode.lib.base import BaseController, render
 
from kallithea.lib.base import BaseController, render
 

	
 
log = logging.getLogger(__name__)
 

	
 

	
 
class ErrorController(BaseController):
 
    """Generates error documents as and when they are required.
rhodecode/controllers/feed.py
Show inline comments
 
@@ -9,13 +9,13 @@
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
"""
 
rhodecode.controllers.feed
 
kallithea.controllers.feed
 
~~~~~~~~~~~~~~~~~~~~~~~~~~
 

	
 
Feed controller for rhodecode
 

	
 
:created_on: Apr 23, 2010
 
:author: marcink
 
@@ -29,18 +29,18 @@ import logging
 
from pylons import url, response, tmpl_context as c
 
from pylons.i18n.translation import _
 

	
 
from beaker.cache import cache_region, region_invalidate
 
from webhelpers.feedgenerator import Atom1Feed, Rss201rev2Feed
 

	
 
from rhodecode.lib import helpers as h
 
from rhodecode.lib.auth import LoginRequired, HasRepoPermissionAnyDecorator
 
from rhodecode.lib.base import BaseRepoController
 
from rhodecode.lib.diffs import DiffProcessor, LimitedDiffContainer
 
from rhodecode.model.db import CacheInvalidation
 
from rhodecode.lib.utils2 import safe_int, str2bool, safe_unicode
 
from kallithea.lib import helpers as h
 
from kallithea.lib.auth import LoginRequired, HasRepoPermissionAnyDecorator
 
from kallithea.lib.base import BaseRepoController
 
from kallithea.lib.diffs import DiffProcessor, LimitedDiffContainer
 
from kallithea.model.db import CacheInvalidation
 
from kallithea.lib.utils2 import safe_int, str2bool, safe_unicode
 

	
 
log = logging.getLogger(__name__)
 

	
 

	
 
class FeedController(BaseRepoController):
 

	
 
@@ -51,14 +51,14 @@ class FeedController(BaseRepoController)
 
        super(FeedController, self).__before__()
 
        #common values for feeds
 
        self.description = _('Changes on %s repository')
 
        self.title = self.title = _('%s %s feed') % (c.rhodecode_name, '%s')
 
        self.language = 'en-us'
 
        self.ttl = "5"
 
        import rhodecode
 
        CONF = rhodecode.CONFIG
 
        import kallithea
 
        CONF = kallithea.CONFIG
 
        self.include_diff = str2bool(CONF.get('rss_include_diff', False))
 
        self.feed_nr = safe_int(CONF.get('rss_items_per_page', 20))
 
        # we need to protect from parsing huge diffs here other way
 
        # we can kill the server
 
        self.feed_diff_limit = safe_int(CONF.get('rss_cut_off_limit', 32 * 1024))
 

	
rhodecode/controllers/files.py
Show inline comments
 
@@ -9,13 +9,13 @@
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
"""
 
rhodecode.controllers.files
 
kallithea.controllers.files
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~
 

	
 
Files controller for RhodeCode
 

	
 
:created_on: Apr 21, 2010
 
:author: marcink
 
@@ -30,38 +30,38 @@ import traceback
 
import tempfile
 
import shutil
 

	
 
from pylons import request, response, tmpl_context as c, url
 
from pylons.i18n.translation import _
 
from pylons.controllers.util import redirect
 
from rhodecode.lib.utils import jsonify, action_logger
 
from kallithea.lib.utils import jsonify, action_logger
 

	
 
from rhodecode.lib import diffs
 
from rhodecode.lib import helpers as h
 
from kallithea.lib import diffs
 
from kallithea.lib import helpers as h
 

	
 
from rhodecode.lib.compat import OrderedDict
 
from rhodecode.lib.utils2 import convert_line_endings, detect_mode, safe_str,\
 
from kallithea.lib.compat import OrderedDict
 
from kallithea.lib.utils2 import convert_line_endings, detect_mode, safe_str,\
 
    str2bool
 
from rhodecode.lib.auth import LoginRequired, HasRepoPermissionAnyDecorator
 
from rhodecode.lib.base import BaseRepoController, render
 
from rhodecode.lib.vcs.backends.base import EmptyChangeset
 
from rhodecode.lib.vcs.conf import settings
 
from rhodecode.lib.vcs.exceptions import RepositoryError, \
 
from kallithea.lib.auth import LoginRequired, HasRepoPermissionAnyDecorator
 
from kallithea.lib.base import BaseRepoController, render
 
from kallithea.lib.vcs.backends.base import EmptyChangeset
 
from kallithea.lib.vcs.conf import settings
 
from kallithea.lib.vcs.exceptions import RepositoryError, \
 
    ChangesetDoesNotExistError, EmptyRepositoryError, \
 
    ImproperArchiveTypeError, VCSError, NodeAlreadyExistsError,\
 
    NodeDoesNotExistError, ChangesetError, NodeError
 
from rhodecode.lib.vcs.nodes import FileNode
 
from kallithea.lib.vcs.nodes import FileNode
 

	
 
from rhodecode.model.repo import RepoModel
 
from rhodecode.model.scm import ScmModel
 
from rhodecode.model.db import Repository
 
from kallithea.model.repo import RepoModel
 
from kallithea.model.scm import ScmModel
 
from kallithea.model.db import Repository
 

	
 
from rhodecode.controllers.changeset import anchor_url, _ignorews_url,\
 
from kallithea.controllers.changeset import anchor_url, _ignorews_url,\
 
    _context_url, get_line_ctx, get_ignore_ws
 
from webob.exc import HTTPNotFound
 
from rhodecode.lib.exceptions import NonRelativePathError, IMCCommitError
 
from kallithea.lib.exceptions import NonRelativePathError, IMCCommitError
 

	
 

	
 
log = logging.getLogger(__name__)
 

	
 

	
 
class FilesController(BaseRepoController):
 
@@ -533,13 +533,13 @@ class FilesController(BaseRepoController
 
            return _('Unknown revision %s') % revision
 
        except EmptyRepositoryError:
 
            return _('Empty repository')
 
        except (ImproperArchiveTypeError, KeyError):
 
            return _('Unknown archive type')
 
        # archive cache
 
        from rhodecode import CONFIG
 
        from kallithea import CONFIG
 
        rev_name = cs.raw_id[:12]
 
        archive_name = '%s-%s%s' % (safe_str(repo_name.replace('/', '_')),
 
                                    safe_str(rev_name), ext)
 

	
 
        use_cached_archive = False  # defines if we use cached version of archive
 
        archive_cache_enabled = CONFIG.get('archive_cache_dir')
rhodecode/controllers/followers.py
Show inline comments
 
@@ -9,13 +9,13 @@
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
"""
 
rhodecode.controllers.followers
 
kallithea.controllers.followers
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 

	
 
Followers controller for rhodecode
 

	
 
:created_on: Apr 23, 2011
 
:author: marcink
 
@@ -24,17 +24,17 @@ Followers controller for rhodecode
 
"""
 

	
 
import logging
 

	
 
from pylons import tmpl_context as c, request
 

	
 
from rhodecode.lib.helpers import Page
 
from rhodecode.lib.auth import LoginRequired, HasRepoPermissionAnyDecorator
 
from rhodecode.lib.base import BaseRepoController, render
 
from rhodecode.model.db import Repository, User, UserFollowing
 
from rhodecode.lib.utils2 import safe_int
 
from kallithea.lib.helpers import Page
 
from kallithea.lib.auth import LoginRequired, HasRepoPermissionAnyDecorator
 
from kallithea.lib.base import BaseRepoController, render
 
from kallithea.model.db import Repository, User, UserFollowing
 
from kallithea.lib.utils2 import safe_int
 

	
 
log = logging.getLogger(__name__)
 

	
 

	
 
class FollowersController(BaseRepoController):
 

	
rhodecode/controllers/forks.py
Show inline comments
 
@@ -9,13 +9,13 @@
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
"""
 
rhodecode.controllers.forks
 
kallithea.controllers.forks
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~
 

	
 
forks controller for rhodecode
 

	
 
:created_on: Apr 23, 2011
 
:author: marcink
 
@@ -30,25 +30,25 @@ from formencode import htmlfill
 

	
 
from pylons import tmpl_context as c, request, url
 
from pylons.controllers.util import redirect
 
from pylons.i18n.translation import _
 
from webob.exc import HTTPNotFound, HTTPInternalServerError
 

	
 
import rhodecode.lib.helpers as h
 
import kallithea.lib.helpers as h
 

	
 
from rhodecode.lib.helpers import Page
 
from rhodecode.lib.auth import LoginRequired, HasRepoPermissionAnyDecorator, \
 
from kallithea.lib.helpers import Page
 
from kallithea.lib.auth import LoginRequired, HasRepoPermissionAnyDecorator, \
 
    NotAnonymous, HasRepoPermissionAny, HasPermissionAnyDecorator
 
from rhodecode.lib.base import BaseRepoController, render
 
from rhodecode.model.db import Repository, RepoGroup, UserFollowing, User,\
 
from kallithea.lib.base import BaseRepoController, render
 
from kallithea.model.db import Repository, RepoGroup, UserFollowing, User,\
 
    RhodeCodeUi
 
from rhodecode.model.repo import RepoModel
 
from rhodecode.model.forms import RepoForkForm
 
from rhodecode.model.scm import ScmModel, RepoGroupList
 
from rhodecode.lib.utils2 import safe_int
 
from rhodecode.lib.utils import jsonify
 
from kallithea.model.repo import RepoModel
 
from kallithea.model.forms import RepoForkForm
 
from kallithea.model.scm import ScmModel, RepoGroupList
 
from kallithea.lib.utils2 import safe_int
 
from kallithea.lib.utils import jsonify
 

	
 
log = logging.getLogger(__name__)
 

	
 

	
 
class ForksController(BaseRepoController):
 

	
rhodecode/controllers/home.py
Show inline comments
 
@@ -9,13 +9,13 @@
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
"""
 
rhodecode.controllers.home
 
kallithea.controllers.home
 
~~~~~~~~~~~~~~~~~~~~~~~~~~
 

	
 
Home controller for Rhodecode
 

	
 
:created_on: Feb 18, 2010
 
:author: marcink
 
@@ -28,20 +28,20 @@ import logging
 

	
 
from pylons import tmpl_context as c, request
 
from pylons.i18n.translation import _
 
from webob.exc import HTTPBadRequest
 
from sqlalchemy.sql.expression import func
 

	
 
import rhodecode
 
from rhodecode.lib import helpers as h
 
from rhodecode.lib.utils import jsonify, conditional_cache
 
from rhodecode.lib.compat import json
 
from rhodecode.lib.auth import LoginRequired, HasRepoPermissionAnyDecorator
 
from rhodecode.lib.base import BaseController, render
 
from rhodecode.model.db import Repository, RepoGroup
 
from rhodecode.model.repo import RepoModel
 
import kallithea
 
from kallithea.lib import helpers as h
 
from kallithea.lib.utils import jsonify, conditional_cache
 
from kallithea.lib.compat import json
 
from kallithea.lib.auth import LoginRequired, HasRepoPermissionAnyDecorator
 
from kallithea.lib.base import BaseController, render
 
from kallithea.model.db import Repository, RepoGroup
 
from kallithea.model.repo import RepoModel
 

	
 

	
 
log = logging.getLogger(__name__)
 

	
 

	
 
class HomeController(BaseController):
rhodecode/controllers/journal.py
Show inline comments
 
@@ -9,13 +9,13 @@
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
"""
 
rhodecode.controllers.journal
 
kallithea.controllers.journal
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 

	
 
Journal controller for pylons
 

	
 
:created_on: Nov 21, 2010
 
:author: marcink
 
@@ -34,22 +34,22 @@ from sqlalchemy.sql.expression import fu
 
from webhelpers.feedgenerator import Atom1Feed, Rss201rev2Feed
 

	
 
from webob.exc import HTTPBadRequest
 
from pylons import request, tmpl_context as c, response, url
 
from pylons.i18n.translation import _
 

	
 
from rhodecode.controllers.admin.admin import _journal_filter
 
from rhodecode.model.db import UserLog, UserFollowing, Repository, User
 
from rhodecode.model.meta import Session
 
from rhodecode.model.repo import RepoModel
 
import rhodecode.lib.helpers as h
 
from rhodecode.lib.helpers import Page
 
from rhodecode.lib.auth import LoginRequired, NotAnonymous
 
from rhodecode.lib.base import BaseController, render
 
from rhodecode.lib.utils2 import safe_int, AttributeDict
 
from rhodecode.lib.compat import json
 
from kallithea.controllers.admin.admin import _journal_filter
 
from kallithea.model.db import UserLog, UserFollowing, Repository, User
 
from kallithea.model.meta import Session
 
from kallithea.model.repo import RepoModel
 
import kallithea.lib.helpers as h
 
from kallithea.lib.helpers import Page
 
from kallithea.lib.auth import LoginRequired, NotAnonymous
 
from kallithea.lib.base import BaseController, render
 
from kallithea.lib.utils2 import safe_int, AttributeDict
 
from kallithea.lib.compat import json
 

	
 
log = logging.getLogger(__name__)
 

	
 

	
 
class JournalController(BaseController):
 

	
rhodecode/controllers/login.py
Show inline comments
 
@@ -9,13 +9,13 @@
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
"""
 
rhodecode.controllers.login
 
kallithea.controllers.login
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~
 

	
 
Login controller for rhodeocode
 

	
 
:created_on: Apr 22, 2010
 
:author: marcink
 
@@ -32,21 +32,21 @@ import urlparse
 
from formencode import htmlfill
 
from webob.exc import HTTPFound
 
from pylons.i18n.translation import _
 
from pylons.controllers.util import redirect
 
from pylons import request, session, tmpl_context as c, url
 

	
 
import rhodecode.lib.helpers as h
 
from rhodecode.lib.auth import AuthUser, HasPermissionAnyDecorator
 
from rhodecode.lib.auth_modules import importplugin
 
from rhodecode.lib.base import BaseController, render
 
from rhodecode.lib.exceptions import UserCreationError
 
from rhodecode.model.db import User, RhodeCodeSetting
 
from rhodecode.model.forms import LoginForm, RegisterForm, PasswordResetForm
 
from rhodecode.model.user import UserModel
 
from rhodecode.model.meta import Session
 
import kallithea.lib.helpers as h
 
from kallithea.lib.auth import AuthUser, HasPermissionAnyDecorator
 
from kallithea.lib.auth_modules import importplugin
 
from kallithea.lib.base import BaseController, render
 
from kallithea.lib.exceptions import UserCreationError
 
from kallithea.model.db import User, RhodeCodeSetting
 
from kallithea.model.forms import LoginForm, RegisterForm, PasswordResetForm
 
from kallithea.model.user import UserModel
 
from kallithea.model.meta import Session
 

	
 

	
 
log = logging.getLogger(__name__)
 

	
 

	
 
class LoginController(BaseController):
 
@@ -140,13 +140,13 @@ class LoginController(BaseController):
 
                # Exception itself
 
                h.flash(e, 'error')
 

	
 
        # check if we use container plugin, and try to login using it.
 
        auth_plugins = RhodeCodeSetting.get_auth_plugins()
 
        if any((importplugin(name).is_container_auth for name in auth_plugins)):
 
            from rhodecode.lib import auth_modules
 
            from kallithea.lib import auth_modules
 
            try:
 
                auth_info = auth_modules.authenticate('', '', request.environ)
 
            except UserCreationError, e:
 
                log.error(e)
 
                h.flash(e, 'error')
 
                # render login, with flash message about limit
 
@@ -172,13 +172,13 @@ class LoginController(BaseController):
 
            register_form = RegisterForm()()
 
            try:
 
                form_result = register_form.to_python(dict(request.POST))
 
                form_result['active'] = c.auto_active
 

	
 
                if c.captcha_active:
 
                    from rhodecode.lib.recaptcha import submit
 
                    from kallithea.lib.recaptcha import submit
 
                    response = submit(request.POST.get('recaptcha_challenge_field'),
 
                                      request.POST.get('recaptcha_response_field'),
 
                                      private_key=captcha_private_key,
 
                                      remoteip=self.ip_addr)
 
                    if c.captcha_active and not response.is_valid:
 
                        _value = form_result
 
@@ -217,13 +217,13 @@ class LoginController(BaseController):
 

	
 
        if request.POST:
 
            password_reset_form = PasswordResetForm()()
 
            try:
 
                form_result = password_reset_form.to_python(dict(request.POST))
 
                if c.captcha_active:
 
                    from rhodecode.lib.recaptcha import submit
 
                    from kallithea.lib.recaptcha import submit
 
                    response = submit(request.POST.get('recaptcha_challenge_field'),
 
                                      request.POST.get('recaptcha_response_field'),
 
                                      private_key=captcha_private_key,
 
                                      remoteip=self.ip_addr)
 
                    if c.captcha_active and not response.is_valid:
 
                        _value = form_result
rhodecode/controllers/pullrequests.py
Show inline comments
 
@@ -9,13 +9,13 @@
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
"""
 
rhodecode.controllers.pullrequests
 
kallithea.controllers.pullrequests
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 

	
 
pull requests controller for rhodecode for initializing pull requests
 

	
 
:created_on: May 7, 2012
 
:author: marcink
 
@@ -32,31 +32,31 @@ from collections import defaultdict
 
from itertools import groupby
 

	
 
from pylons import request, tmpl_context as c, url
 
from pylons.controllers.util import redirect
 
from pylons.i18n.translation import _
 

	
 
from rhodecode.lib.compat import json
 
from rhodecode.lib.base import BaseRepoController, render
 
from rhodecode.lib.auth import LoginRequired, HasRepoPermissionAnyDecorator,\
 
from kallithea.lib.compat import json
 
from kallithea.lib.base import BaseRepoController, render
 
from kallithea.lib.auth import LoginRequired, HasRepoPermissionAnyDecorator,\
 
    NotAnonymous
 
from rhodecode.lib.helpers import Page
 
from rhodecode.lib import helpers as h
 
from rhodecode.lib import diffs
 
from rhodecode.lib.utils import action_logger, jsonify
 
from rhodecode.lib.vcs.utils import safe_str
 
from rhodecode.lib.vcs.exceptions import EmptyRepositoryError
 
from rhodecode.lib.diffs import LimitedDiffContainer
 
from rhodecode.model.db import  PullRequest, ChangesetStatus, ChangesetComment
 
from rhodecode.model.pull_request import PullRequestModel
 
from rhodecode.model.meta import Session
 
from rhodecode.model.repo import RepoModel
 
from rhodecode.model.comment import ChangesetCommentsModel
 
from rhodecode.model.changeset_status import ChangesetStatusModel
 
from rhodecode.model.forms import PullRequestForm
 
from rhodecode.lib.utils2 import safe_int
 
from kallithea.lib.helpers import Page
 
from kallithea.lib import helpers as h
 
from kallithea.lib import diffs
 
from kallithea.lib.utils import action_logger, jsonify
 
from kallithea.lib.vcs.utils import safe_str
 
from kallithea.lib.vcs.exceptions import EmptyRepositoryError
 
from kallithea.lib.diffs import LimitedDiffContainer
 
from kallithea.model.db import  PullRequest, ChangesetStatus, ChangesetComment
 
from kallithea.model.pull_request import PullRequestModel
 
from kallithea.model.meta import Session
 
from kallithea.model.repo import RepoModel
 
from kallithea.model.comment import ChangesetCommentsModel
 
from kallithea.model.changeset_status import ChangesetStatusModel
 
from kallithea.model.forms import PullRequestForm
 
from kallithea.lib.utils2 import safe_int
 

	
 
log = logging.getLogger(__name__)
 

	
 

	
 
class PullrequestsController(BaseRepoController):
 

	
rhodecode/controllers/search.py
Show inline comments
 
@@ -9,13 +9,13 @@
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
"""
 
rhodecode.controllers.search
 
kallithea.controllers.search
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 

	
 
Search controller for RhodeCode
 

	
 
:created_on: Aug 7, 2010
 
:author: marcink
 
@@ -31,19 +31,19 @@ from pylons import request, config, tmpl
 

	
 
from whoosh.index import open_dir, EmptyIndexError
 
from whoosh.qparser import QueryParser, QueryParserError
 
from whoosh.query import Phrase, Wildcard, Term, Prefix
 
from webhelpers.util import update_params
 

	
 
from rhodecode.lib.auth import LoginRequired
 
from rhodecode.lib.base import BaseRepoController, render
 
from rhodecode.lib.indexers import CHGSETS_SCHEMA, SCHEMA, CHGSET_IDX_NAME, \
 
from kallithea.lib.auth import LoginRequired
 
from kallithea.lib.base import BaseRepoController, render
 
from kallithea.lib.indexers import CHGSETS_SCHEMA, SCHEMA, CHGSET_IDX_NAME, \
 
    IDX_NAME, WhooshResultWrapper
 
from rhodecode.model.repo import RepoModel
 
from rhodecode.lib.utils2 import safe_str, safe_int
 
from rhodecode.lib.helpers import Page
 
from kallithea.model.repo import RepoModel
 
from kallithea.lib.utils2 import safe_str, safe_int
 
from kallithea.lib.helpers import Page
 

	
 
log = logging.getLogger(__name__)
 

	
 

	
 
class SearchController(BaseRepoController):
 

	
rhodecode/controllers/summary.py
Show inline comments
 
@@ -9,13 +9,13 @@
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
"""
 
rhodecode.controllers.summary
 
kallithea.controllers.summary
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 

	
 
Summary controller for Rhodecode
 

	
 
:created_on: Apr 18, 2010
 
:author: marcink
 
@@ -34,29 +34,29 @@ from urlparse import urlparse
 
from pylons import tmpl_context as c, request, url, config
 
from pylons.i18n.translation import _
 
from webob.exc import HTTPBadRequest
 

	
 
from beaker.cache import cache_region, region_invalidate
 

	
 
from rhodecode.lib.compat import product
 
from rhodecode.lib.vcs.exceptions import ChangesetError, EmptyRepositoryError, \
 
from kallithea.lib.compat import product
 
from kallithea.lib.vcs.exceptions import ChangesetError, EmptyRepositoryError, \
 
    NodeDoesNotExistError
 
from rhodecode.config.conf import ALL_READMES, ALL_EXTS, LANGUAGES_EXTENSIONS_MAP
 
from rhodecode.model.db import Statistics, CacheInvalidation, User
 
from rhodecode.lib.utils import jsonify
 
from rhodecode.lib.utils2 import safe_unicode, safe_str
 
from rhodecode.lib.auth import LoginRequired, HasRepoPermissionAnyDecorator,\
 
from kallithea.config.conf import ALL_READMES, ALL_EXTS, LANGUAGES_EXTENSIONS_MAP
 
from kallithea.model.db import Statistics, CacheInvalidation, User
 
from kallithea.lib.utils import jsonify
 
from kallithea.lib.utils2 import safe_unicode, safe_str
 
from kallithea.lib.auth import LoginRequired, HasRepoPermissionAnyDecorator,\
 
    NotAnonymous
 
from rhodecode.lib.base import BaseRepoController, render
 
from rhodecode.lib.vcs.backends.base import EmptyChangeset
 
from rhodecode.lib.markup_renderer import MarkupRenderer
 
from rhodecode.lib.celerylib import run_task
 
from rhodecode.lib.celerylib.tasks import get_commits_stats
 
from rhodecode.lib.compat import json
 
from rhodecode.lib.vcs.nodes import FileNode
 
from rhodecode.controllers.changelog import _load_changelog_summary
 
from kallithea.lib.base import BaseRepoController, render
 
from kallithea.lib.vcs.backends.base import EmptyChangeset
 
from kallithea.lib.markup_renderer import MarkupRenderer
 
from kallithea.lib.celerylib import run_task
 
from kallithea.lib.celerylib.tasks import get_commits_stats
 
from kallithea.lib.compat import json
 
from kallithea.lib.vcs.nodes import FileNode
 
from kallithea.controllers.changelog import _load_changelog_summary
 

	
 
log = logging.getLogger(__name__)
 

	
 
README_FILES = [''.join([x[0][0], x[1][0]]) for x in
 
                    sorted(list(product(ALL_READMES, ALL_EXTS)),
 
                           key=lambda y:y[0][1] + y[1][1])]
rhodecode/controllers/tags.py
Show inline comments
 
@@ -9,13 +9,13 @@
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
"""
 
rhodecode.controllers.tags
 
kallithea.controllers.tags
 
~~~~~~~~~~~~~~~~~~~~~~~~~~
 

	
 
Tags controller for rhodecode
 

	
 
:created_on: Apr 21, 2010
 
:author: marcink
 
@@ -25,15 +25,15 @@ Tags controller for rhodecode
 
"""
 

	
 
import logging
 

	
 
from pylons import tmpl_context as c
 

	
 
from rhodecode.lib.auth import LoginRequired, HasRepoPermissionAnyDecorator
 
from rhodecode.lib.base import BaseRepoController, render
 
from rhodecode.lib.compat import OrderedDict
 
from kallithea.lib.auth import LoginRequired, HasRepoPermissionAnyDecorator
 
from kallithea.lib.base import BaseRepoController, render
 
from kallithea.lib.compat import OrderedDict
 

	
 
log = logging.getLogger(__name__)
 

	
 

	
 
class TagsController(BaseRepoController):
 

	
rhodecode/i18n/de/LC_MESSAGES/kallithea.mo
Show inline comments
 
file renamed from rhodecode/i18n/de/LC_MESSAGES/rhodecode.mo to rhodecode/i18n/de/LC_MESSAGES/kallithea.mo

Changeset was too big and was cut off... Show full diff anyway

0 comments (0 inline, 0 general)