diff --git a/.bumpversion.cfg b/.bumpversion.cfg
--- a/.bumpversion.cfg
+++ b/.bumpversion.cfg
@@ -1,5 +1,5 @@
[bumpversion]
-current_version = 4.5.2
+current_version = 4.6.0
message = release: Bump version {current_version} to {new_version}
[bumpversion:file:rhodecode/VERSION]
diff --git a/.release.cfg b/.release.cfg
--- a/.release.cfg
+++ b/.release.cfg
@@ -4,26 +4,21 @@ done = false
[task:bump_version]
done = true
-[task:rc_tools_pinned]
-done = true
-
[task:fixes_on_stable]
-done = true
[task:pip2nix_generated]
-done = true
[task:changelog_updated]
-done = true
[task:generate_api_docs]
-done = true
+
+[task:updated_translation]
[release]
-state = prepared
-version = 4.5.2
+state = in_progress
+version = 4.6.0
-[task:updated_translation]
+[task:rc_tools_pinned]
[task:generate_js_routes]
diff --git a/MANIFEST.in b/MANIFEST.in
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -29,8 +29,6 @@ recursive-include rhodecode *.mako
# 502 page
include rhodecode/public/502.html
-# 502 page
-include rhodecode/public/502.html
# images, css
include rhodecode/public/css/*.css
diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -1,11 +1,25 @@
+
+.PHONY: clean docs docs-clean docs-cleanup test test-clean test-only web-build
WEBPACK=./node_modules/webpack/bin/webpack.js
GRUNT=grunt
NODE_PATH=./node_modules
-CI_PREFIX=enterprise
+
+
+clean:
+ make test-clean
+ find . -type f \( -iname '*.c' -o -iname '*.pyc' -o -iname '*.so' \) -exec rm '{}' ';'
-.PHONY: docs docs-clean ci-docs clean test test-clean test-lint test-only
+test:
+ make test-clean
+ make test-only
+test-clean:
+ rm -rf coverage.xml htmlcov junit.xml pylint.log result
+ find . -type d -name "__pycache__" -prune -exec rm -rf '{}' ';'
+
+test-only:
+ PYTHONHASHSEED=random py.test -vv -r xw --cov=rhodecode --cov-report=term-missing --cov-report=html rhodecode
docs:
(cd docs; nix-build default.nix -o result; make clean html)
@@ -13,27 +27,9 @@ docs:
docs-clean:
(cd docs; make clean)
-ci-docs: docs;
-
-
-clean: test-clean
- find . -type f \( -iname '*.c' -o -iname '*.pyc' -o -iname '*.so' \) -exec rm '{}' ';'
-
-test: test-clean test-only
-
-test-clean:
- rm -rf coverage.xml htmlcov junit.xml pylint.log result
-
-test-only:
- PYTHONHASHSEED=random py.test -vv -r xw --cov=rhodecode --cov-report=term-missing --cov-report=html rhodecode/tests/
+docs-cleanup:
+ (cd docs; make cleanup)
web-build:
NODE_PATH=$(NODE_PATH) $(GRUNT)
-web-test:
- @echo "no test for our javascript, yet!"
-
-docs-bootstrap:
- (cd docs; nix-build default.nix -o result)
- @echo "Please go to docs folder and run make html"
-
diff --git a/configs/development.ini b/configs/development.ini
--- a/configs/development.ini
+++ b/configs/development.ini
@@ -415,19 +415,23 @@ search.location = %(here)s/data/index
########################################
## channelstream enables persistent connections and live notification
## in the system. It's also used by the chat system
+channelstream.enabled = false
-channelstream.enabled = false
-## location of channelstream server on the backend
+## server address for channelstream server on the backend
channelstream.server = 127.0.0.1:9800
+
## location of the channelstream server from outside world
-## most likely this would be an http server special backend URL, that handles
-## websocket connections see nginx example for config
-# channelstream.ws_url = ws://rhodecode.yourserver.com/_channelstream
-## proxy path that can be used by http daemons for exposing channelstream
-# channelstream.proxy_path = /_channelstream
+## use ws:// for http or wss:// for https. This address needs to be handled
+## by external HTTP server such as Nginx or Apache
+## see nginx/apache configuration examples in our docs
+channelstream.ws_url = ws://rhodecode.yourserver.com/_channelstream
channelstream.secret = secret
channelstream.history.location = %(here)s/channelstream_history
+## Internal application path that Javascript uses to connect into.
+## If you use proxy-prefix the prefix should be added before /_channelstream
+channelstream.proxy_path = /_channelstream
+
###################################
## APPENLIGHT CONFIG ##
@@ -501,9 +505,9 @@ appenlight.log_namespace_blacklist =
##############
debug_style = true
-#########################################################
-### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ###
-#########################################################
+###########################################
+### MAIN RHODECODE DATABASE CONFIG ###
+###########################################
#sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db?timeout=30
#sqlalchemy.db1.url = postgresql://postgres:qweqwe@localhost/rhodecode
#sqlalchemy.db1.url = mysql://root:qweqwe@localhost/rhodecode
@@ -586,12 +590,16 @@ svn.proxy.location_root = /
## be killed. Setting it to zero means no timeout. Defaults to 10 seconds.
#svn.proxy.reload_timeout = 10
+## Dummy marker to add new entries after.
+## Add any custom entries below. Please don't remove.
+custom.conf = 1
+
################################
### LOGGING CONFIGURATION ####
################################
[loggers]
-keys = root, routes, rhodecode, sqlalchemy, beaker, pyro4, templates
+keys = root, routes, rhodecode, sqlalchemy, beaker, templates
[handlers]
keys = console, console_sql
@@ -619,12 +627,6 @@ handlers =
qualname = beaker.container
propagate = 1
-[logger_pyro4]
-level = DEBUG
-handlers =
-qualname = Pyro4
-propagate = 1
-
[logger_templates]
level = INFO
handlers =
@@ -649,13 +651,13 @@ propagate = 0
[handler_console]
class = StreamHandler
-args = (sys.stderr,)
+args = (sys.stderr, )
level = DEBUG
formatter = color_formatter
[handler_console_sql]
class = StreamHandler
-args = (sys.stderr,)
+args = (sys.stderr, )
level = DEBUG
formatter = color_formatter_sql
diff --git a/configs/gunicorn_config.py b/configs/gunicorn_config.py
--- a/configs/gunicorn_config.py
+++ b/configs/gunicorn_config.py
@@ -1,4 +1,17 @@
-"""gunicorn config hooks"""
+"""
+gunicorn config extension and hooks. Sets additional configuration that is
+available post the .ini config.
+
+- workers = ${cpu_number}
+- threads = 1
+- proc_name = ${gunicorn_proc_name}
+- worker_class = sync
+- worker_connections = 10
+- max_requests = 1000
+- max_requests_jitter = 30
+- timeout = 21600
+
+"""
import multiprocessing
import sys
@@ -6,50 +19,31 @@ import threading
import traceback
-# GLOBAL #
+# GLOBAL
errorlog = '-'
accesslog = '-'
loglevel = 'debug'
-# SECURITY #
+# SECURITY
limit_request_line = 4094
limit_request_fields = 100
limit_request_field_size = 8190
-# SERVER MECHANICS #
-# None == system temp dir #
+# SERVER MECHANICS
+# None == system temp dir
worker_tmp_dir = None
tmp_upload_dir = None
-#proc_name =
-
-# self adjust workers based on CPU #
-#workers = multiprocessing.cpu_count() * 2 + 1
-
-access_log_format = '[%(p)s] %(h)15s %(l)s %(u)s %(t)s "%(r)s" %(s)s %(b)s "%(f)s" "%(a)s" request_time:%(L)s'
-
-# For the gevent worker classes #
-# this limits the maximum number of simultaneous clients that #
-# a single process can handle. #
-#worker_connections = 10
-# Max requests to handle by each worker before restarting it, #
-# could prevent memory leaks #
-#max_requests = 1000
-#max_requests_jitter = 30
-
+# Custom log format
+access_log_format = (
+ '%(t)s GNCRN %(p)-8s %(h)-15s rqt:%(L)s %(s)s %(b)s "%(m)s:%(U)s %(q)s" usr:%(u)s "%(f)s" "%(a)s"')
-# If a worker does not notify the master process in this #
-# number of seconds it is killed and a new worker is spawned #
-# to replace it. #
-#timeout = 3600
-
-access_log_format = (
- '[%(p)-10s] %(h)s time:%(L)s %(l)s %(u)s '
- '%(t)s "%(r)s" %(s)s %(b)s "%(f)s" "%(a)s"')
+# self adjust workers based on CPU count
+# workers = multiprocessing.cpu_count() * 2 + 1
def post_fork(server, worker):
- server.log.info("[<%s>] worker spawned", worker.pid)
+ server.log.info("[<%-10s>] WORKER spawned", worker.pid)
def pre_fork(server, worker):
@@ -67,7 +61,7 @@ def when_ready(server):
def worker_int(worker):
worker.log.info("[<%-10s>] worker received INT or QUIT signal", worker.pid)
- # get traceback info
+ # get traceback info, on worker crash
id2name = dict([(th.ident, th.name) for th in threading.enumerate()])
code = []
for thread_id, stack in sys._current_frames().items():
diff --git a/configs/production.ini b/configs/production.ini
--- a/configs/production.ini
+++ b/configs/production.ini
@@ -389,19 +389,23 @@ search.location = %(here)s/data/index
########################################
## channelstream enables persistent connections and live notification
## in the system. It's also used by the chat system
+channelstream.enabled = false
-channelstream.enabled = false
-## location of channelstream server on the backend
+## server address for channelstream server on the backend
channelstream.server = 127.0.0.1:9800
+
## location of the channelstream server from outside world
-## most likely this would be an http server special backend URL, that handles
-## websocket connections see nginx example for config
-# channelstream.ws_url = ws://rhodecode.yourserver.com/_channelstream
-## proxy path that can be used by http daemons for exposing channelstream
-# channelstream.proxy_path = /_channelstream
+## use ws:// for http or wss:// for https. This address needs to be handled
+## by external HTTP server such as Nginx or Apache
+## see nginx/apache configuration examples in our docs
+channelstream.ws_url = ws://rhodecode.yourserver.com/_channelstream
channelstream.secret = secret
channelstream.history.location = %(here)s/channelstream_history
+## Internal application path that Javascript uses to connect into.
+## If you use proxy-prefix the prefix should be added before /_channelstream
+channelstream.proxy_path = /_channelstream
+
###################################
## APPENLIGHT CONFIG ##
@@ -470,9 +474,9 @@ appenlight.log_namespace_blacklist =
set debug = false
-#########################################################
-### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ###
-#########################################################
+###########################################
+### MAIN RHODECODE DATABASE CONFIG ###
+###########################################
#sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db?timeout=30
#sqlalchemy.db1.url = postgresql://postgres:qweqwe@localhost/rhodecode
#sqlalchemy.db1.url = mysql://root:qweqwe@localhost/rhodecode
@@ -555,12 +559,16 @@ svn.proxy.location_root = /
## be killed. Setting it to zero means no timeout. Defaults to 10 seconds.
#svn.proxy.reload_timeout = 10
+## Dummy marker to add new entries after.
+## Add any custom entries below. Please don't remove.
+custom.conf = 1
+
################################
### LOGGING CONFIGURATION ####
################################
[loggers]
-keys = root, routes, rhodecode, sqlalchemy, beaker, pyro4, templates
+keys = root, routes, rhodecode, sqlalchemy, beaker, templates
[handlers]
keys = console, console_sql
@@ -588,12 +596,6 @@ handlers =
qualname = beaker.container
propagate = 1
-[logger_pyro4]
-level = DEBUG
-handlers =
-qualname = Pyro4
-propagate = 1
-
[logger_templates]
level = INFO
handlers =
@@ -618,13 +620,13 @@ propagate = 0
[handler_console]
class = StreamHandler
-args = (sys.stderr,)
+args = (sys.stderr, )
level = INFO
formatter = generic
[handler_console_sql]
class = StreamHandler
-args = (sys.stderr,)
+args = (sys.stderr, )
level = WARN
formatter = generic
diff --git a/default.nix b/default.nix
--- a/default.nix
+++ b/default.nix
@@ -135,6 +135,8 @@ let
rhodecode-testdata
]);
+ #TODO: either move this into overrides, OR use the new machanics from
+ # pip2nix and requiremtn.txt file
propagatedBuildInputs = attrs.propagatedBuildInputs ++ (with self; [
rhodecode-tools
]);
diff --git a/docs/Makefile b/docs/Makefile
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -49,6 +49,12 @@ help:
clean:
rm -rf $(BUILDDIR)/*
+cleanup:
+ @echo "cleaning build dir"
+ rm -rf $(BUILDDIR)/*
+ @echo "cleaning result symlink"
+ rm -v result
+
html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
diff --git a/docs/admin/apache-conf-examples.rst b/docs/admin/apache-conf-example.rst
rename from docs/admin/apache-conf-examples.rst
rename to docs/admin/apache-conf-example.rst
--- a/docs/admin/apache-conf-examples.rst
+++ b/docs/admin/apache-conf-example.rst
@@ -1,32 +1,68 @@
.. _apache-conf-eg:
-Apache Configuration Examples
------------------------------
+Apache Configuration Example
+----------------------------
+
+Use the following example to configure Apache as a your web server.
+Below config if for an Apache Reverse Proxy configuration.
+
+.. note::
+
+ Apache requires the following modules to be enabled. Below is an example
+ how to enable them on Ubuntu Server
+
-Use the following example to securely configure your Apache HTTP virtual hosts
-file.
+.. code-block:: bash
+
+ $ sudo a2enmod proxy
+ $ sudo a2enmod proxy_http
+ $ sudo a2enmod proxy_balancer
+ $ sudo a2enmod headers
+ $ sudo a2enmod ssl
+ $ sudo a2enmod rewrite
+
+ # requires Apache 2.4+, required to handle websockets/channelstream
+ $ sudo a2enmod proxy_wstunnel
+
.. code-block:: apache
+ ## HTTP to HTTPS rewrite
- ServerName hg.myserver.com
- ServerAlias hg.myserver.com
+ ServerName rhodecode.myserver.com
+ DocumentRoot /var/www/html
+ Redirect permanent / https://rhodecode.myserver.com/
+
+
+ ## MAIN SSL enabled server
+
+
+ ServerName rhodecode.myserver.com
+ ServerAlias rhodecode.myserver.com
+
+ ## serve static files by Apache, recommended for performance
+ #Alias /_static /home/ubuntu/.rccontrol/community-1/static
+
+ RequestHeader set X-Forwarded-Proto "https"
+
+ ## channelstream websocket handling
+ ProxyPass /_channelstream ws://localhost:9800
+ ProxyPassReverse /_channelstream ws://localhost:9800
Order allow,deny
Allow from all
- # important !
- # Directive to properly generate url (clone url) for pylons
-
+ # Directive to properly generate url (clone url) for RhodeCode
ProxyPreserveHost On
- #rhodecode instance
- ProxyPass / http://127.0.0.1:5000/
- ProxyPassReverse / http://127.0.0.1:5000/
+ # Url to running RhodeCode instance. This is shown as `- URL:` when
+ # running rccontrol status.
+ ProxyPass / http://127.0.0.1:10002/
+ ProxyPassReverse / http://127.0.0.1:10002/
- # Set strict HTTPS
+ # strict http prevents from https -> http downgrade
Header always set Strict-Transport-Security "max-age=63072000; includeSubdomains; preload"
# Set x-frame options
@@ -35,80 +71,17 @@ file.
# To enable https use line below
# SetEnvIf X-Url-Scheme https HTTPS=1
- # Secure your Diffie-hellmann deployment
+ # SSL setup
+ SSLEngine On
+ SSLCertificateFile /etc/apache2/ssl/rhodecode.myserver.pem
+ SSLCertificateKeyFile /etc/apache2/ssl/rhodecode.myserver.key
+
SSLProtocol all -SSLv2 -SSLv3
SSLCipherSuite ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA
SSLHonorCipherOrder on
- SSLOpenSSLConfCmd DHParameters "{path to dhparams.pem}"
+
+ # Diffie-Hellman parameter for DHE ciphersuites, recommended 2048 bits
+ #SSLOpenSSLConfCmd DHParameters "/etc/apache2/dhparam.pem"
-Use the following example to configure Apache for a multi-node setup. The
-timeout setting should be increased if you experience timeouts when working
-with large |repos|.
-
-.. code-block:: apache
-
- #
- # Timeout: The number of seconds before receives and sends time out.
- #
- Timeout 600
-
-
-
- ProxyRequests off
-
- #important !
- #Directive to properly generate url (clone url) for pylons
- ProxyPreserveHost On
-
- ServerName your.rce.com
- ServerAlias your.rce.com
-
-
- # WebHead1
- BalancerMember http://10.58.1.171:10002 route=1
- # WebHead2
- BalancerMember http://10.58.1.172:10001 route=2
-
- # Security "technically we aren't blocking
- # anyone but this the place to make those
- # chages
- Order Deny,Allow
- Deny from none
- Allow from all
-
- # Load Balancer Settings
- # We will be configuring a simple Round
- # Robin style load balancer. This means
- # that all webheads take an equal share of
- # of the load.
- ProxySet stickysession=ROUTEID
-
-
-
- # balancer-manager
- # This tool is built into the mod_proxy_balancer
- # module and will allow you to do some simple
- # modifications to the balanced group via a gui
- # web interface.
-
- SetHandler balancer-manager
-
- # recommend locking this one down to your
- # your office
- Order deny,allow
- Allow from all
-
-
- # Point of Balance
- # This setting will allow to explicitly name the
- # the location in the site that we want to be
- # balanced, in this example we will balance "/"
- # or everything in the site.
- ProxyPass /balancer-manager !
- ProxyPass / balancer://mycluster/
-
- ProxyPassReverse / balancer://mycluster/
-
-
diff --git a/docs/admin/apache-config.rst b/docs/admin/apache-config.rst
--- a/docs/admin/apache-config.rst
+++ b/docs/admin/apache-config.rst
@@ -9,7 +9,6 @@ the information in the following section
.. toctree::
apache-diffie-hellman
- apache-conf-examples
+ apache-conf-example
apache-subdirectory
- apache-reverse-proxy
apache-wsgi-coding
diff --git a/docs/admin/apache-reverse-proxy.rst b/docs/admin/apache-reverse-proxy.rst
deleted file mode 100644
--- a/docs/admin/apache-reverse-proxy.rst
+++ /dev/null
@@ -1,33 +0,0 @@
-Apache Reverse Proxy
-^^^^^^^^^^^^^^^^^^^^
-
-Here is a sample configuration file for using Apache as a reverse proxy.
-
-.. code-block:: apache
-
-
- ServerName hg.myserver.com
- ServerAlias hg.myserver.com
-
- ## uncomment to serve static files by Apache
- ## ProxyPass /_static/rhodecode !
- ## Alias /_static/rhodecode /path/to/.rccontrol/enterprise-1/static
-
-
- Order allow,deny
- Allow from all
-
-
- ## Important !
- ## Directive to properly generate url (clone url) for pylons
- ProxyPreserveHost On
-
- ## RhodeCode instance running
- ProxyPass / http://127.0.0.1:10002/
- ProxyPassReverse / http://127.0.0.1:10002/
-
- ## to enable https use line below
- #SetEnvIf X-Url-Scheme https HTTPS=1
-
-
-
diff --git a/docs/admin/apache-subdirectory.rst b/docs/admin/apache-subdirectory.rst
--- a/docs/admin/apache-subdirectory.rst
+++ b/docs/admin/apache-subdirectory.rst
@@ -7,7 +7,8 @@ Use the following example to configure A
.. code-block:: apache
- / # Change into your chosen prefix
+ # Change someprefix into your chosen prefix
+
ProxyPreserveHost On
ProxyPass "http://127.0.0.1:5000/"
ProxyPassReverse "http://127.0.0.1:5000/"
diff --git a/docs/admin/nginx-config-example.rst b/docs/admin/nginx-config-example.rst
--- a/docs/admin/nginx-config-example.rst
+++ b/docs/admin/nginx-config-example.rst
@@ -3,6 +3,7 @@ Nginx Configuration Example
Use the following example to configure Nginx as a your web server.
+
.. code-block:: nginx
log_format log_custom '$remote_addr - $remote_user [$time_local] '
@@ -10,8 +11,10 @@ Use the following example to configure N
'"$http_referer" "$http_user_agent" '
'$request_time $upstream_response_time $pipe';
+ ## define upstream (local RhodeCode instance) to connect to
upstream rc {
-
+ # Url to running RhodeCode instance.
+ # This is shown as `- URL:` in output from rccontrol status.
server 127.0.0.1:10002;
# add more instances for load balancing
@@ -19,8 +22,17 @@ Use the following example to configure N
# server 127.0.0.1:10004;
}
- ## gist alias server, for serving nicer GIST urls
+ ## HTTP to HTTPS rewrite
+ server {
+ listen 80;
+ server_name rhodecode.myserver.com;
+ if ($http_host = rhodecode.myserver.com) {
+ rewrite (.*) https://rhodecode.myserver.com$1 permanent;
+ }
+ }
+
+ ## Optional gist alias server, for serving nicer GIST urls.
server {
listen 443;
server_name gist.myserver.com;
@@ -37,6 +49,7 @@ Use the following example to configure N
ssl_prefer_server_ciphers on;
ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA';
+ # strict http prevents from https -> http downgrade
add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;";
# Diffie-Hellman parameter for DHE ciphersuites, recommended 2048 bits
@@ -46,15 +59,6 @@ Use the following example to configure N
rewrite (.*) https://rhodecode.myserver.com/_admin/gists;
}
- ## HTTP to HTTPS rewrite
- server {
- listen 80;
- server_name rhodecode.myserver.com;
-
- if ($http_host = rhodecode.myserver.com) {
- rewrite (.*) https://rhodecode.myserver.com$1 permanent;
- }
- }
## MAIN SSL enabled server
server {
@@ -79,14 +83,15 @@ Use the following example to configure N
include /etc/nginx/proxy.conf;
- ## serve static files by nginx, recommended
+ ## serve static files by Nginx, recommended for performance
# location /_static/rhodecode {
# alias /path/to/.rccontrol/enterprise-1/static;
# }
- ## channel stream live components
+ ## channelstream websocket handling
location /_channelstream {
rewrite /_channelstream/(.*) /$1 break;
+
proxy_pass http://127.0.0.1:9800;
proxy_connect_timeout 10;
diff --git a/docs/admin/nginx-config.rst b/docs/admin/nginx-config.rst
--- a/docs/admin/nginx-config.rst
+++ b/docs/admin/nginx-config.rst
@@ -1,7 +1,7 @@
.. _nginx-ws-ref:
-Nginx Configuration
-===================
+Nginx HTTP Server Configuration
+-------------------------------
To set up your Nginx Web Server for optimal performance and security, use
the information in the following sections.
diff --git a/docs/admin/reset-information.rst b/docs/admin/reset-information.rst
--- a/docs/admin/reset-information.rst
+++ b/docs/admin/reset-information.rst
@@ -12,6 +12,7 @@ it somehow becomes unavailable you can u
Logging into the |RCE| database with ``iShell`` should only be done by an
experienced and knowledgeable database administrator.
+
Reset Admin Account Privileges
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -22,8 +23,7 @@ account permissions.
.. code-block:: bash
# Open iShell from the terminal
- $ .rccontrol/enterprise-1/profile/bin/paster \
- ishell .rccontrol/enterprise-1/rhodecode.ini
+ $ rccontrol ishell enterprise-1
.. code-block:: mysql
@@ -33,6 +33,7 @@ account permissions.
In [3]: Session().add(adminuser);Session().commit()
In [4]: exit()
+
Set to read global ``.hgrc`` file
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -46,8 +47,7 @@ following example to make changes to thi
.. code-block:: bash
# Open iShell from the terminal
- $ .rccontrol/enterprise-5/profile/bin/paster \
- ishell.rccontrol/enterprise-5/rhodecode.ini
+ $ rccontrol ishell enterprise-1
.. code-block:: mysql
@@ -59,6 +59,7 @@ following example to make changes to thi
In [5]: Session().add(new_option);Session().commit()
In [6]: exit()
+
Manually Reset Password
^^^^^^^^^^^^^^^^^^^^^^^
@@ -73,8 +74,7 @@ Use the following code example to carry
.. code-block:: bash
# starts the ishell interactive prompt
- $ .rccontrol/enterprise-1/profile/bin/paster \
- ishell .rccontrol/enterprise-1/rhodecode.ini
+ $ rccontrol ishell enterprise-1
.. code-block:: mysql
@@ -91,7 +91,6 @@ Use the following code example to carry
In [8]: exit()
-
Change user details
^^^^^^^^^^^^^^^^^^^
@@ -106,8 +105,7 @@ Use the following code example to carry
.. code-block:: bash
# starts the ishell interactive prompt
- $ .rccontrol/enterprise-1/profile/bin/paster \
- ishell .rccontrol/enterprise-1/rhodecode.ini
+ $ rccontrol ishell enterprise-1
.. code-block:: mysql
@@ -117,3 +115,37 @@ Use the following code example to carry
In [3]: my_user.username = 'SomeUser'
In [4]: Session().add(my_user);Session().commit()
In [5]: exit()
+
+
+Change user login type
+^^^^^^^^^^^^^^^^^^^^^^
+
+Sometimes it's required to change account type from RhodeCode to LDAP or
+other external authentication type.
+If you need to manually change the method of login, use the following steps.
+
+1. Navigate to your |RCE| install location.
+2. Run the interactive ``ishell`` prompt.
+3. Set a new arguments for users.
+
+Use the following code example to carry out these steps.
+Available values for new_extern_type can be found when browsing available
+authentication types in RhodeCode admin interface for authentication.
+Use the text which is shown after '#' sign, eg.
+` LDAP (egg:rhodecode-enterprise-ce#ldap)` it's type is 'ldap'
+
+.. code-block:: bash
+
+ # starts the ishell interactive prompt
+ $ rccontrol ishell enterprise-1
+
+.. code-block:: mysql
+
+ # Use this example to change users from authentication
+ # using rhodecode internal to ldap
+ In [1]: new_extern_type = 'ldap'
+ In [2]: my_user = User.get_by_username('some_username')
+ In [3]: my_user.extern_type = new_extern_type
+ In [4]: my_user.extern_name = new_extern_type
+ In [5]: Session().add(my_user);Session().commit()
+ In [6]: exit()
diff --git a/docs/admin/svn-http.rst b/docs/admin/svn-http.rst
--- a/docs/admin/svn-http.rst
+++ b/docs/admin/svn-http.rst
@@ -27,6 +27,7 @@ Once installed you need to enable ``dav_
$ sudo a2enmod dav_svn
$ sudo a2enmod headers
+ $ sudo a2enmod authn_anon
Configuring Apache Setup
@@ -55,7 +56,7 @@ permission issues could occur. To do thi
export APACHE_RUN_GROUP=rhodecode
1. To configure Apache, create and edit a virtual hosts file, for example
- :file:`/etc/apache2/sites-available/default.conf`. Below is an example
+ :file:`/etc/apache2/sites-enabled/default.conf`. Below is an example
how to use one with auto-generated config ```mod_dav_svn.conf```
from configured |RCE| instance.
diff --git a/docs/admin/tuning-change-large-file-dir.rst b/docs/admin/tuning-change-large-file-dir.rst
--- a/docs/admin/tuning-change-large-file-dir.rst
+++ b/docs/admin/tuning-change-large-file-dir.rst
@@ -13,7 +13,7 @@ 1. Open ishell from the terminal and use
.. code-block:: bash
# Open iShell from the terminal and set ini file
- $ .rccontrol/enterprise-1/profile/bin/paster ishell .rccontrol/enterprise-1/rhodecode.ini
+ $ rccontrol ishell enterprise-1
2. Run the following commands, and ensure that |RCE| has write access to the
new directory:
diff --git a/docs/admin/tuning-increase-db-performance.rst b/docs/admin/tuning-increase-db-performance.rst
--- a/docs/admin/tuning-increase-db-performance.rst
+++ b/docs/admin/tuning-increase-db-performance.rst
@@ -3,21 +3,6 @@
Increase Database Performance
-----------------------------
-To increase database performance switch to database-based user sessions.
-File-based sessions are only suitable for smaller setups. The most common
-issue being file limit errors which occur if there are lots of session files.
-Therefore, in a large scale deployment, to give better performance,
-scalability, and maintainability we recommend switching from file-based
-sessions to database-based user sessions.
+For tuning PostgreSQL we recommend reading: http://www.revsys.com/writings/postgresql-performance.html
-To switch to database-based user sessions uncomment the following section in
-your :file:`/home/{user}/.rccontrol/{instance-id}/rhodecode.ini` file.
-
-.. code-block:: ini
-
- # db session
- beaker.session.type = ext:database
-
- # adjust this property to include your database credentials
- beaker.session.sa.url = postgresql://postgres:@localhost/rhodecode
- beaker.session.table_name = db_session
+For tuning MySQL we recommend reading: http://www.tecmint.com/mysql-mariadb-performance-tuning-and-optimization/
\ No newline at end of file
diff --git a/docs/admin/tuning-mount-cache-memory.rst b/docs/admin/tuning-mount-cache-memory.rst
--- a/docs/admin/tuning-mount-cache-memory.rst
+++ b/docs/admin/tuning-mount-cache-memory.rst
@@ -34,8 +34,8 @@ performance boost.
.. code-block:: bash
- # mount tmp to memory with 2GB limit and 755 write permissions
- mount -t tmpfs -o size=2G,mode=0755 tmpfs /tmp
+ # mount tmp to memory with 2GB limit and 1777 write permissions
+ mount -t tmpfs -o size=2G,mode=1777 tmpfs /tmp
For more information about TMPFS, see the documentation `here`_.
diff --git a/docs/admin/tuning-rhodecode.rst b/docs/admin/tuning-rhodecode.rst
--- a/docs/admin/tuning-rhodecode.rst
+++ b/docs/admin/tuning-rhodecode.rst
@@ -10,6 +10,7 @@ may find some of the following methods u
tuning-gunicorn
tuning-vcs-memory-cache
+ tuning-user-sessions-performance
tuning-increase-db-performance
tuning-scale-horizontally
tuning-increase-cache-size
diff --git a/docs/admin/tuning-user-sessions-performance.rst b/docs/admin/tuning-user-sessions-performance.rst
new file mode 100644
--- /dev/null
+++ b/docs/admin/tuning-user-sessions-performance.rst
@@ -0,0 +1,60 @@
+.. _user-session-ref:
+
+Increase User Session Performance
+---------------------------------
+
+The default file-based sessions are only suitable for smaller setups, or
+instances that doesn't have a lot of users or traffic.
+They are set as default option because it's setup-free solution.
+
+The most common issue of file based sessions are file limit errors which occur
+if there are lots of session files.
+
+Therefore, in a large scale deployment, to give better performance,
+scalability, and maintainability we recommend switching from file-based
+sessions to database-based user sessions or memcached sessions.
+
+To switch to database-based user sessions uncomment the following section in
+your :file:`/home/{user}/.rccontrol/{instance-id}/rhodecode.ini` file.
+
+
+.. code-block:: ini
+
+ ## db based session, fast, and allows easy management over logged in users
+ beaker.session.type = ext:database
+ beaker.session.table_name = db_session
+
+ # use just one of the following accoring to the type of database
+ beaker.session.sa.url = postgresql://postgres:secret@localhost/rhodecode
+ beaker.session.sa.url = mysql://root:secret@127.0.0.1/rhodecode
+
+ beaker.session.sa.pool_recycle = 3600
+ beaker.session.sa.echo = false
+
+
+and make sure you comment out the file based sessions.
+
+.. code-block:: ini
+
+ ## types are file, ext:memcached, ext:database, and memory (default).
+ #beaker.session.type = file
+ #beaker.session.data_dir = %(here)s/data/sessions/data
+
+
+To switch to memcached-based user sessions uncomment the following section in
+your :file:`/home/{user}/.rccontrol/{instance-id}/rhodecode.ini` file.
+
+.. code-block:: ini
+
+ ## memcached sessions
+ beaker.session.type = ext:memcached
+ beaker.session.url = localhost:11211
+
+
+and make sure you comment out the file based sessions.
+
+.. code-block:: ini
+
+ ## types are file, ext:memcached, ext:database, and memory (default).
+ #beaker.session.type = file
+ #beaker.session.data_dir = %(here)s/data/sessions/data
\ No newline at end of file
diff --git a/docs/api/methods/pull-request-methods.rst b/docs/api/methods/pull-request-methods.rst
--- a/docs/api/methods/pull-request-methods.rst
+++ b/docs/api/methods/pull-request-methods.rst
@@ -36,7 +36,7 @@ close_pull_request
comment_pull_request
--------------------
-.. py:function:: comment_pull_request(apiuser, repoid, pullrequestid, message=, status=, userid=>)
+.. py:function:: comment_pull_request(apiuser, repoid, pullrequestid, message=, commit_id=, status=, comment_type=, resolves_comment_id=, userid=>)
Comment on the pull request specified with the `pullrequestid`,
in the |repo| specified by the `repoid`, and optionally change the
@@ -48,15 +48,18 @@ comment_pull_request
:type repoid: str or int
:param pullrequestid: The pull request ID.
:type pullrequestid: int
+ :param commit_id: Specify the commit_id for which to set a comment. If
+ given commit_id is different than latest in the PR status
+ change won't be performed.
+ :type commit_id: str
:param message: The text content of the comment.
:type message: str
:param status: (**Optional**) Set the approval status of the pull
- request. Valid options are:
- * not_reviewed
- * approved
- * rejected
- * under_review
+ request. One of: 'not_reviewed', 'approved', 'rejected',
+ 'under_review'
:type status: str
+ :param comment_type: Comment type, one of: 'note', 'todo'
+ :type comment_type: Optional(str), default: 'note'
:param userid: Comment on the pull request as this user
:type userid: Optional(str or int)
@@ -68,7 +71,9 @@ comment_pull_request
result :
{
"pull_request_id": "",
- "comment_id": ""
+ "comment_id": "",
+ "status": {"given": ,
+ "was_changed": },
}
error : null
diff --git a/docs/api/methods/repo-methods.rst b/docs/api/methods/repo-methods.rst
--- a/docs/api/methods/repo-methods.rst
+++ b/docs/api/methods/repo-methods.rst
@@ -28,7 +28,7 @@ add_field_to_repo
comment_commit
--------------
-.. py:function:: comment_commit(apiuser, repoid, commit_id, message, userid=>, status=)
+.. py:function:: comment_commit(apiuser, repoid, commit_id, message, status=, comment_type=, resolves_comment_id=, userid=>)
Set a commit comment, and optionally change the status of the commit.
@@ -40,15 +40,17 @@ comment_commit
:type commit_id: str
:param message: The comment text.
:type message: str
+ :param status: (**Optional**) status of commit, one of: 'not_reviewed',
+ 'approved', 'rejected', 'under_review'
+ :type status: str
+ :param comment_type: Comment type, one of: 'note', 'todo'
+ :type comment_type: Optional(str), default: 'note'
:param userid: Set the user name of the comment creator.
:type userid: Optional(str or int)
- :param status: status, one of 'not_reviewed', 'approved', 'rejected',
- 'under_review'
- :type status: str
Example error output:
- .. code-block:: json
+ .. code-block:: bash
{
"id" : ,
@@ -539,7 +541,7 @@ get_repo_settings
get_repos
---------
-.. py:function:: get_repos(apiuser)
+.. py:function:: get_repos(apiuser, root=, traverse=)
Lists all existing repositories.
@@ -548,6 +550,14 @@ get_repos
:param apiuser: This is filled automatically from the |authtoken|.
:type apiuser: AuthUser
+ :param root: specify root repository group to fetch repositories.
+ filters the returned repositories to be members of given root group.
+ :type root: Optional(None)
+ :param traverse: traverse given root into subrepositories. With this flag
+ set to False, it will only return top-level repositories from `root`.
+ if root is empty it will return just top-level repositories.
+ :type traverse: Optional(True)
+
Example output:
diff --git a/docs/api/methods/server-methods.rst b/docs/api/methods/server-methods.rst
--- a/docs/api/methods/server-methods.rst
+++ b/docs/api/methods/server-methods.rst
@@ -3,6 +3,49 @@
server methods
==============
+cleanup_sessions
+----------------
+
+.. py:function:: cleanup_sessions(apiuser, older_then=)
+
+ Triggers a session cleanup action.
+
+ If the ``older_then`` option is set, only sessions that hasn't been
+ accessed in the given number of days will be removed.
+
+ This command can only be run using an |authtoken| with admin rights to
+ the specified repository.
+
+ This command takes the following options:
+
+ :param apiuser: This is filled automatically from the |authtoken|.
+ :type apiuser: AuthUser
+ :param older_then: Deletes session that hasn't been accessed
+ in given number of days.
+ :type older_then: Optional(int)
+
+ Example output:
+
+ .. code-block:: bash
+
+ id :
+ result: {
+ "backend": "",
+ "sessions_removed":
+ }
+ error : null
+
+ Example error output:
+
+ .. code-block:: bash
+
+ id :
+ result : null
+ error : {
+ 'Error occurred during session cleanup'
+ }
+
+
get_ip
------
diff --git a/docs/contributing/dev-setup.rst b/docs/contributing/dev-setup.rst
--- a/docs/contributing/dev-setup.rst
+++ b/docs/contributing/dev-setup.rst
@@ -47,6 +47,17 @@ Followed by::
nix-channel --update
+Install required binaries
+-------------------------
+
+We need some handy tools first.
+
+run::
+
+ nix-env -i nix-prefetch-hg
+ nix-env -i nix-prefetch-git
+
+
Clone the required repositories
-------------------------------
@@ -64,6 +75,21 @@ To do this, use the following example::
via support@rhodecode.com
+Install some required libraries
+-------------------------------
+
+There are some required drivers that we need to install to test RhodeCode
+under different types of databases. For example in Ubuntu we need to install
+the following.
+
+required libraries::
+
+ sudo apt-get install libapr1-dev libaprutil1-dev
+ sudo apt-get install libsvn-dev
+ sudo apt-get install mysql-server libmysqlclient-dev
+ sudo apt-get install postgresql postgresql-contrib libpq-dev
+ sudo apt-get install libcurl4-openssl-dev
+
Enter the Development Shell
---------------------------
diff --git a/docs/release-notes/release-notes-4.6.0.rst b/docs/release-notes/release-notes-4.6.0.rst
new file mode 100644
--- /dev/null
+++ b/docs/release-notes/release-notes-4.6.0.rst
@@ -0,0 +1,158 @@
+|RCE| 4.6.0 |RNS|
+-----------------
+
+Release Date
+^^^^^^^^^^^^
+
+- 2017-02-03
+
+
+New Features
+^^^^^^^^^^^^
+
+- Pull requests: introduced versioning for pull requests.
+ Each update of pull requests creates and exposes a new version of it.
+ Users can navigate each version to show the previous state of pull request, or
+ generate diffs between versions to show what changed since the last update.
+ Also on each update attached comments are pinned to versions, so users can
+ tell at which state particular comment was made.
+ Various UI/UX fixes on PR page.
+
+- Pull requests: introduced new merge-checks.
+ Merge checks show nicer UI for the status of merge approval.
+ Merge checks now also forbid a merge if TODO notes are present.
+ Submitting a status will auto-refresh merge checks, it means that it's no
+ longer required to re-load diff to merge a PR.
+ Same logic is now used for API, pre-conditions on show, and checks on
+ actual merge API call.
+
+- Code review: approval state is now bound to pull request versioning. Users
+ can track their last approval and only show changes of pull requests between
+ their last approval and latest state.
+- Code review: inline and main comments have now two types. a `note` and `todo`.
+ unresolved TODO comments show up in pull requests or commit view.
+ Unresolved TODO also prevents a PR from being merged.
+- Code review: added navigation on outdated comments.
+
+- Diffs: compare mode overhaul.
+ Made compare and commit range pages more consistent with other commit
+ diff pages. Old diff2way is replaced by new diffs with side-by-side
+ mode, and it also removes mergerly. Cleanup button behaviour on the compare
+ page. Switched file-diffs to use the compare page with file filter.
+ Added collapse/expand commits buttons in compare views. Generally improved UX.
+- Diffs: added a wide-mode button to expand large diffs.
+
+- Comments: an overhaul of comments forms. Adjust them for new comment types and
+ resolution comments.
+- Comments: replaced a ctrl+space commands with slash commands. This becomes
+ more standardized and easier to use.
+
+- Changelog: added load more anchors into changelog view.
+ Users in changelog can now load comments via ajax and extend the data
+ set to show more than 100 commits. This also re-renders the graph. So it's
+ possible to show 1000s of commits in an efficient way with the DAG graph.
+
+- User sessions: added interface to show, and cleanup user auth sessions.
+ It's possible to show, and clean obsolete sessions. Also a cleanup of all
+ sessions option were added to completely log-out all users from the system.
+
+- Integrations: webhook integration have now additional setting to choose if
+ the call should be made with POST or GET.
+
+- API: get_repos call now allows to filter returned data by specifying a start
+ root location. Additionally, a traverse flag was added to define if returned
+ data should be only from top-level or recursive.
+- API: comment_type (`note` or `todo`) for comment API.
+- API: added comment_resolved_id into comments API to resolve TODO notes.
+
+
+General
+^^^^^^^
+
+- Api: comment_pull_request, added commit_id parameter to validate status
+ changed on particular commit. In case users set status on the commit
+ which is not current valid head this API call won't change the status anymore.
+- Channelstream: added testing panel for live notifications.
+- Authentication: disable password change form for accounts that are not
+ managed by RhodeCode, in the case of external accounts such as LDAP/oAuth,
+ password reset doesn't make sense.
+- Core: let pyramid handle tracebacks for all exceptions.
+ Otherwise, we'll miss exception caused in pure pyramid views.
+- Vcs server: expose remote tracebacks from HTTP backend using
+ the Pyro4AwareFormatter. This will now in most cases propagate VCSServer
+ exception into Enterprise logs for easier tracking of errors
+- Ishell: updated code with latest iShell changes.
+- Svn: generate HTTP downgrade via the auto-generated config. This allows
+ a HTTPs/HTTP configuration with SVN.
+- Dependencies: bumped various pytest related libraries to latest versions.
+- Dependencies: bumped gevent to 1.1.2 and greenlet to 0.4.10 versions.
+- Dependencies: bumped msgpack to version 0.4.8.
+- Dependencies: bumped supervisor to 3.3.1 version.
+- Dependencies: bumped Whoosh to version 2.7.4.
+- Dependencies: bumped Markdown library to 2.6.7
+- Dependencies: bumped mako templates to 1.0.6
+- Dependencies: bumped waitress version to 1.0.1
+- Dependencies: bumped pygments to 2.2.0
+- dependencies: bumped Mercurial version to 4.0.2
+- dependencies: bumped git version to 2.9.3
+
+
+Security
+^^^^^^^^
+
+- Login: Don't display partial password helper hash inside the logs.
+ The information is not-required and will prevent people worrying about this
+ shown in logs.
+- Auth: use pyramid HTTP exception when detecting CSRF errors. It helps
+ catching this error by our error handler and displaying it nicely to users.
+- SVN: hide password entries in logs using specially generated configuration
+ for Apache Mod-Dav
+- Permissions: fixed call to correctly check permissions for admin, before admin
+ users were ban deleting of pull requests in certain conditions.
+
+
+Performance
+^^^^^^^^^^^
+
+- Markup renderer: use global Markdown object to speed up markdown rendering.
+ We'll skip heavy initialization on each render thanks to this.
+- Diffs: optimize how lexer is fetched for rich highlight mode.
+ Speeds up initial diff creation significantly since lexer cache is re used
+ and we don't need to fetch lexer many times.
+- VCS: do an early detection of vcs-type request.
+ In case we're handling a VCS request, we can skip some of the pylons
+ stack initialization, speeding the request processing.
+
+
+Fixes
+^^^^^
+
+- Code review: render outdated comments that don't fit current context.
+ Comments attached to files that were removed from pull-request now will also
+ properly show up.
+- Markup renderer: don't render plaintext files as RST. This prevents plain
+ Readme files have been wrongly rendered.
+- VCS: raise a better exception if file node history cannot be extracted.
+ Helps to trace corrupted repositories.
+- Exception handling: nicer error catching on repository creation.
+- Fixed excessive number of session object creation. There should be now a
+ significant reduction in new file or DB entries created for sessions.
+- Core: remove global timezone hook from tests. This was leaking into main
+ application causing TZ problems (such as UTC log dates).
+- Pull requests: wait for all dynamic checks before enabling opening a PR.
+ This ensures that all code analysis were run before users are allowed to open
+ a pull request.
+- i18n: use a consistent way of setting user language.
+- API: added merge checks into API because it was not validated before and could
+ return an error if the merge wasn't possible for some reason.
+- VCSServer: fetch proper locale before defaulting to default. Prevents
+ errors on some machines that don't have locales set.
+- VCSServer: fixed 500 error if the wrong URL on HTTP mode vcsserver was accessed.
+
+
+Upgrade notes
+^^^^^^^^^^^^^
+
+- Integrations: since new POST/GET option was added to integrations, users
+ are advised to optionally check Webhooks integrations and pick one.
+ (default is still POST)
\ No newline at end of file
diff --git a/docs/release-notes/release-notes.rst b/docs/release-notes/release-notes.rst
--- a/docs/release-notes/release-notes.rst
+++ b/docs/release-notes/release-notes.rst
@@ -9,6 +9,7 @@ Release Notes
.. toctree::
:maxdepth: 1
+ release-notes-4.6.0.rst
release-notes-4.5.2.rst
release-notes-4.5.1.rst
release-notes-4.5.0.rst
diff --git a/grunt_config.json b/grunt_config.json
--- a/grunt_config.json
+++ b/grunt_config.json
@@ -68,6 +68,7 @@
"<%= dirs.js.src %>/rhodecode/utils/os.js",
"<%= dirs.js.src %>/rhodecode/utils/topics.js",
"<%= dirs.js.src %>/rhodecode/init.js",
+ "<%= dirs.js.src %>/rhodecode/changelog.js",
"<%= dirs.js.src %>/rhodecode/codemirror.js",
"<%= dirs.js.src %>/rhodecode/comments.js",
"<%= dirs.js.src %>/rhodecode/constants.js",
diff --git a/pkgs/patch-rhodecode-tools-setup.diff b/pkgs/patch-rhodecode-tools-setup.diff
deleted file mode 100644
--- a/pkgs/patch-rhodecode-tools-setup.diff
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/requirements.txt b/requirements.txt
---- a/requirements.txt
-+++ b/requirements.txt
-@@ -3,7 +3,7 @@ future==0.14.3
- six==1.9.0
- mako==1.0.1
- markupsafe==0.23
--requests==2.5.1
-+requests
- whoosh==2.7.0
- elasticsearch==2.3.0
- elasticsearch-dsl==2.0.0
\ No newline at end of file
diff --git a/pkgs/python-packages-overrides.nix b/pkgs/python-packages-overrides.nix
--- a/pkgs/python-packages-overrides.nix
+++ b/pkgs/python-packages-overrides.nix
@@ -100,11 +100,7 @@ self: super: {
});
py-gfm = super.py-gfm.override {
- src = pkgs.fetchgit {
- url = "https://code.rhodecode.com/upstream/py-gfm";
- rev = "0d66a19bc16e3d49de273c0f797d4e4781e8c0f2";
- sha256 = "0ryp74jyihd3ckszq31bml5jr3bciimhfp7va7kw6ld92930ksv3";
- };
+ name = "py-gfm-0.1.3.rhodecode-upstream1";
};
pycurl = super.pycurl.override (attrs: {
@@ -123,12 +119,7 @@ self: super: {
});
Pylons = super.Pylons.override (attrs: {
- name = "Pylons-1.0.1-patch1";
- src = pkgs.fetchgit {
- url = "https://code.rhodecode.com/upstream/pylons";
- rev = "707354ee4261b9c10450404fc9852ccea4fd667d";
- sha256 = "b2763274c2780523a335f83a1df65be22ebe4ff413a7bc9e9288d23c1f62032e";
- };
+ name = "Pylons-1.0.2.rhodecode-patch1";
});
pyramid = super.pyramid.override (attrs: {
@@ -149,16 +140,6 @@ self: super: {
};
});
- Pyro4 = super.Pyro4.override (attrs: {
- # TODO: Was not able to generate this version, needs further
- # investigation.
- name = "Pyro4-4.35";
- src = pkgs.fetchurl {
- url = "https://pypi.python.org/packages/source/P/Pyro4/Pyro4-4.35.src.tar.gz";
- md5 = "cbe6cb855f086a0f092ca075005855f3";
- };
- });
-
pysqlite = super.pysqlite.override (attrs: {
propagatedBuildInputs = [
pkgs.sqlite
@@ -202,12 +183,6 @@ self: super: {
'';
});
- rhodecode-tools = super.rhodecode-tools.override (attrs: {
- patches = [
- ./patch-rhodecode-tools-setup.diff
- ];
- });
-
URLObject = super.URLObject.override (attrs: {
meta = {
license = {
diff --git a/pkgs/python-packages.nix b/pkgs/python-packages.nix
--- a/pkgs/python-packages.nix
+++ b/pkgs/python-packages.nix
@@ -81,26 +81,26 @@
};
};
Mako = super.buildPythonPackage {
- name = "Mako-1.0.1";
+ name = "Mako-1.0.6";
buildInputs = with self; [];
doCheck = false;
propagatedBuildInputs = with self; [MarkupSafe];
src = fetchurl {
- url = "https://pypi.python.org/packages/8e/a4/aa56533ecaa5f22ca92428f74e074d0c9337282933c722391902c8f9e0f8/Mako-1.0.1.tar.gz";
- md5 = "9f0aafd177b039ef67b90ea350497a54";
+ url = "https://pypi.python.org/packages/56/4b/cb75836863a6382199aefb3d3809937e21fa4cb0db15a4f4ba0ecc2e7e8e/Mako-1.0.6.tar.gz";
+ md5 = "a28e22a339080316b2acc352b9ee631c";
};
meta = {
license = [ pkgs.lib.licenses.mit ];
};
};
Markdown = super.buildPythonPackage {
- name = "Markdown-2.6.2";
+ name = "Markdown-2.6.7";
buildInputs = with self; [];
doCheck = false;
propagatedBuildInputs = with self; [];
src = fetchurl {
- url = "https://pypi.python.org/packages/62/8b/83658b5f6c220d5fcde9f9852d46ea54765d734cfbc5a9f4c05bfc36db4d/Markdown-2.6.2.tar.gz";
- md5 = "256d19afcc564dc4ce4c229bb762f7ae";
+ url = "https://pypi.python.org/packages/48/a4/fc6b002789c2239ac620ca963694c95b8f74e4747769cdf6021276939e74/Markdown-2.6.7.zip";
+ md5 = "632710a7474bbb74a82084392251061f";
};
meta = {
license = [ pkgs.lib.licenses.bsdOriginal ];
@@ -133,13 +133,13 @@
};
};
Paste = super.buildPythonPackage {
- name = "Paste-2.0.2";
+ name = "Paste-2.0.3";
buildInputs = with self; [];
doCheck = false;
propagatedBuildInputs = with self; [six];
src = fetchurl {
- url = "https://pypi.python.org/packages/d5/8d/0f8ac40687b97ff3e07ebd1369be20bdb3f93864d2dc3c2ff542edb4ce50/Paste-2.0.2.tar.gz";
- md5 = "4bfc8a7eaf858f6309d2ac0f40fc951c";
+ url = "https://pypi.python.org/packages/30/c3/5c2f7c7a02e4f58d4454353fa1c32c94f79fa4e36d07a67c0ac295ea369e/Paste-2.0.3.tar.gz";
+ md5 = "1231e14eae62fa7ed76e9130b04bc61e";
};
meta = {
license = [ pkgs.lib.licenses.mit ];
@@ -172,26 +172,26 @@
};
};
Pygments = super.buildPythonPackage {
- name = "Pygments-2.1.3";
+ name = "Pygments-2.2.0";
buildInputs = with self; [];
doCheck = false;
propagatedBuildInputs = with self; [];
src = fetchurl {
- url = "https://pypi.python.org/packages/b8/67/ab177979be1c81bc99c8d0592ef22d547e70bb4c6815c383286ed5dec504/Pygments-2.1.3.tar.gz";
- md5 = "ed3fba2467c8afcda4d317e4ef2c6150";
+ url = "https://pypi.python.org/packages/71/2a/2e4e77803a8bd6408a2903340ac498cb0a2181811af7c9ec92cb70b0308a/Pygments-2.2.0.tar.gz";
+ md5 = "13037baca42f16917cbd5ad2fab50844";
};
meta = {
license = [ pkgs.lib.licenses.bsdOriginal ];
};
};
Pylons = super.buildPythonPackage {
- name = "Pylons-1.0.1";
+ name = "Pylons-1.0.2.dev20161213";
buildInputs = with self; [];
doCheck = false;
propagatedBuildInputs = with self; [Routes WebHelpers Beaker Paste PasteDeploy PasteScript FormEncode simplejson decorator nose Mako WebError WebTest Tempita MarkupSafe WebOb];
src = fetchurl {
- url = "https://pypi.python.org/packages/a2/69/b835a6bad00acbfeed3f33c6e44fa3f936efc998c795bfb15c61a79ecf62/Pylons-1.0.1.tar.gz";
- md5 = "6cb880d75fa81213192142b07a6e4915";
+ url = "https://code.rhodecode.com/upstream/pylons/archive/707354ee4261b9c10450404fc9852ccea4fd667d.tar.gz?md5=f26633726fa2cd3a340316ee6a5d218f";
+ md5 = "f26633726fa2cd3a340316ee6a5d218f";
};
meta = {
license = [ pkgs.lib.licenses.bsdOriginal ];
@@ -341,13 +341,13 @@
};
};
Whoosh = super.buildPythonPackage {
- name = "Whoosh-2.7.0";
+ name = "Whoosh-2.7.4";
buildInputs = with self; [];
doCheck = false;
propagatedBuildInputs = with self; [];
src = fetchurl {
- url = "https://pypi.python.org/packages/1c/dc/2f0231ff3875ded36df8c1ab851451e51a237dc0e5a86d3d96036158da94/Whoosh-2.7.0.zip";
- md5 = "7abfd970f16fadc7311960f3fa0bc7a9";
+ url = "https://pypi.python.org/packages/25/2b/6beed2107b148edc1321da0d489afc4617b9ed317ef7b72d4993cad9b684/Whoosh-2.7.4.tar.gz";
+ md5 = "c2710105f20b3e29936bd2357383c325";
};
meta = {
license = [ pkgs.lib.licenses.bsdOriginal pkgs.lib.licenses.bsd2 ];
@@ -639,19 +639,6 @@
license = [ pkgs.lib.licenses.bsdOriginal ];
};
};
- dulwich = super.buildPythonPackage {
- name = "dulwich-0.12.0";
- buildInputs = with self; [];
- doCheck = false;
- propagatedBuildInputs = with self; [];
- src = fetchurl {
- url = "https://pypi.python.org/packages/6f/04/fbe561b6d45c0ec758330d5b7f5ba4b6cb4f1ca1ab49859d2fc16320da75/dulwich-0.12.0.tar.gz";
- md5 = "f3a8a12bd9f9dd8c233e18f3d49436fa";
- };
- meta = {
- license = [ pkgs.lib.licenses.gpl2Plus ];
- };
- };
ecdsa = super.buildPythonPackage {
name = "ecdsa-0.11";
buildInputs = with self; [];
@@ -679,13 +666,13 @@
};
};
elasticsearch-dsl = super.buildPythonPackage {
- name = "elasticsearch-dsl-2.0.0";
+ name = "elasticsearch-dsl-2.2.0";
buildInputs = with self; [];
doCheck = false;
propagatedBuildInputs = with self; [six python-dateutil elasticsearch];
src = fetchurl {
- url = "https://pypi.python.org/packages/4e/5d/e788ae8dbe2ff4d13426db0a027533386a5c276c77a2654dc0e2007ce04a/elasticsearch-dsl-2.0.0.tar.gz";
- md5 = "4cdfec81bb35383dd3b7d02d7dc5ee68";
+ url = "https://pypi.python.org/packages/66/2f/52a086968788e58461641570f45c3207a52d46ebbe9b77dc22b6a8ffda66/elasticsearch-dsl-2.2.0.tar.gz";
+ md5 = "fa6bd3c87ea3caa8f0f051bc37c53221";
};
meta = {
license = [ pkgs.lib.licenses.asl20 ];
@@ -731,13 +718,13 @@
};
};
gevent = super.buildPythonPackage {
- name = "gevent-1.1.1";
+ name = "gevent-1.1.2";
buildInputs = with self; [];
doCheck = false;
propagatedBuildInputs = with self; [greenlet];
src = fetchurl {
- url = "https://pypi.python.org/packages/12/dc/0b2e57823225de86f6e111a65d212c9e3b64847dddaa19691a6cb94b0b2e/gevent-1.1.1.tar.gz";
- md5 = "1532f5396ab4d07a231f1935483be7c3";
+ url = "https://pypi.python.org/packages/43/8f/cb3224a0e6ab663547f45c10d0651cfd52633fde4283bf68d627084df8cc/gevent-1.1.2.tar.gz";
+ md5 = "bb32a2f852a4997138014d5007215c6e";
};
meta = {
license = [ pkgs.lib.licenses.mit ];
@@ -757,26 +744,26 @@
};
};
gprof2dot = super.buildPythonPackage {
- name = "gprof2dot-2015.12.1";
+ name = "gprof2dot-2016.10.13";
buildInputs = with self; [];
doCheck = false;
propagatedBuildInputs = with self; [];
src = fetchurl {
- url = "https://pypi.python.org/packages/b9/34/7bf93c1952d40fa5c95ad963f4d8344b61ef58558632402eca18e6c14127/gprof2dot-2015.12.1.tar.gz";
- md5 = "e23bf4e2f94db032750c193384b4165b";
+ url = "https://pypi.python.org/packages/a0/e0/73c71baed306f0402a00a94ffc7b2be94ad1296dfcb8b46912655b93154c/gprof2dot-2016.10.13.tar.gz";
+ md5 = "0125401f15fd2afe1df686a76c64a4fd";
};
meta = {
license = [ { fullName = "LGPL"; } ];
};
};
greenlet = super.buildPythonPackage {
- name = "greenlet-0.4.9";
+ name = "greenlet-0.4.10";
buildInputs = with self; [];
doCheck = false;
propagatedBuildInputs = with self; [];
src = fetchurl {
- url = "https://pypi.python.org/packages/4e/3d/9d421539b74e33608b245092870156b2e171fb49f2b51390aa4641eecb4a/greenlet-0.4.9.zip";
- md5 = "c6659cdb2a5e591723e629d2eef22e82";
+ url = "https://pypi.python.org/packages/67/62/ca2a95648666eaa2ffeb6a9b3964f21d419ae27f82f2e66b53da5b943fc4/greenlet-0.4.10.zip";
+ md5 = "bed0c4b3b896702131f4d5c72f87c41d";
};
meta = {
license = [ pkgs.lib.licenses.mit ];
@@ -939,13 +926,13 @@
};
};
msgpack-python = super.buildPythonPackage {
- name = "msgpack-python-0.4.6";
+ name = "msgpack-python-0.4.8";
buildInputs = with self; [];
doCheck = false;
propagatedBuildInputs = with self; [];
src = fetchurl {
- url = "https://pypi.python.org/packages/15/ce/ff2840885789ef8035f66cd506ea05bdb228340307d5e71a7b1e3f82224c/msgpack-python-0.4.6.tar.gz";
- md5 = "8b317669314cf1bc881716cccdaccb30";
+ url = "https://pypi.python.org/packages/21/27/8a1d82041c7a2a51fcc73675875a5f9ea06c2663e02fcfeb708be1d081a0/msgpack-python-0.4.8.tar.gz";
+ md5 = "dcd854fb41ee7584ebbf35e049e6be98";
};
meta = {
license = [ pkgs.lib.licenses.asl20 ];
@@ -1108,13 +1095,13 @@
};
};
py = super.buildPythonPackage {
- name = "py-1.4.29";
+ name = "py-1.4.31";
buildInputs = with self; [];
doCheck = false;
propagatedBuildInputs = with self; [];
src = fetchurl {
- url = "https://pypi.python.org/packages/2a/bc/a1a4a332ac10069b8e5e25136a35e08a03f01fd6ab03d819889d79a1fd65/py-1.4.29.tar.gz";
- md5 = "c28e0accba523a29b35a48bb703fb96c";
+ url = "https://pypi.python.org/packages/f4/9a/8dfda23f36600dd701c6722316ba8a3ab4b990261f83e7d3ffc6dfedf7ef/py-1.4.31.tar.gz";
+ md5 = "5d2c63c56dc3f2115ec35c066ecd582b";
};
meta = {
license = [ pkgs.lib.licenses.mit ];
@@ -1139,8 +1126,8 @@
doCheck = false;
propagatedBuildInputs = with self; [setuptools Markdown];
src = fetchurl {
- url = "https://pypi.python.org/packages/12/e4/6b3d8678da04f97d7490d8264d8de51c2dc9fb91209ccee9c515c95e14c5/py-gfm-0.1.3.tar.gz";
- md5 = "e588d9e69640a241b97e2c59c22527a6";
+ url = "https://code.rhodecode.com/upstream/py-gfm/archive/0d66a19bc16e3d49de273c0f797d4e4781e8c0f2.tar.gz?md5=0d0d5385bfb629eea636a80b9c2bfd16";
+ md5 = "0d0d5385bfb629eea636a80b9c2bfd16";
};
meta = {
license = [ pkgs.lib.licenses.bsdOriginal ];
@@ -1290,13 +1277,13 @@
};
};
pytest = super.buildPythonPackage {
- name = "pytest-2.8.5";
+ name = "pytest-3.0.5";
buildInputs = with self; [];
doCheck = false;
propagatedBuildInputs = with self; [py];
src = fetchurl {
- url = "https://pypi.python.org/packages/b1/3d/d7ea9b0c51e0cacded856e49859f0a13452747491e842c236bbab3714afe/pytest-2.8.5.zip";
- md5 = "8493b06f700862f1294298d6c1b715a9";
+ url = "https://pypi.python.org/packages/a8/87/b7ca49efe52d2b4169f2bfc49aa5e384173c4619ea8e635f123a0dac5b75/pytest-3.0.5.tar.gz";
+ md5 = "cefd527b59332688bf5db4a10aa8a7cb";
};
meta = {
license = [ pkgs.lib.licenses.mit ];
@@ -1316,52 +1303,65 @@
};
};
pytest-cov = super.buildPythonPackage {
- name = "pytest-cov-1.8.1";
+ name = "pytest-cov-2.4.0";
buildInputs = with self; [];
doCheck = false;
- propagatedBuildInputs = with self; [py pytest coverage cov-core];
+ propagatedBuildInputs = with self; [pytest coverage];
src = fetchurl {
- url = "https://pypi.python.org/packages/11/4b/b04646e97f1721878eb21e9f779102d84dd044d324382263b1770a3e4838/pytest-cov-1.8.1.tar.gz";
- md5 = "76c778afa2494088270348be42d759fc";
+ url = "https://pypi.python.org/packages/00/c0/2bfd1fcdb9d407b8ac8185b1cb5ff458105c6b207a9a7f0e13032de9828f/pytest-cov-2.4.0.tar.gz";
+ md5 = "2fda09677d232acc99ec1b3c5831e33f";
};
meta = {
- license = [ pkgs.lib.licenses.mit ];
+ license = [ pkgs.lib.licenses.bsdOriginal pkgs.lib.licenses.mit ];
};
};
pytest-profiling = super.buildPythonPackage {
- name = "pytest-profiling-1.0.1";
+ name = "pytest-profiling-1.2.2";
buildInputs = with self; [];
doCheck = false;
propagatedBuildInputs = with self; [six pytest gprof2dot];
src = fetchurl {
- url = "https://pypi.python.org/packages/d8/67/8ffab73406e22870e07fa4dc8dce1d7689b26dba8efd00161c9b6fc01ec0/pytest-profiling-1.0.1.tar.gz";
- md5 = "354404eb5b3fd4dc5eb7fffbb3d9b68b";
+ url = "https://pypi.python.org/packages/73/e8/804681323bac0bc45c520ec34185ba8469008942266d0074699b204835c1/pytest-profiling-1.2.2.tar.gz";
+ md5 = "0a16d7dda2d23b91e9730fa4558cf728";
};
meta = {
license = [ pkgs.lib.licenses.mit ];
};
};
pytest-runner = super.buildPythonPackage {
- name = "pytest-runner-2.7.1";
+ name = "pytest-runner-2.9";
buildInputs = with self; [];
doCheck = false;
propagatedBuildInputs = with self; [];
src = fetchurl {
- url = "https://pypi.python.org/packages/99/6b/c4ff4418d3424d4475b7af60724fd4a5cdd91ed8e489dc9443281f0052bc/pytest-runner-2.7.1.tar.gz";
- md5 = "e56f0bc8d79a6bd91772b44ef4215c7e";
+ url = "https://pypi.python.org/packages/11/d4/c335ddf94463e451109e3494e909765c3e5205787b772e3b25ee8601b86a/pytest-runner-2.9.tar.gz";
+ md5 = "2212a2e34404b0960b2fdc2c469247b2";
};
meta = {
license = [ pkgs.lib.licenses.mit ];
};
};
+ pytest-sugar = super.buildPythonPackage {
+ name = "pytest-sugar-0.7.1";
+ buildInputs = with self; [];
+ doCheck = false;
+ propagatedBuildInputs = with self; [pytest termcolor];
+ src = fetchurl {
+ url = "https://pypi.python.org/packages/03/97/05d988b4fa870e7373e8ee4582408543b9ca2bd35c3c67b569369c6f9c49/pytest-sugar-0.7.1.tar.gz";
+ md5 = "7400f7c11f3d572b2c2a3b60352d35fe";
+ };
+ meta = {
+ license = [ pkgs.lib.licenses.bsdOriginal ];
+ };
+ };
pytest-timeout = super.buildPythonPackage {
- name = "pytest-timeout-0.4";
+ name = "pytest-timeout-1.2.0";
buildInputs = with self; [];
doCheck = false;
propagatedBuildInputs = with self; [pytest];
src = fetchurl {
- url = "https://pypi.python.org/packages/24/48/5f6bd4b8026a26e1dd427243d560a29a0f1b24a5c7cffca4bf049a7bb65b/pytest-timeout-0.4.tar.gz";
- md5 = "03b28aff69cbbfb959ed35ade5fde262";
+ url = "https://pypi.python.org/packages/cc/b7/b2a61365ea6b6d2e8881360ae7ed8dad0327ad2df89f2f0be4a02304deb2/pytest-timeout-1.2.0.tar.gz";
+ md5 = "83607d91aa163562c7ee835da57d061d";
};
meta = {
license = [ pkgs.lib.licenses.mit { fullName = "DFSG approved"; } ];
@@ -1498,36 +1498,36 @@
};
};
rhodecode-enterprise-ce = super.buildPythonPackage {
- name = "rhodecode-enterprise-ce-4.5.2";
- buildInputs = with self; [WebTest configobj cssselect lxml mock pytest pytest-cov pytest-runner pytest-sugar];
+ name = "rhodecode-enterprise-ce-4.6.0";
+ buildInputs = with self; [pytest py pytest-cov pytest-sugar pytest-runner pytest-catchlog pytest-profiling gprof2dot pytest-timeout mock WebTest cov-core coverage cssselect lxml configobj];
doCheck = true;
propagatedBuildInputs = with self; [Babel Beaker FormEncode Mako Markdown MarkupSafe MySQL-python Paste PasteDeploy PasteScript Pygments pygments-markdown-lexer Pylons Pyro4 Routes SQLAlchemy Tempita URLObject WebError WebHelpers WebHelpers2 WebOb WebTest Whoosh alembic amqplib anyjson appenlight-client authomatic backport-ipaddress celery channelstream colander decorator deform docutils gevent gunicorn infrae.cache ipython iso8601 kombu msgpack-python packaging psycopg2 py-gfm pycrypto pycurl pyparsing pyramid pyramid-debugtoolbar pyramid-mako pyramid-beaker pysqlite python-dateutil python-ldap python-memcached python-pam recaptcha-client repoze.lru requests simplejson subprocess32 waitress zope.cachedescriptors dogpile.cache dogpile.core psutil py-bcrypt];
src = ./.;
meta = {
- license = [ { fullName = "AGPLv3, and Commercial License"; } ];
+ license = [ { fullName = "Affero GNU General Public License v3 or later (AGPLv3+)"; } { fullName = "AGPLv3, and Commercial License"; } ];
};
};
rhodecode-tools = super.buildPythonPackage {
- name = "rhodecode-tools-0.10.2";
+ name = "rhodecode-tools-0.11.0";
buildInputs = with self; [];
doCheck = false;
- propagatedBuildInputs = with self; [click future six Mako MarkupSafe requests Whoosh elasticsearch elasticsearch-dsl urllib3];
+ propagatedBuildInputs = with self; [click future six Mako MarkupSafe requests elasticsearch elasticsearch-dsl urllib3 Whoosh];
src = fetchurl {
- url = "https://code.rhodecode.com/rhodecode-tools-ce/archive/v0.10.2.zip";
- md5 = "d2af3985a1a32a678944d4d48870cb04";
+ url = "https://code.rhodecode.com/rhodecode-tools-ce/archive/v0.11.0.tar.gz?md5=e5fd0a8363af08a0ced71b50ca9cce15";
+ md5 = "e5fd0a8363af08a0ced71b50ca9cce15";
};
meta = {
license = [ { fullName = "AGPLv3 and Proprietary"; } ];
};
};
serpent = super.buildPythonPackage {
- name = "serpent-1.12";
+ name = "serpent-1.15";
buildInputs = with self; [];
doCheck = false;
propagatedBuildInputs = with self; [];
src = fetchurl {
- url = "https://pypi.python.org/packages/3b/19/1e0e83b47c09edaef8398655088036e7e67386b5c48770218ebb339fbbd5/serpent-1.12.tar.gz";
- md5 = "05869ac7b062828b34f8f927f0457b65";
+ url = "https://pypi.python.org/packages/7b/38/b2b27673a882ff2ea5871bb3e3e6b496ebbaafd1612e51990ffb158b9254/serpent-1.15.tar.gz";
+ md5 = "e27b1aad5c218e16442f52abb7c7053a";
};
meta = {
license = [ pkgs.lib.licenses.mit ];
@@ -1547,26 +1547,26 @@
};
};
setuptools = super.buildPythonPackage {
- name = "setuptools-20.8.1";
+ name = "setuptools-30.1.0";
buildInputs = with self; [];
doCheck = false;
propagatedBuildInputs = with self; [];
src = fetchurl {
- url = "https://pypi.python.org/packages/c4/19/c1bdc88b53da654df43770f941079dbab4e4788c2dcb5658fb86259894c7/setuptools-20.8.1.zip";
- md5 = "fe58a5cac0df20bb83942b252a4b0543";
+ url = "https://pypi.python.org/packages/1e/43/002c8616db9a3e7be23c2556e39b90a32bb40ba0dc652de1999d5334d372/setuptools-30.1.0.tar.gz";
+ md5 = "cac497f42e5096ac8df29e38d3f81c3e";
};
meta = {
license = [ pkgs.lib.licenses.mit ];
};
};
setuptools-scm = super.buildPythonPackage {
- name = "setuptools-scm-1.11.0";
+ name = "setuptools-scm-1.15.0";
buildInputs = with self; [];
doCheck = false;
propagatedBuildInputs = with self; [];
src = fetchurl {
- url = "https://pypi.python.org/packages/cd/5f/e3a038292358058d83d764a47d09114aa5a8003ed4529518f9e580f1a94f/setuptools_scm-1.11.0.tar.gz";
- md5 = "4c5c896ba52e134bbc3507bac6400087";
+ url = "https://pypi.python.org/packages/80/b7/31b6ae5fcb188e37f7e31abe75f9be90490a5456a72860fa6e643f8a3cbc/setuptools_scm-1.15.0.tar.gz";
+ md5 = "b6916c78ed6253d6602444fad4279c5b";
};
meta = {
license = [ pkgs.lib.licenses.mit ];
@@ -1625,18 +1625,31 @@
};
};
supervisor = super.buildPythonPackage {
- name = "supervisor-3.3.0";
+ name = "supervisor-3.3.1";
buildInputs = with self; [];
doCheck = false;
propagatedBuildInputs = with self; [meld3];
src = fetchurl {
- url = "https://pypi.python.org/packages/44/80/d28047d120bfcc8158b4e41127706731ee6a3419c661e0a858fb0e7c4b2d/supervisor-3.3.0.tar.gz";
- md5 = "46bac00378d1eddb616752b990c67416";
+ url = "https://pypi.python.org/packages/80/37/964c0d53cbd328796b1aeb7abea4c0f7b0e8c7197ea9b0b9967b7d004def/supervisor-3.3.1.tar.gz";
+ md5 = "202f760f9bf4930ec06557bac73e5cf2";
};
meta = {
license = [ { fullName = "BSD-derived (http://www.repoze.org/LICENSE.txt)"; } ];
};
};
+ termcolor = super.buildPythonPackage {
+ name = "termcolor-1.1.0";
+ buildInputs = with self; [];
+ doCheck = false;
+ propagatedBuildInputs = with self; [];
+ src = fetchurl {
+ url = "https://pypi.python.org/packages/8a/48/a76be51647d0eb9f10e2a4511bf3ffb8cc1e6b14e9e4fab46173aa79f981/termcolor-1.1.0.tar.gz";
+ md5 = "043e89644f8909d462fbbfa511c768df";
+ };
+ meta = {
+ license = [ pkgs.lib.licenses.mit ];
+ };
+ };
traitlets = super.buildPythonPackage {
name = "traitlets-4.3.1";
buildInputs = with self; [];
@@ -1729,13 +1742,13 @@
};
};
waitress = super.buildPythonPackage {
- name = "waitress-0.8.9";
+ name = "waitress-1.0.1";
buildInputs = with self; [];
doCheck = false;
- propagatedBuildInputs = with self; [setuptools];
+ propagatedBuildInputs = with self; [];
src = fetchurl {
- url = "https://pypi.python.org/packages/ee/65/fc9dee74a909a1187ca51e4f15ad9c4d35476e4ab5813f73421505c48053/waitress-0.8.9.tar.gz";
- md5 = "da3f2e62b3676be5dd630703a68e2a04";
+ url = "https://pypi.python.org/packages/78/7d/84d11b96c3f60164dec3bef4a859a03aeae0231aa93f57fbe0d05fa4ff36/waitress-1.0.1.tar.gz";
+ md5 = "dda92358a7569669086155923a46e57c";
};
meta = {
license = [ pkgs.lib.licenses.zpt21 ];
@@ -1835,30 +1848,5 @@
### Test requirements
- pytest-sugar = super.buildPythonPackage {
- name = "pytest-sugar-0.7.1";
- buildInputs = with self; [];
- doCheck = false;
- propagatedBuildInputs = with self; [pytest termcolor];
- src = fetchurl {
- url = "https://pypi.python.org/packages/03/97/05d988b4fa870e7373e8ee4582408543b9ca2bd35c3c67b569369c6f9c49/pytest-sugar-0.7.1.tar.gz";
- md5 = "7400f7c11f3d572b2c2a3b60352d35fe";
- };
- meta = {
- license = [ pkgs.lib.licenses.bsdOriginal ];
- };
- };
- termcolor = super.buildPythonPackage {
- name = "termcolor-1.1.0";
- buildInputs = with self; [];
- doCheck = false;
- propagatedBuildInputs = with self; [];
- src = fetchurl {
- url = "https://pypi.python.org/packages/8a/48/a76be51647d0eb9f10e2a4511bf3ffb8cc1e6b14e9e4fab46173aa79f981/termcolor-1.1.0.tar.gz";
- md5 = "043e89644f8909d462fbbfa511c768df";
- };
- meta = {
- license = [ pkgs.lib.licenses.mit ];
- };
- };
+
}
diff --git a/requirements.txt b/requirements.txt
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,150 +1,131 @@
-Babel==1.3
-Beaker==1.7.0
-Chameleon==2.24
-CProfileV==1.0.6
-FormEncode==1.2.4
-Jinja2==2.7.3
-Mako==1.0.1
-Markdown==2.6.2
-MarkupSafe==0.23
-MySQL-python==1.2.5
-Paste==2.0.2
-PasteDeploy==1.5.2
-PasteScript==1.7.5
-Pygments==2.1.3
-pygments-markdown-lexer==0.1.0.dev39
-
-# TODO: This version is not available on PyPI
-# Pylons==1.0.2.dev20160108
-Pylons==1.0.1
+## core
+setuptools==30.1.0
+setuptools-scm==1.15.0
-# TODO: This version is not available, but newer ones are
-# Pyro4==4.35
-Pyro4==4.41
-
-# TODO: This should probably not be in here
-# -e hg+https://johbo@code.rhodecode.com/johbo/rhodecode-fork@3a454bd1f17c0b2b2a951cf2b111e0320d7942a9#egg=RhodeCodeEnterprise-dev
-
-Routes==1.13
-SQLAlchemy==0.9.9
-Sphinx==1.2.2
-Tempita==0.5.2
-URLObject==2.4.0
-WebError==0.10.3
-
-# TODO: This is modified by us, needs a better integration. For now
-# using the latest version before.
-# WebHelpers==1.3.dev20150807
-WebHelpers==1.3
-
-WebHelpers2==2.0
-WebOb==1.3.1
-WebTest==1.4.3
-Whoosh==2.7.0
-alembic==0.8.4
amqplib==1.0.2
anyjson==0.3.3
-appenlight-client==0.6.14
-authomatic==0.1.0.post1;
+authomatic==0.1.0.post1
+Babel==1.3
backport-ipaddress==0.1
-bottle==0.12.8
-bumpversion==0.5.3
+Beaker==1.7.0
celery==2.2.10
+Chameleon==2.24
channelstream==0.5.2
click==5.1
colander==1.2
configobj==5.0.6
-cov-core==1.15.0
-coverage==3.7.1
-cssselect==0.9.1
decorator==3.4.2
deform==2.0a2
docutils==0.12
dogpile.cache==0.6.1
dogpile.core==0.4.1
-dulwich==0.12.0
ecdsa==0.11
+FormEncode==1.2.4
future==0.14.3
futures==3.0.2
-gevent==1.1.1
-gprof2dot==2015.12.1
-greenlet==0.4.9
-gunicorn==19.6.0
-
-# TODO: Needs subvertpy and blows up without Subversion headers,
-# actually we should not need this for Enterprise at all.
-# hgsubversion==1.8.2
-
gnureadline==6.3.3
infrae.cache==1.0.1
-invoke==0.13.0
-ipdb==0.10.1
-ipython==5.1.0
iso8601==0.1.11
itsdangerous==0.24
+Jinja2==2.7.3
kombu==1.5.1
-lxml==3.4.4
+Mako==1.0.6
+Markdown==2.6.7
+MarkupSafe==0.23
meld3==1.0.2
-mock==1.0.1
-msgpack-python==0.4.6
+msgpack-python==0.4.8
+MySQL-python==1.2.5
nose==1.3.6
objgraph==2.0.0
packaging==15.2
paramiko==1.15.1
+Paste==2.0.3
+PasteDeploy==1.5.2
+PasteScript==1.7.5
psutil==4.3.1
psycopg2==2.6.1
-py==1.4.29
py-bcrypt==0.4
-py-gfm==0.1.3
pycrypto==2.6.1
pycurl==7.19.5
pyflakes==0.8.1
+pygments-markdown-lexer==0.1.0.dev39
+Pygments==2.2.0
pyparsing==1.5.7
-pyramid==1.6.1
pyramid-beaker==0.8
pyramid-debugtoolbar==2.4.2
pyramid-jinja2==2.5
pyramid-mako==1.0.2
+pyramid==1.6.1
pysqlite==2.6.3
-pytest==2.8.5
-pytest-runner==2.7.1
-pytest-catchlog==1.2.2
-pytest-cov==1.8.1
-pytest-profiling==1.0.1
-pytest-timeout==0.4
python-dateutil==1.5
python-ldap==2.4.19
python-memcached==1.57
python-pam==1.8.2
pytz==2015.4
pyzmq==14.6.0
-
-# TODO: This is not available in public
-# rc-testdata==0.2.0
-
-https://code.rhodecode.com/rhodecode-tools-ce/archive/v0.10.2.zip#md5=d2af3985a1a32a678944d4d48870cb04
-
-
recaptcha-client==1.0.6
repoze.lru==0.6
requests==2.9.1
-serpent==1.12
+Routes==1.13
setproctitle==1.1.8
-setuptools==20.8.1
-setuptools-scm==1.11.0
simplejson==3.7.2
six==1.9.0
+Sphinx==1.2.2
+SQLAlchemy==0.9.9
subprocess32==3.2.6
-supervisor==3.3.0
-transifex-client==0.10
+supervisor==3.3.1
+Tempita==0.5.2
translationstring==1.3
trollius==1.0.4
-uWSGI==2.0.11.2
urllib3==1.16
+URLObject==2.4.0
venusian==1.0
-waitress==0.8.9
+WebError==0.10.3
+WebHelpers2==2.0
+WebHelpers==1.3
+WebOb==1.3.1
+Whoosh==2.7.4
wsgiref==0.1.2
zope.cachedescriptors==4.0.0
zope.deprecation==4.1.2
zope.event==4.0.3
zope.interface==4.1.3
+
+## customized/patched libs
+# our patched version of Pylons==1.0.2
+https://code.rhodecode.com/upstream/pylons/archive/707354ee4261b9c10450404fc9852ccea4fd667d.tar.gz?md5=f26633726fa2cd3a340316ee6a5d218f#egg=Pylons==1.0.2.rhodecode-patch-1
+# not released py-gfm==0.1.3
+https://code.rhodecode.com/upstream/py-gfm/archive/0d66a19bc16e3d49de273c0f797d4e4781e8c0f2.tar.gz?md5=0d0d5385bfb629eea636a80b9c2bfd16#egg=py-gfm==0.1.3.rhodecode-upstream1
+
+
+## cli tools
+alembic==0.8.4
+invoke==0.13.0
+bumpversion==0.5.3
+transifex-client==0.10
+
+## http servers
+gevent==1.1.2
+greenlet==0.4.10
+gunicorn==19.6.0
+waitress==1.0.1
+uWSGI==2.0.11.2
+
+## debug
+ipdb==0.10.1
+ipython==5.1.0
+CProfileV==1.0.6
+bottle==0.12.8
+
+## rhodecode-tools, special case
+https://code.rhodecode.com/rhodecode-tools-ce/archive/v0.11.0.tar.gz?md5=e5fd0a8363af08a0ced71b50ca9cce15#egg=rhodecode-tools==0.11.0
+
+## appenlight
+appenlight-client==0.6.14
+
+# Pyro/Deprecated TODO(Marcink): remove in 4.7 release.
+Pyro4==4.41
+serpent==1.15
+
+## test related requirements
+-r requirements_test.txt
diff --git a/requirements_test.txt b/requirements_test.txt
new file mode 100644
--- /dev/null
+++ b/requirements_test.txt
@@ -0,0 +1,17 @@
+# test related requirements
+pytest==3.0.5
+py==1.4.31
+pytest-cov==2.4.0
+pytest-sugar==0.7.1
+pytest-runner==2.9.0
+pytest-catchlog==1.2.2
+pytest-profiling==1.2.2
+gprof2dot==2016.10.13
+pytest-timeout==1.2.0
+
+mock==1.0.1
+WebTest==1.4.3
+cov-core==1.15.0
+coverage==3.7.1
+cssselect==0.9.1
+lxml==3.4.4
diff --git a/rhodecode/VERSION b/rhodecode/VERSION
--- a/rhodecode/VERSION
+++ b/rhodecode/VERSION
@@ -1,1 +1,1 @@
-4.5.2
\ No newline at end of file
+4.6.0
\ No newline at end of file
diff --git a/rhodecode/__init__.py b/rhodecode/__init__.py
--- a/rhodecode/__init__.py
+++ b/rhodecode/__init__.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -51,11 +51,11 @@ PYRAMID_SETTINGS = {}
EXTENSIONS = {}
__version__ = ('.'.join((str(each) for each in VERSION[:3])))
-__dbversion__ = 63 # defines current db version for migrations
+__dbversion__ = 64 # defines current db version for migrations
__platform__ = platform.system()
__license__ = 'AGPLv3, and Commercial License'
__author__ = 'RhodeCode GmbH'
-__url__ = 'http://rhodecode.com'
+__url__ = 'https://code.rhodecode.com'
is_windows = __platform__ in ['Windows']
is_unix = not is_windows
diff --git a/rhodecode/admin/__init__.py b/rhodecode/admin/__init__.py
--- a/rhodecode/admin/__init__.py
+++ b/rhodecode/admin/__init__.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2016-2016 RhodeCode GmbH
+# Copyright (C) 2016-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -39,5 +39,19 @@ def includeme(config):
name='admin_settings_vcs_svn_generate_cfg',
pattern=ADMIN_PREFIX + '/settings/vcs/svn_generate_cfg')
+ config.add_route(
+ name='admin_settings_system',
+ pattern=ADMIN_PREFIX + '/settings/system')
+ config.add_route(
+ name='admin_settings_system_update',
+ pattern=ADMIN_PREFIX + '/settings/system/updates')
+
+ config.add_route(
+ name='admin_settings_sessions',
+ pattern=ADMIN_PREFIX + '/settings/sessions')
+ config.add_route(
+ name='admin_settings_sessions_cleanup',
+ pattern=ADMIN_PREFIX + '/settings/sessions/cleanup')
+
# Scan module for configuration decorators.
config.scan()
diff --git a/rhodecode/admin/interfaces.py b/rhodecode/admin/interfaces.py
--- a/rhodecode/admin/interfaces.py
+++ b/rhodecode/admin/interfaces.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2016-2016 RhodeCode GmbH
+# Copyright (C) 2016-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/admin/navigation.py b/rhodecode/admin/navigation.py
--- a/rhodecode/admin/navigation.py
+++ b/rhodecode/admin/navigation.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2016-2016 RhodeCode GmbH
+# Copyright (C) 2016-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -66,6 +66,15 @@ class NavEntry(object):
else:
return url(self.view_name)
+ def get_localized_name(self, request):
+ if hasattr(request, 'translate'):
+ return request.translate(self.name)
+ else:
+ # TODO(marcink): Remove this after migrating to pyramid
+ from pyramid.threadlocal import get_current_request
+ pyramid_request = get_current_request()
+ return pyramid_request.translate(self.name)
+
@implementer(IAdminNavigationRegistry)
class NavigationRegistry(object):
@@ -80,18 +89,22 @@ class NavigationRegistry(object):
NavEntry('email', _('Email'), 'admin_settings_email'),
NavEntry('hooks', _('Hooks'), 'admin_settings_hooks'),
NavEntry('search', _('Full Text Search'), 'admin_settings_search'),
+
NavEntry('integrations', _('Integrations'),
'global_integrations_home', pyramid=True),
- NavEntry('system', _('System Info'), 'admin_settings_system'),
+ NavEntry('system', _('System Info'),
+ 'admin_settings_system', pyramid=True),
+ NavEntry('sessions', _('User Sessions'),
+ 'admin_settings_sessions', pyramid=True),
NavEntry('open_source', _('Open Source Licenses'),
'admin_settings_open_source', pyramid=True),
+
# TODO: marcink: we disable supervisor now until the supervisor stats
# page is fixed in the nix configuration
# NavEntry('supervisor', _('Supervisor'), 'admin_settings_supervisor'),
]
- _labs_entry = NavEntry('labs', _('Labs'),
- 'admin_settings_labs')
+ _labs_entry = NavEntry('labs', _('Labs'), 'admin_settings_labs')
def __init__(self, labs_active=False):
self._registered_entries = collections.OrderedDict([
@@ -105,7 +118,8 @@ class NavigationRegistry(object):
self._registered_entries[entry.key] = entry
def get_navlist(self, request):
- navlist = [NavListEntry(i.key, i.name, i.generate_url(request))
+ navlist = [NavListEntry(i.key, i.get_localized_name(request),
+ i.generate_url(request))
for i in self._registered_entries.values()]
return navlist
diff --git a/rhodecode/admin/views.py b/rhodecode/admin/views.py
deleted file mode 100644
--- a/rhodecode/admin/views.py
+++ /dev/null
@@ -1,82 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright (C) 2016-2016 RhodeCode GmbH
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License, version 3
-# (only), as published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# 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 Affero General Public License
-# along with this program. If not, see .
-#
-# This program is dual-licensed. If you wish to learn more about the
-# RhodeCode Enterprise Edition, including its added features, Support services,
-# and proprietary license terms, please see https://rhodecode.com/licenses/
-
-import collections
-import logging
-
-from pylons import tmpl_context as c
-from pyramid.view import view_config
-
-from rhodecode.lib.auth import (
- LoginRequired, HasPermissionAllDecorator, CSRFRequired)
-from rhodecode.lib.utils import read_opensource_licenses
-from rhodecode.svn_support.utils import generate_mod_dav_svn_config
-from rhodecode.translation import _
-
-from .navigation import navigation_list
-
-
-log = logging.getLogger(__name__)
-
-
-class AdminSettingsView(object):
-
- def __init__(self, context, request):
- self.request = request
- self.context = context
- self.session = request.session
- self._rhodecode_user = request.user
-
- @LoginRequired()
- @HasPermissionAllDecorator('hg.admin')
- @view_config(
- route_name='admin_settings_open_source', request_method='GET',
- renderer='rhodecode:templates/admin/settings/settings.html')
- def open_source_licenses(self):
- c.active = 'open_source'
- c.navlist = navigation_list(self.request)
- c.opensource_licenses = collections.OrderedDict(
- sorted(read_opensource_licenses().items(), key=lambda t: t[0]))
-
- return {}
-
- @LoginRequired()
- @CSRFRequired()
- @HasPermissionAllDecorator('hg.admin')
- @view_config(
- route_name='admin_settings_vcs_svn_generate_cfg',
- request_method='POST', renderer='json')
- def vcs_svn_generate_config(self):
- try:
- generate_mod_dav_svn_config(self.request.registry)
- msg = {
- 'message': _('Apache configuration for Subversion generated.'),
- 'level': 'success',
- }
- except Exception:
- log.exception(
- 'Exception while generating the Apache configuration for Subversion.')
- msg = {
- 'message': _('Failed to generate the Apache configuration for Subversion.'),
- 'level': 'error',
- }
-
- data = {'message': msg}
- return data
diff --git a/rhodecode/admin/views/__init__.py b/rhodecode/admin/views/__init__.py
new file mode 100644
--- /dev/null
+++ b/rhodecode/admin/views/__init__.py
@@ -0,0 +1,19 @@
+# -*- coding: utf-8 -*-
+
+# Copyright (C) 2016-2017 RhodeCode GmbH
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License, version 3
+# (only), as published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# 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 Affero General Public License
+# along with this program. If not, see .
+#
+# This program is dual-licensed. If you wish to learn more about the
+# RhodeCode Enterprise Edition, including its added features, Support services,
+# and proprietary license terms, please see https://rhodecode.com/licenses/
diff --git a/rhodecode/admin/views/base.py b/rhodecode/admin/views/base.py
new file mode 100644
--- /dev/null
+++ b/rhodecode/admin/views/base.py
@@ -0,0 +1,28 @@
+# -*- coding: utf-8 -*-
+
+# Copyright (C) 2016-2017 RhodeCode GmbH
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License, version 3
+# (only), as published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# 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 Affero General Public License
+# along with this program. If not, see .
+#
+# This program is dual-licensed. If you wish to learn more about the
+# RhodeCode Enterprise Edition, including its added features, Support services,
+# and proprietary license terms, please see https://rhodecode.com/licenses/
+
+
+class AdminSettingsView(object):
+
+ def __init__(self, context, request):
+ self.request = request
+ self.context = context
+ self.session = request.session
+ self._rhodecode_user = request.user
diff --git a/rhodecode/admin/views/open_source_licenses.py b/rhodecode/admin/views/open_source_licenses.py
new file mode 100644
--- /dev/null
+++ b/rhodecode/admin/views/open_source_licenses.py
@@ -0,0 +1,48 @@
+# -*- coding: utf-8 -*-
+
+# Copyright (C) 2016-2017 RhodeCode GmbH
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License, version 3
+# (only), as published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# 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 Affero General Public License
+# along with this program. If not, see .
+#
+# This program is dual-licensed. If you wish to learn more about the
+# RhodeCode Enterprise Edition, including its added features, Support services,
+# and proprietary license terms, please see https://rhodecode.com/licenses/
+
+import collections
+import logging
+
+from pylons import tmpl_context as c
+from pyramid.view import view_config
+
+from rhodecode.admin.views.base import AdminSettingsView
+from rhodecode.admin.navigation import navigation_list
+from rhodecode.lib.auth import (LoginRequired, HasPermissionAllDecorator)
+from rhodecode.lib.utils import read_opensource_licenses
+
+log = logging.getLogger(__name__)
+
+
+class OpenSourceLicensesAdminSettingsView(AdminSettingsView):
+
+ @LoginRequired()
+ @HasPermissionAllDecorator('hg.admin')
+ @view_config(
+ route_name='admin_settings_open_source', request_method='GET',
+ renderer='rhodecode:templates/admin/settings/settings.mako')
+ def open_source_licenses(self):
+ c.active = 'open_source'
+ c.navlist = navigation_list(self.request)
+ c.opensource_licenses = collections.OrderedDict(
+ sorted(read_opensource_licenses().items(), key=lambda t: t[0]))
+
+ return {}
diff --git a/rhodecode/admin/views/sessions.py b/rhodecode/admin/views/sessions.py
new file mode 100644
--- /dev/null
+++ b/rhodecode/admin/views/sessions.py
@@ -0,0 +1,100 @@
+# -*- coding: utf-8 -*-
+
+# Copyright (C) 2016-2017 RhodeCode GmbH
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License, version 3
+# (only), as published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# 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 Affero General Public License
+# along with this program. If not, see .
+#
+# This program is dual-licensed. If you wish to learn more about the
+# RhodeCode Enterprise Edition, including its added features, Support services,
+# and proprietary license terms, please see https://rhodecode.com/licenses/
+
+import logging
+
+from pylons import tmpl_context as c
+from pyramid.view import view_config
+from pyramid.httpexceptions import HTTPFound
+
+from rhodecode.translation import _
+
+from rhodecode.admin.views.base import AdminSettingsView
+from rhodecode.lib.auth import (
+ LoginRequired, HasPermissionAllDecorator, CSRFRequired)
+from rhodecode.lib.utils2 import safe_int
+from rhodecode.lib import system_info
+from rhodecode.lib import user_sessions
+
+
+from rhodecode.admin.navigation import navigation_list
+
+
+log = logging.getLogger(__name__)
+
+
+class AdminSessionSettingsView(AdminSettingsView):
+
+ @LoginRequired()
+ @HasPermissionAllDecorator('hg.admin')
+ @view_config(
+ route_name='admin_settings_sessions', request_method='GET',
+ renderer='rhodecode:templates/admin/settings/settings.mako')
+ def settings_sessions(self):
+ c.active = 'sessions'
+ c.navlist = navigation_list(self.request)
+
+ c.cleanup_older_days = 60
+ older_than_seconds = 60 * 60 * 24 * c.cleanup_older_days
+
+ config = system_info.rhodecode_config().get_value()['value']['config']
+ c.session_model = user_sessions.get_session_handler(
+ config.get('beaker.session.type', 'memory'))(config)
+
+ c.session_conf = c.session_model.config
+ c.session_count = c.session_model.get_count()
+ c.session_expired_count = c.session_model.get_expired_count(
+ older_than_seconds)
+
+ return {}
+
+ @LoginRequired()
+ @CSRFRequired()
+ @HasPermissionAllDecorator('hg.admin')
+ @view_config(
+ route_name='admin_settings_sessions_cleanup', request_method='POST')
+ def settings_sessions_cleanup(self):
+ _ = self.request.translate
+ expire_days = safe_int(self.request.params.get('expire_days'))
+
+ if expire_days is None:
+ expire_days = 60
+
+ older_than_seconds = 60 * 60 * 24 * expire_days
+
+ config = system_info.rhodecode_config().get_value()['value']['config']
+ session_model = user_sessions.get_session_handler(
+ config.get('beaker.session.type', 'memory'))(config)
+
+ try:
+ session_model.clean_sessions(
+ older_than_seconds=older_than_seconds)
+ self.request.session.flash(
+ _('Cleaned up old sessions'), queue='success')
+ except user_sessions.CleanupCommand as msg:
+ self.request.session.flash(msg.message, queue='warning')
+ except Exception as e:
+ log.exception('Failed session cleanup')
+ self.request.session.flash(
+ _('Failed to cleanup up old sessions'), queue='error')
+
+ redirect_to = self.request.resource_path(
+ self.context, route_name='admin_settings_sessions')
+ return HTTPFound(redirect_to)
diff --git a/rhodecode/admin/views/svn_config.py b/rhodecode/admin/views/svn_config.py
new file mode 100644
--- /dev/null
+++ b/rhodecode/admin/views/svn_config.py
@@ -0,0 +1,60 @@
+# -*- coding: utf-8 -*-
+
+# Copyright (C) 2016-2017 RhodeCode GmbH
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License, version 3
+# (only), as published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# 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 Affero General Public License
+# along with this program. If not, see .
+#
+# This program is dual-licensed. If you wish to learn more about the
+# RhodeCode Enterprise Edition, including its added features, Support services,
+# and proprietary license terms, please see https://rhodecode.com/licenses/
+
+import logging
+
+from pyramid.view import view_config
+
+from rhodecode.svn_support.utils import generate_mod_dav_svn_config
+
+from rhodecode.admin.views.base import AdminSettingsView
+from rhodecode.lib.auth import (
+ LoginRequired, HasPermissionAllDecorator, CSRFRequired)
+
+log = logging.getLogger(__name__)
+
+
+class SvnConfigAdminSettingsView(AdminSettingsView):
+
+ @LoginRequired()
+ @CSRFRequired()
+ @HasPermissionAllDecorator('hg.admin')
+ @view_config(
+ route_name='admin_settings_vcs_svn_generate_cfg',
+ request_method='POST', renderer='json')
+ def vcs_svn_generate_config(self):
+ _ = self.request.translate
+ try:
+ generate_mod_dav_svn_config(self.request.registry)
+ msg = {
+ 'message': _('Apache configuration for Subversion generated.'),
+ 'level': 'success',
+ }
+ except Exception:
+ log.exception(
+ 'Exception while generating the Apache '
+ 'configuration for Subversion.')
+ msg = {
+ 'message': _('Failed to generate the Apache configuration for Subversion.'),
+ 'level': 'error',
+ }
+
+ data = {'message': msg}
+ return data
diff --git a/rhodecode/admin/views/system_info.py b/rhodecode/admin/views/system_info.py
new file mode 100644
--- /dev/null
+++ b/rhodecode/admin/views/system_info.py
@@ -0,0 +1,202 @@
+# -*- coding: utf-8 -*-
+
+# Copyright (C) 2016-2017 RhodeCode GmbH
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License, version 3
+# (only), as published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# 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 Affero General Public License
+# along with this program. If not, see .
+#
+# This program is dual-licensed. If you wish to learn more about the
+# RhodeCode Enterprise Edition, including its added features, Support services,
+# and proprietary license terms, please see https://rhodecode.com/licenses/
+
+import logging
+import urllib2
+import packaging.version
+
+from pylons import tmpl_context as c
+from pyramid.view import view_config
+
+import rhodecode
+from rhodecode.lib import helpers as h
+from rhodecode.lib.auth import (LoginRequired, HasPermissionAllDecorator)
+from rhodecode.lib.utils2 import str2bool
+from rhodecode.lib import system_info
+from rhodecode.lib.ext_json import json
+
+from rhodecode.admin.views.base import AdminSettingsView
+from rhodecode.admin.navigation import navigation_list
+from rhodecode.model.settings import SettingsModel
+
+log = logging.getLogger(__name__)
+
+
+class AdminSystemInfoSettingsView(AdminSettingsView):
+
+ @staticmethod
+ def get_update_data(update_url):
+ """Return the JSON update data."""
+ ver = rhodecode.__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)
+
+ return data
+
+ def get_update_url(self):
+ settings = SettingsModel().get_all_settings()
+ return settings.get('rhodecode_update_url')
+
+ @LoginRequired()
+ @HasPermissionAllDecorator('hg.admin')
+ @view_config(
+ route_name='admin_settings_system', request_method='GET',
+ renderer='rhodecode:templates/admin/settings/settings.mako')
+ def settings_system_info(self):
+ _ = self.request.translate
+
+ c.active = 'system'
+ c.navlist = navigation_list(self.request)
+
+ # TODO(marcink), figure out how to allow only selected users to do this
+ c.allowed_to_snapshot = self._rhodecode_user.admin
+
+ snapshot = str2bool(self.request.params.get('snapshot'))
+
+ c.rhodecode_update_url = self.get_update_url()
+ server_info = system_info.get_system_info(self.request.environ)
+
+ for key, val in server_info.items():
+ setattr(c, key, val)
+
+ def val(name, subkey='human_value'):
+ return server_info[name][subkey]
+
+ def state(name):
+ return server_info[name]['state']
+
+ def val2(name):
+ val = server_info[name]['human_value']
+ state = server_info[name]['state']
+ return val, state
+
+ update_info_msg = _('Note: please make sure this server can '
+ 'access `${url}` for the update link to work',
+ mapping=dict(url=c.rhodecode_update_url))
+ c.data_items = [
+ # update info
+ (_('Update info'), h.literal(
+ '%s.' % (
+ _('Check for updates')) +
+ ' %s.' % (update_info_msg)
+ ), ''),
+
+ # RhodeCode specific
+ (_('RhodeCode Version'), val('rhodecode_app')['text'], state('rhodecode_app')),
+ (_('RhodeCode Server IP'), val('server')['server_ip'], state('server')),
+ (_('RhodeCode Server ID'), val('server')['server_id'], state('server')),
+ (_('RhodeCode Configuration'), val('rhodecode_config')['path'], state('rhodecode_config')),
+ ('', '', ''), # spacer
+
+ # Database
+ (_('Database'), val('database')['url'], state('database')),
+ (_('Database version'), val('database')['version'], state('database')),
+ ('', '', ''), # spacer
+
+ # Platform/Python
+ (_('Platform'), val('platform')['name'], state('platform')),
+ (_('Platform UUID'), val('platform')['uuid'], state('platform')),
+ (_('Python version'), val('python')['version'], state('python')),
+ (_('Python path'), val('python')['executable'], state('python')),
+ ('', '', ''), # spacer
+
+ # Systems stats
+ (_('CPU'), val('cpu'), state('cpu')),
+ (_('Load'), val('load')['text'], state('load')),
+ (_('Memory'), val('memory')['text'], state('memory')),
+ (_('Uptime'), val('uptime')['text'], state('uptime')),
+ ('', '', ''), # spacer
+
+ # Repo storage
+ (_('Storage location'), val('storage')['path'], state('storage')),
+ (_('Storage info'), val('storage')['text'], state('storage')),
+ (_('Storage inodes'), val('storage_inodes')['text'], state('storage_inodes')),
+
+ (_('Gist storage location'), val('storage_gist')['path'], state('storage_gist')),
+ (_('Gist storage info'), val('storage_gist')['text'], state('storage_gist')),
+
+ (_('Archive cache storage location'), val('storage_archive')['path'], state('storage_archive')),
+ (_('Archive cache info'), val('storage_archive')['text'], state('storage_archive')),
+
+ (_('Temp storage location'), val('storage_temp')['path'], state('storage_temp')),
+ (_('Temp storage info'), val('storage_temp')['text'], state('storage_temp')),
+
+ (_('Search info'), val('search')['text'], state('search')),
+ (_('Search location'), val('search')['location'], state('search')),
+ ('', '', ''), # spacer
+
+ # VCS specific
+ (_('VCS Backends'), val('vcs_backends'), state('vcs_backends')),
+ (_('VCS Server'), val('vcs_server')['text'], state('vcs_server')),
+ (_('GIT'), val('git'), state('git')),
+ (_('HG'), val('hg'), state('hg')),
+ (_('SVN'), val('svn'), state('svn')),
+
+ ]
+
+ if snapshot:
+ if c.allowed_to_snapshot:
+ c.data_items.pop(0) # remove server info
+ self.request.override_renderer = 'admin/settings/settings_system_snapshot.mako'
+ else:
+ self.request.session.flash(
+ 'You are not allowed to do this', queue='warning')
+ return {}
+
+ @LoginRequired()
+ @HasPermissionAllDecorator('hg.admin')
+ @view_config(
+ route_name='admin_settings_system_update', request_method='GET',
+ renderer='rhodecode:templates/admin/settings/settings_system_update.mako')
+ def settings_system_info_check_update(self):
+ _ = self.request.translate
+
+ update_url = self.get_update_url()
+
+ _err = lambda s: '
{}
'.format(s)
+ try:
+ data = self.get_update_data(update_url)
+ except urllib2.URLError as e:
+ log.exception("Exception contacting upgrade server")
+ self.request.override_renderer = 'string'
+ return _err('Failed to contact upgrade server: %r' % e)
+ except ValueError as e:
+ log.exception("Bad data sent from update server")
+ self.request.override_renderer = 'string'
+ return _err('Bad data sent from update server')
+
+ latest = data['versions'][0]
+
+ c.update_url = update_url
+ c.latest_data = latest
+ c.latest_ver = latest['version']
+ c.cur_ver = rhodecode.__version__
+ c.should_upgrade = False
+
+ if (packaging.version.Version(c.latest_ver) >
+ packaging.version.Version(c.cur_ver)):
+ c.should_upgrade = True
+ c.important_notices = latest['general']
+
+ return {}
diff --git a/rhodecode/api/__init__.py b/rhodecode/api/__init__.py
--- a/rhodecode/api/__init__.py
+++ b/rhodecode/api/__init__.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2011-2016 RhodeCode GmbH
+# Copyright (C) 2011-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -132,7 +132,7 @@ def exception_view(exc, request):
log.debug('json-rpc error rpc_id:%s "%s"', rpc_id, fault_message)
elif isinstance(exc, JSONRPCValidationError):
colander_exc = exc.colander_exception
- #TODO: think maybe of nicer way to serialize errors ?
+ # TODO(marcink): think maybe of nicer way to serialize errors ?
fault_message = colander_exc.asdict()
log.debug('json-rpc error rpc_id:%s "%s"', rpc_id, fault_message)
elif isinstance(exc, JSONRPCForbidden):
@@ -240,7 +240,7 @@ def request_view(request):
message=('Missing non optional `%s` arg in JSON DATA' % arg)
)
- # sanitze extra passed arguments
+ # sanitize extra passed arguments
for k in request.rpc_params.keys()[:]:
if k not in func_kwargs:
del request.rpc_params[k]
@@ -256,7 +256,7 @@ def request_view(request):
except JSONRPCBaseError:
raise
except Exception:
- log.exception('Unhandled exception occured on api call: %s', func)
+ log.exception('Unhandled exception occurred on api call: %s', func)
return jsonrpc_error(request, retid=request.rpc_id,
message='Internal server error')
@@ -269,9 +269,10 @@ def setup_request(request):
We need to raise JSONRPCError here if we want to return some errors back to
user.
"""
+
log.debug('Executing setup request: %r', request)
request.rpc_ip_addr = get_ip_addr(request.environ)
- # TODO: marcink, deprecate GET at some point
+ # TODO(marcink): deprecate GET at some point
if request.method not in ['POST', 'GET']:
log.debug('unsupported request method "%s"', request.method)
raise JSONRPCError(
@@ -308,6 +309,8 @@ def setup_request(request):
if not api_key:
raise KeyError('api_key or auth_token')
+ # TODO(marcink): support passing in token in request header
+
request.rpc_api_key = api_key
request.rpc_id = json_body['id']
request.rpc_method = json_body['method']
@@ -485,8 +488,7 @@ def includeme(config):
config.registry.jsonrpc_methods = OrderedDict()
# match filter by given method only
- config.add_view_predicate(
- 'jsonrpc_method', MethodPredicate)
+ config.add_view_predicate('jsonrpc_method', MethodPredicate)
config.add_renderer(DEFAULT_RENDERER, ExtJsonRenderer(
serializer=json.dumps, indent=4))
diff --git a/rhodecode/api/exc.py b/rhodecode/api/exc.py
--- a/rhodecode/api/exc.py
+++ b/rhodecode/api/exc.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2011-2016 RhodeCode GmbH
+# Copyright (C) 2011-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/tests/__init__.py b/rhodecode/api/tests/__init__.py
--- a/rhodecode/api/tests/__init__.py
+++ b/rhodecode/api/tests/__init__.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/tests/conftest.py b/rhodecode/api/tests/conftest.py
--- a/rhodecode/api/tests/conftest.py
+++ b/rhodecode/api/tests/conftest.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/tests/test_add_field_to_repo.py b/rhodecode/api/tests/test_add_field_to_repo.py
--- a/rhodecode/api/tests/test_add_field_to_repo.py
+++ b/rhodecode/api/tests/test_add_field_to_repo.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/tests/test_add_user_to_user_group.py b/rhodecode/api/tests/test_add_user_to_user_group.py
--- a/rhodecode/api/tests/test_add_user_to_user_group.py
+++ b/rhodecode/api/tests/test_add_user_to_user_group.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/tests/test_api.py b/rhodecode/api/tests/test_api.py
--- a/rhodecode/api/tests/test_api.py
+++ b/rhodecode/api/tests/test_api.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/tests/test_cleanup_sessions.py b/rhodecode/api/tests/test_cleanup_sessions.py
new file mode 100644
--- /dev/null
+++ b/rhodecode/api/tests/test_cleanup_sessions.py
@@ -0,0 +1,44 @@
+# -*- coding: utf-8 -*-
+
+# Copyright (C) 2017-2017 RhodeCode GmbH
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License, version 3
+# (only), as published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# 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 Affero General Public License
+# along with this program. If not, see .
+#
+# This program is dual-licensed. If you wish to learn more about the
+# RhodeCode Enterprise Edition, including its added features, Support services,
+# and proprietary license terms, please see https://rhodecode.com/licenses/
+
+import mock
+import pytest
+
+from rhodecode.lib.user_sessions import FileAuthSessions
+from rhodecode.api.tests.utils import (
+ build_data, api_call, assert_ok, assert_error, crash)
+
+
+@pytest.mark.usefixtures("testuser_api", "app")
+class TestCleanupSessions(object):
+ def test_api_cleanup_sessions(self):
+ id_, params = build_data(self.apikey, 'cleanup_sessions')
+ response = api_call(self.app, params)
+
+ expected = {'backend': 'file sessions', 'sessions_removed': 0}
+ assert_ok(id_, expected, given=response.body)
+
+ @mock.patch.object(FileAuthSessions, 'clean_sessions', crash)
+ def test_api_cleanup_error(self):
+ id_, params = build_data(self.apikey, 'cleanup_sessions', )
+ response = api_call(self.app, params)
+
+ expected = 'Error occurred during session cleanup'
+ assert_error(id_, expected, given=response.body)
diff --git a/rhodecode/api/tests/test_close_pull_request.py b/rhodecode/api/tests/test_close_pull_request.py
--- a/rhodecode/api/tests/test_close_pull_request.py
+++ b/rhodecode/api/tests/test_close_pull_request.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/tests/test_comment_commit.py b/rhodecode/api/tests/test_comment_commit.py
--- a/rhodecode/api/tests/test_comment_commit.py
+++ b/rhodecode/api/tests/test_comment_commit.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/tests/test_comment_pull_request.py b/rhodecode/api/tests/test_comment_pull_request.py
--- a/rhodecode/api/tests/test_comment_pull_request.py
+++ b/rhodecode/api/tests/test_comment_pull_request.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -20,7 +20,7 @@
import pytest
-from rhodecode.model.comment import ChangesetCommentsModel
+from rhodecode.model.comment import CommentsModel
from rhodecode.model.db import UserLog
from rhodecode.model.pull_request import PullRequestModel
from rhodecode.tests import TEST_USER_ADMIN_LOGIN
@@ -52,13 +52,13 @@ class TestCommentPullRequest(object):
response = api_call(self.app, params)
pull_request = PullRequestModel().get(pull_request.pull_request_id)
- comments = ChangesetCommentsModel().get_comments(
+ comments = CommentsModel().get_comments(
pull_request.target_repo.repo_id, pull_request=pull_request)
expected = {
'pull_request_id': pull_request.pull_request_id,
'comment_id': comments[-1].comment_id,
- 'status': None
+ 'status': {'given': None, 'was_changed': None}
}
assert_ok(id_, expected, response.body)
@@ -83,12 +83,61 @@ class TestCommentPullRequest(object):
response = api_call(self.app, params)
pull_request = PullRequestModel().get(pull_request_id)
- comments = ChangesetCommentsModel().get_comments(
+ comments = CommentsModel().get_comments(
pull_request.target_repo.repo_id, pull_request=pull_request)
expected = {
'pull_request_id': pull_request.pull_request_id,
'comment_id': comments[-1].comment_id,
- 'status': 'rejected'
+ 'status': {'given': 'rejected', 'was_changed': True}
+ }
+ assert_ok(id_, expected, response.body)
+
+ @pytest.mark.backends("git", "hg")
+ def test_api_comment_pull_request_change_status_with_specific_commit_id(
+ self, pr_util, no_notifications):
+ pull_request = pr_util.create_pull_request()
+ pull_request_id = pull_request.pull_request_id
+ latest_commit_id = 'test_commit'
+ # inject additional revision, to fail test the status change on
+ # non-latest commit
+ pull_request.revisions = pull_request.revisions + ['test_commit']
+
+ id_, params = build_data(
+ self.apikey, 'comment_pull_request',
+ repoid=pull_request.target_repo.repo_name,
+ pullrequestid=pull_request.pull_request_id,
+ status='approved', commit_id=latest_commit_id)
+ response = api_call(self.app, params)
+ pull_request = PullRequestModel().get(pull_request_id)
+
+ expected = {
+ 'pull_request_id': pull_request.pull_request_id,
+ 'comment_id': None,
+ 'status': {'given': 'approved', 'was_changed': False}
+ }
+ assert_ok(id_, expected, response.body)
+
+ @pytest.mark.backends("git", "hg")
+ def test_api_comment_pull_request_change_status_with_specific_commit_id(
+ self, pr_util, no_notifications):
+ pull_request = pr_util.create_pull_request()
+ pull_request_id = pull_request.pull_request_id
+ latest_commit_id = pull_request.revisions[0]
+
+ id_, params = build_data(
+ self.apikey, 'comment_pull_request',
+ repoid=pull_request.target_repo.repo_name,
+ pullrequestid=pull_request.pull_request_id,
+ status='approved', commit_id=latest_commit_id)
+ response = api_call(self.app, params)
+ pull_request = PullRequestModel().get(pull_request_id)
+
+ comments = CommentsModel().get_comments(
+ pull_request.target_repo.repo_id, pull_request=pull_request)
+ expected = {
+ 'pull_request_id': pull_request.pull_request_id,
+ 'comment_id': comments[-1].comment_id,
+ 'status': {'given': 'approved', 'was_changed': True}
}
assert_ok(id_, expected, response.body)
@@ -103,7 +152,7 @@ class TestCommentPullRequest(object):
pullrequestid=pull_request_id)
response = api_call(self.app, params)
- expected = 'message and status parameter missing'
+ expected = 'Both message and status parameters are missing. At least one is required.'
assert_error(id_, expected, given=response.body)
@pytest.mark.backends("git", "hg")
@@ -118,7 +167,7 @@ class TestCommentPullRequest(object):
status='42')
response = api_call(self.app, params)
- expected = 'unknown comment status`42`'
+ expected = 'Unknown comment status: `42`'
assert_error(id_, expected, given=response.body)
@pytest.mark.backends("git", "hg")
@@ -144,3 +193,17 @@ class TestCommentPullRequest(object):
expected = 'userid is not the same as your user'
assert_error(id_, expected, given=response.body)
+
+ @pytest.mark.backends("git", "hg")
+ def test_api_comment_pull_request_wrong_commit_id_error(self, pr_util):
+ pull_request = pr_util.create_pull_request()
+ id_, params = build_data(
+ self.apikey_regular, 'comment_pull_request',
+ repoid=pull_request.target_repo.repo_name,
+ status='approved',
+ pullrequestid=pull_request.pull_request_id,
+ commit_id='XXX')
+ response = api_call(self.app, params)
+
+ expected = 'Invalid commit_id `XXX` for this pull request.'
+ assert_error(id_, expected, given=response.body)
diff --git a/rhodecode/api/tests/test_create_gist.py b/rhodecode/api/tests/test_create_gist.py
--- a/rhodecode/api/tests/test_create_gist.py
+++ b/rhodecode/api/tests/test_create_gist.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/tests/test_create_pull_request.py b/rhodecode/api/tests/test_create_pull_request.py
--- a/rhodecode/api/tests/test_create_pull_request.py
+++ b/rhodecode/api/tests/test_create_pull_request.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/tests/test_create_repo.py b/rhodecode/api/tests/test_create_repo.py
--- a/rhodecode/api/tests/test_create_repo.py
+++ b/rhodecode/api/tests/test_create_repo.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/tests/test_create_repo_group.py b/rhodecode/api/tests/test_create_repo_group.py
--- a/rhodecode/api/tests/test_create_repo_group.py
+++ b/rhodecode/api/tests/test_create_repo_group.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/tests/test_create_user.py b/rhodecode/api/tests/test_create_user.py
--- a/rhodecode/api/tests/test_create_user.py
+++ b/rhodecode/api/tests/test_create_user.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/tests/test_create_user_group.py b/rhodecode/api/tests/test_create_user_group.py
--- a/rhodecode/api/tests/test_create_user_group.py
+++ b/rhodecode/api/tests/test_create_user_group.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/tests/test_delete_gist.py b/rhodecode/api/tests/test_delete_gist.py
--- a/rhodecode/api/tests/test_delete_gist.py
+++ b/rhodecode/api/tests/test_delete_gist.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/tests/test_delete_repo.py b/rhodecode/api/tests/test_delete_repo.py
--- a/rhodecode/api/tests/test_delete_repo.py
+++ b/rhodecode/api/tests/test_delete_repo.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/tests/test_delete_repo_group.py b/rhodecode/api/tests/test_delete_repo_group.py
--- a/rhodecode/api/tests/test_delete_repo_group.py
+++ b/rhodecode/api/tests/test_delete_repo_group.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/tests/test_delete_user.py b/rhodecode/api/tests/test_delete_user.py
--- a/rhodecode/api/tests/test_delete_user.py
+++ b/rhodecode/api/tests/test_delete_user.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/tests/test_delete_user_group.py b/rhodecode/api/tests/test_delete_user_group.py
--- a/rhodecode/api/tests/test_delete_user_group.py
+++ b/rhodecode/api/tests/test_delete_user_group.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/tests/test_deprecated_api.py b/rhodecode/api/tests/test_deprecated_api.py
--- a/rhodecode/api/tests/test_deprecated_api.py
+++ b/rhodecode/api/tests/test_deprecated_api.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/tests/test_fork_repo.py b/rhodecode/api/tests/test_fork_repo.py
--- a/rhodecode/api/tests/test_fork_repo.py
+++ b/rhodecode/api/tests/test_fork_repo.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/tests/test_get_gist.py b/rhodecode/api/tests/test_get_gist.py
--- a/rhodecode/api/tests/test_get_gist.py
+++ b/rhodecode/api/tests/test_get_gist.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/tests/test_get_gists.py b/rhodecode/api/tests/test_get_gists.py
--- a/rhodecode/api/tests/test_get_gists.py
+++ b/rhodecode/api/tests/test_get_gists.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/tests/test_get_ip.py b/rhodecode/api/tests/test_get_ip.py
--- a/rhodecode/api/tests/test_get_ip.py
+++ b/rhodecode/api/tests/test_get_ip.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/tests/test_get_locks.py b/rhodecode/api/tests/test_get_locks.py
--- a/rhodecode/api/tests/test_get_locks.py
+++ b/rhodecode/api/tests/test_get_locks.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/tests/test_get_pull_request.py b/rhodecode/api/tests/test_get_pull_request.py
--- a/rhodecode/api/tests/test_get_pull_request.py
+++ b/rhodecode/api/tests/test_get_pull_request.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/tests/test_get_pull_requests.py b/rhodecode/api/tests/test_get_pull_requests.py
--- a/rhodecode/api/tests/test_get_pull_requests.py
+++ b/rhodecode/api/tests/test_get_pull_requests.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/tests/test_get_repo.py b/rhodecode/api/tests/test_get_repo.py
--- a/rhodecode/api/tests/test_get_repo.py
+++ b/rhodecode/api/tests/test_get_repo.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/tests/test_get_repo_changeset.py b/rhodecode/api/tests/test_get_repo_changeset.py
--- a/rhodecode/api/tests/test_get_repo_changeset.py
+++ b/rhodecode/api/tests/test_get_repo_changeset.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/tests/test_get_repo_group.py b/rhodecode/api/tests/test_get_repo_group.py
--- a/rhodecode/api/tests/test_get_repo_group.py
+++ b/rhodecode/api/tests/test_get_repo_group.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/tests/test_get_repo_groups.py b/rhodecode/api/tests/test_get_repo_groups.py
--- a/rhodecode/api/tests/test_get_repo_groups.py
+++ b/rhodecode/api/tests/test_get_repo_groups.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/tests/test_get_repo_nodes.py b/rhodecode/api/tests/test_get_repo_nodes.py
--- a/rhodecode/api/tests/test_get_repo_nodes.py
+++ b/rhodecode/api/tests/test_get_repo_nodes.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/tests/test_get_repo_refs.py b/rhodecode/api/tests/test_get_repo_refs.py
--- a/rhodecode/api/tests/test_get_repo_refs.py
+++ b/rhodecode/api/tests/test_get_repo_refs.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/tests/test_get_repos.py b/rhodecode/api/tests/test_get_repos.py
--- a/rhodecode/api/tests/test_get_repos.py
+++ b/rhodecode/api/tests/test_get_repos.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -22,7 +22,8 @@
import pytest
from rhodecode.model.repo import RepoModel
-from rhodecode.api.tests.utils import build_data, api_call, assert_ok, jsonify
+from rhodecode.api.tests.utils import (
+ build_data, api_call, assert_ok, assert_error, jsonify)
from rhodecode.model.db import User
@@ -40,6 +41,76 @@ class TestGetRepos(object):
expected = ret
assert_ok(id_, expected, given=response.body)
+ def test_api_get_repos_only_toplevel(self, user_util):
+ repo_group = user_util.create_repo_group(auto_cleanup=True)
+ user_util.create_repo(parent=repo_group)
+
+ id_, params = build_data(self.apikey, 'get_repos', traverse=0)
+ response = api_call(self.app, params)
+
+ result = []
+ for repo in RepoModel().get_repos_for_root(root=None):
+ result.append(repo.get_api_data(include_secrets=True))
+ expected = jsonify(result)
+
+ assert_ok(id_, expected, given=response.body)
+
+ def test_api_get_repos_with_wrong_root(self):
+ id_, params = build_data(self.apikey, 'get_repos', root='abracadabra')
+ response = api_call(self.app, params)
+
+ expected = 'Root repository group `abracadabra` does not exist'
+ assert_error(id_, expected, given=response.body)
+
+ def test_api_get_repos_with_root(self, user_util):
+ repo_group = user_util.create_repo_group(auto_cleanup=True)
+ repo_group_name = repo_group.group_name
+
+ user_util.create_repo(parent=repo_group)
+ user_util.create_repo(parent=repo_group)
+
+ # nested, should not show up
+ user_util._test_name = '{}/'.format(repo_group_name)
+ sub_repo_group = user_util.create_repo_group(auto_cleanup=True)
+ user_util.create_repo(parent=sub_repo_group)
+
+ id_, params = build_data(self.apikey, 'get_repos',
+ root=repo_group_name, traverse=0)
+ response = api_call(self.app, params)
+
+ result = []
+ for repo in RepoModel().get_repos_for_root(repo_group):
+ result.append(repo.get_api_data(include_secrets=True))
+
+ assert len(result) == 2
+ expected = jsonify(result)
+ assert_ok(id_, expected, given=response.body)
+
+ def test_api_get_repos_with_root_and_traverse(self, user_util):
+ repo_group = user_util.create_repo_group(auto_cleanup=True)
+ repo_group_name = repo_group.group_name
+
+ user_util.create_repo(parent=repo_group)
+ user_util.create_repo(parent=repo_group)
+
+ # nested, should not show up
+ user_util._test_name = '{}/'.format(repo_group_name)
+ sub_repo_group = user_util.create_repo_group(auto_cleanup=True)
+ user_util.create_repo(parent=sub_repo_group)
+
+ id_, params = build_data(self.apikey, 'get_repos',
+ root=repo_group_name, traverse=1)
+ response = api_call(self.app, params)
+
+ result = []
+ for repo in RepoModel().get_repos_for_root(
+ repo_group_name, traverse=True):
+ result.append(repo.get_api_data(include_secrets=True))
+
+ assert len(result) == 3
+ expected = jsonify(result)
+ assert_ok(id_, expected, given=response.body)
+
def test_api_get_repos_non_admin(self):
id_, params = build_data(self.apikey_regular, 'get_repos')
response = api_call(self.app, params)
diff --git a/rhodecode/api/tests/test_get_server_info.py b/rhodecode/api/tests/test_get_server_info.py
--- a/rhodecode/api/tests/test_get_server_info.py
+++ b/rhodecode/api/tests/test_get_server_info.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/tests/test_get_user.py b/rhodecode/api/tests/test_get_user.py
--- a/rhodecode/api/tests/test_get_user.py
+++ b/rhodecode/api/tests/test_get_user.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/tests/test_get_user_group.py b/rhodecode/api/tests/test_get_user_group.py
--- a/rhodecode/api/tests/test_get_user_group.py
+++ b/rhodecode/api/tests/test_get_user_group.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/tests/test_get_user_groups.py b/rhodecode/api/tests/test_get_user_groups.py
--- a/rhodecode/api/tests/test_get_user_groups.py
+++ b/rhodecode/api/tests/test_get_user_groups.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/tests/test_get_users.py b/rhodecode/api/tests/test_get_users.py
--- a/rhodecode/api/tests/test_get_users.py
+++ b/rhodecode/api/tests/test_get_users.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/tests/test_grant_user_group_permission.py b/rhodecode/api/tests/test_grant_user_group_permission.py
--- a/rhodecode/api/tests/test_grant_user_group_permission.py
+++ b/rhodecode/api/tests/test_grant_user_group_permission.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/tests/test_grant_user_group_permission_to_repo_group.py b/rhodecode/api/tests/test_grant_user_group_permission_to_repo_group.py
--- a/rhodecode/api/tests/test_grant_user_group_permission_to_repo_group.py
+++ b/rhodecode/api/tests/test_grant_user_group_permission_to_repo_group.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/tests/test_grant_user_group_permission_to_user_group.py b/rhodecode/api/tests/test_grant_user_group_permission_to_user_group.py
--- a/rhodecode/api/tests/test_grant_user_group_permission_to_user_group.py
+++ b/rhodecode/api/tests/test_grant_user_group_permission_to_user_group.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/tests/test_grant_user_permission.py b/rhodecode/api/tests/test_grant_user_permission.py
--- a/rhodecode/api/tests/test_grant_user_permission.py
+++ b/rhodecode/api/tests/test_grant_user_permission.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/tests/test_grant_user_permission_to_repo_group.py b/rhodecode/api/tests/test_grant_user_permission_to_repo_group.py
--- a/rhodecode/api/tests/test_grant_user_permission_to_repo_group.py
+++ b/rhodecode/api/tests/test_grant_user_permission_to_repo_group.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/tests/test_grant_user_permission_to_user_group.py b/rhodecode/api/tests/test_grant_user_permission_to_user_group.py
--- a/rhodecode/api/tests/test_grant_user_permission_to_user_group.py
+++ b/rhodecode/api/tests/test_grant_user_permission_to_user_group.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/tests/test_invalidate_cache.py b/rhodecode/api/tests/test_invalidate_cache.py
--- a/rhodecode/api/tests/test_invalidate_cache.py
+++ b/rhodecode/api/tests/test_invalidate_cache.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/tests/test_merge_pull_request.py b/rhodecode/api/tests/test_merge_pull_request.py
--- a/rhodecode/api/tests/test_merge_pull_request.py
+++ b/rhodecode/api/tests/test_merge_pull_request.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -20,18 +20,17 @@
import pytest
-from rhodecode.model.db import UserLog
+from rhodecode.model.db import UserLog, PullRequest
from rhodecode.model.meta import Session
-from rhodecode.model.pull_request import PullRequestModel
from rhodecode.tests import TEST_USER_ADMIN_LOGIN
from rhodecode.api.tests.utils import (
- build_data, api_call, assert_error)
+ build_data, api_call, assert_error, assert_ok)
@pytest.mark.usefixtures("testuser_api", "app")
class TestMergePullRequest(object):
@pytest.mark.backends("git", "hg")
- def test_api_merge_pull_request(self, pr_util, no_notifications):
+ def test_api_merge_pull_request_merge_failed(self, pr_util, no_notifications):
pull_request = pr_util.create_pull_request(mergeable=True)
author = pull_request.user_id
repo = pull_request.target_repo.repo_id
@@ -51,6 +50,41 @@ class TestMergePullRequest(object):
# it.
Session().add(pull_request)
+ expected = 'merge not possible for following reasons: ' \
+ 'Pull request reviewer approval is pending.'
+ assert_error(id_, expected, given=response.body)
+
+ @pytest.mark.backends("git", "hg")
+ def test_api_merge_pull_request(self, pr_util, no_notifications):
+ pull_request = pr_util.create_pull_request(mergeable=True, approved=True)
+ author = pull_request.user_id
+ repo = pull_request.target_repo.repo_id
+ pull_request_id = pull_request.pull_request_id
+ pull_request_repo = pull_request.target_repo.repo_name
+
+ id_, params = build_data(
+ self.apikey, 'comment_pull_request',
+ repoid=pull_request_repo,
+ pullrequestid=pull_request_id,
+ status='approved')
+
+ response = api_call(self.app, params)
+ expected = {
+ 'comment_id': response.json.get('result', {}).get('comment_id'),
+ 'pull_request_id': pull_request_id,
+ 'status': {'given': 'approved', 'was_changed': True}
+ }
+ assert_ok(id_, expected, given=response.body)
+
+ id_, params = build_data(
+ self.apikey, 'merge_pull_request',
+ repoid=pull_request_repo,
+ pullrequestid=pull_request_id)
+
+ response = api_call(self.app, params)
+
+ pull_request = PullRequest.get(pull_request_id)
+
expected = {
'executed': True,
'failure_reason': 0,
@@ -59,8 +93,7 @@ class TestMergePullRequest(object):
'merge_ref': pull_request.shadow_merge_ref._asdict()
}
- response_json = response.json['result']
- assert response_json == expected
+ assert_ok(id_, expected, response.body)
action = 'user_merged_pull_request:%d' % (pull_request_id, )
journal = UserLog.query()\
@@ -75,8 +108,7 @@ class TestMergePullRequest(object):
repoid=pull_request_repo, pullrequestid=pull_request_id)
response = api_call(self.app, params)
- expected = 'pull request `%s` merge failed, pull request is closed' % (
- pull_request_id)
+ expected = 'merge not possible for following reasons: This pull request is closed.'
assert_error(id_, expected, given=response.body)
@pytest.mark.backends("git", "hg")
diff --git a/rhodecode/api/tests/test_pull.py b/rhodecode/api/tests/test_pull.py
--- a/rhodecode/api/tests/test_pull.py
+++ b/rhodecode/api/tests/test_pull.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/tests/test_remove_field_from_repo.py b/rhodecode/api/tests/test_remove_field_from_repo.py
--- a/rhodecode/api/tests/test_remove_field_from_repo.py
+++ b/rhodecode/api/tests/test_remove_field_from_repo.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/tests/test_remove_user_from_user_group.py b/rhodecode/api/tests/test_remove_user_from_user_group.py
--- a/rhodecode/api/tests/test_remove_user_from_user_group.py
+++ b/rhodecode/api/tests/test_remove_user_from_user_group.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/tests/test_repo_locking.py b/rhodecode/api/tests/test_repo_locking.py
--- a/rhodecode/api/tests/test_repo_locking.py
+++ b/rhodecode/api/tests/test_repo_locking.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/tests/test_rescan_repos.py b/rhodecode/api/tests/test_rescan_repos.py
--- a/rhodecode/api/tests/test_rescan_repos.py
+++ b/rhodecode/api/tests/test_rescan_repos.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/tests/test_revoke_user_group_permission.py b/rhodecode/api/tests/test_revoke_user_group_permission.py
--- a/rhodecode/api/tests/test_revoke_user_group_permission.py
+++ b/rhodecode/api/tests/test_revoke_user_group_permission.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/tests/test_revoke_user_group_permission_from_repo_group.py b/rhodecode/api/tests/test_revoke_user_group_permission_from_repo_group.py
--- a/rhodecode/api/tests/test_revoke_user_group_permission_from_repo_group.py
+++ b/rhodecode/api/tests/test_revoke_user_group_permission_from_repo_group.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/tests/test_revoke_user_group_permission_from_user_group.py b/rhodecode/api/tests/test_revoke_user_group_permission_from_user_group.py
--- a/rhodecode/api/tests/test_revoke_user_group_permission_from_user_group.py
+++ b/rhodecode/api/tests/test_revoke_user_group_permission_from_user_group.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/tests/test_revoke_user_permission.py b/rhodecode/api/tests/test_revoke_user_permission.py
--- a/rhodecode/api/tests/test_revoke_user_permission.py
+++ b/rhodecode/api/tests/test_revoke_user_permission.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/tests/test_revoke_user_permission_from_repo_group.py b/rhodecode/api/tests/test_revoke_user_permission_from_repo_group.py
--- a/rhodecode/api/tests/test_revoke_user_permission_from_repo_group.py
+++ b/rhodecode/api/tests/test_revoke_user_permission_from_repo_group.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/tests/test_revoke_user_permission_from_user_group.py b/rhodecode/api/tests/test_revoke_user_permission_from_user_group.py
--- a/rhodecode/api/tests/test_revoke_user_permission_from_user_group.py
+++ b/rhodecode/api/tests/test_revoke_user_permission_from_user_group.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/tests/test_update_pull_request.py b/rhodecode/api/tests/test_update_pull_request.py
--- a/rhodecode/api/tests/test_update_pull_request.py
+++ b/rhodecode/api/tests/test_update_pull_request.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -24,7 +24,8 @@ from rhodecode.lib.vcs.nodes import File
from rhodecode.model.db import User
from rhodecode.model.pull_request import PullRequestModel
from rhodecode.tests import TEST_USER_ADMIN_LOGIN
-from rhodecode.api.tests.utils import (build_data, api_call)
+from rhodecode.api.tests.utils import (
+ build_data, api_call, assert_ok, assert_error)
@pytest.mark.usefixtures("testuser_api", "app")
@@ -74,8 +75,7 @@ class TestUpdatePullRequest(object):
expected = 'pull request `{}` update failed, pull request ' \
'is closed'.format(pull_request.pull_request_id)
- response_json = response.json['error']
- assert response_json == expected
+ assert_error(id_, expected, response.body)
@pytest.mark.backends("git", "hg")
def test_api_update_update_commits(
@@ -90,9 +90,11 @@ class TestUpdatePullRequest(object):
pr_util.update_source_repository(head='c')
repo = pull_request.source_repo.scm_instance()
commits = [x for x in repo.get_commits()]
+ print commits
added_commit_id = commits[-1].raw_id # c commit
- common_commits = commits[1].raw_id # b commit is common ancestor
+ common_commit_id = commits[1].raw_id # b commit is common ancestor
+ total_commits = [added_commit_id, common_commit_id]
id_, params = build_data(
self.apikey, 'update_pull_request',
@@ -107,12 +109,13 @@ class TestUpdatePullRequest(object):
pull_request.pull_request_id),
"pull_request": response.json['result']['pull_request'],
"updated_commits": {"added": [added_commit_id],
- "common": [common_commits], "removed": []},
+ "common": [common_commit_id],
+ "total": total_commits,
+ "removed": []},
"updated_reviewers": {"added": [], "removed": []},
}
- response_json = response.json['result']
- assert response_json == expected
+ assert_ok(id_, expected, response.body)
@pytest.mark.backends("git", "hg")
def test_api_update_change_reviewers(
@@ -139,8 +142,7 @@ class TestUpdatePullRequest(object):
"updated_reviewers": {"added": added, "removed": removed},
}
- response_json = response.json['result']
- assert response_json == expected
+ assert_ok(id_, expected, response.body)
@pytest.mark.backends("git", "hg")
def test_api_update_bad_user_in_reviewers(self, pr_util):
@@ -155,8 +157,7 @@ class TestUpdatePullRequest(object):
expected = 'user `bad_name` does not exist'
- response_json = response.json['error']
- assert response_json == expected
+ assert_error(id_, expected, response.body)
@pytest.mark.backends("git", "hg")
def test_api_update_repo_error(self, pr_util):
@@ -184,9 +185,7 @@ class TestUpdatePullRequest(object):
response = api_call(self.app, params)
expected = 'pull request `999999` does not exist'
-
- response_json = response.json['error']
- assert response_json == expected
+ assert_error(id_, expected, response.body)
@pytest.mark.backends("git", "hg")
def test_api_update_pull_request_no_perms_to_update(
@@ -203,5 +202,4 @@ class TestUpdatePullRequest(object):
expected = ('pull request `%s` update failed, '
'no permission to update.') % pull_request.pull_request_id
- response_json = response.json['error']
- assert response_json == expected
+ assert_error(id_, expected, response.body)
diff --git a/rhodecode/api/tests/test_update_repo.py b/rhodecode/api/tests/test_update_repo.py
--- a/rhodecode/api/tests/test_update_repo.py
+++ b/rhodecode/api/tests/test_update_repo.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/tests/test_update_repo_group.py b/rhodecode/api/tests/test_update_repo_group.py
--- a/rhodecode/api/tests/test_update_repo_group.py
+++ b/rhodecode/api/tests/test_update_repo_group.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/tests/test_update_user.py b/rhodecode/api/tests/test_update_user.py
--- a/rhodecode/api/tests/test_update_user.py
+++ b/rhodecode/api/tests/test_update_user.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/tests/test_update_user_group.py b/rhodecode/api/tests/test_update_user_group.py
--- a/rhodecode/api/tests/test_update_user_group.py
+++ b/rhodecode/api/tests/test_update_user_group.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/tests/test_utils.py b/rhodecode/api/tests/test_utils.py
--- a/rhodecode/api/tests/test_utils.py
+++ b/rhodecode/api/tests/test_utils.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/tests/utils.py b/rhodecode/api/tests/utils.py
--- a/rhodecode/api/tests/utils.py
+++ b/rhodecode/api/tests/utils.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/utils.py b/rhodecode/api/utils.py
--- a/rhodecode/api/utils.py
+++ b/rhodecode/api/utils.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2014-2016 RhodeCode GmbH
+# Copyright (C) 2014-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -26,11 +26,12 @@ import collections
import logging
from rhodecode.api.exc import JSONRPCError
-from rhodecode.lib.auth import HasPermissionAnyApi, HasRepoPermissionAnyApi, \
- HasRepoGroupPermissionAnyApi
+from rhodecode.lib.auth import (
+ HasPermissionAnyApi, HasRepoPermissionAnyApi, HasRepoGroupPermissionAnyApi)
from rhodecode.lib.utils import safe_unicode
+from rhodecode.lib.vcs.exceptions import RepositoryError
from rhodecode.controllers.utils import get_commit_from_ref_name
-from rhodecode.lib.vcs.exceptions import RepositoryError
+from rhodecode.lib.utils2 import str2bool
log = logging.getLogger(__name__)
@@ -92,7 +93,7 @@ class Optional(object):
return self.type_
@classmethod
- def extract(cls, val, evaluate_locals=None):
+ def extract(cls, val, evaluate_locals=None, binary=None):
"""
Extracts value from Optional() instance
@@ -101,7 +102,11 @@ class Optional(object):
value of instance
"""
if isinstance(val, cls):
- return val.getval(evaluate_locals)
+ val = val.getval(evaluate_locals)
+
+ if binary:
+ val = str2bool(val)
+
return val
diff --git a/rhodecode/api/views/__init__.py b/rhodecode/api/views/__init__.py
--- a/rhodecode/api/views/__init__.py
+++ b/rhodecode/api/views/__init__.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2015-2016 RhodeCode GmbH
+# Copyright (C) 2015-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/views/deprecated_api.py b/rhodecode/api/views/deprecated_api.py
--- a/rhodecode/api/views/deprecated_api.py
+++ b/rhodecode/api/views/deprecated_api.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2011-2016 RhodeCode GmbH
+# Copyright (C) 2011-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/views/gist_api.py b/rhodecode/api/views/gist_api.py
--- a/rhodecode/api/views/gist_api.py
+++ b/rhodecode/api/views/gist_api.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2011-2016 RhodeCode GmbH
+# Copyright (C) 2011-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/views/pull_request_api.py b/rhodecode/api/views/pull_request_api.py
--- a/rhodecode/api/views/pull_request_api.py
+++ b/rhodecode/api/views/pull_request_api.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2011-2016 RhodeCode GmbH
+# Copyright (C) 2011-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -30,9 +30,9 @@ from rhodecode.lib.auth import (HasRepoP
from rhodecode.lib.base import vcs_operation_context
from rhodecode.lib.utils2 import str2bool
from rhodecode.model.changeset_status import ChangesetStatusModel
-from rhodecode.model.comment import ChangesetCommentsModel
-from rhodecode.model.db import Session, ChangesetStatus
-from rhodecode.model.pull_request import PullRequestModel
+from rhodecode.model.comment import CommentsModel
+from rhodecode.model.db import Session, ChangesetStatus, ChangesetComment
+from rhodecode.model.pull_request import PullRequestModel, MergeCheck
from rhodecode.model.settings import SettingsModel
log = logging.getLogger(__name__)
@@ -270,13 +270,14 @@ def merge_pull_request(request, apiuser,
raise JSONRPCError('userid is not the same as your user')
pull_request = get_pull_request_or_error(pullrequestid)
- if not PullRequestModel().check_user_merge(
- pull_request, apiuser, api=True):
- raise JSONRPCError('repository `%s` does not exist' % (repoid,))
- if pull_request.is_closed():
+
+ check = MergeCheck.validate(pull_request, user=apiuser)
+ merge_possible = not check.failed
+
+ if not merge_possible:
+ reasons = ','.join([msg for _e, msg in check.errors])
raise JSONRPCError(
- 'pull request `%s` merge failed, pull request is closed' % (
- pullrequestid,))
+ 'merge not possible for following reasons: {}'.format(reasons))
target_repo = pull_request.target_repo
extras = vcs_operation_context(
@@ -359,9 +360,12 @@ def close_pull_request(request, apiuser,
@jsonrpc_method()
-def comment_pull_request(request, apiuser, repoid, pullrequestid,
- message=Optional(None), status=Optional(None),
- userid=Optional(OAttr('apiuser'))):
+def comment_pull_request(
+ request, apiuser, repoid, pullrequestid, message=Optional(None),
+ commit_id=Optional(None), status=Optional(None),
+ comment_type=Optional(ChangesetComment.COMMENT_TYPE_NOTE),
+ resolves_comment_id=Optional(None),
+ userid=Optional(OAttr('apiuser'))):
"""
Comment on the pull request specified with the `pullrequestid`,
in the |repo| specified by the `repoid`, and optionally change the
@@ -373,15 +377,18 @@ def comment_pull_request(request, apiuse
:type repoid: str or int
:param pullrequestid: The pull request ID.
:type pullrequestid: int
+ :param commit_id: Specify the commit_id for which to set a comment. If
+ given commit_id is different than latest in the PR status
+ change won't be performed.
+ :type commit_id: str
:param message: The text content of the comment.
:type message: str
:param status: (**Optional**) Set the approval status of the pull
- request. Valid options are:
- * not_reviewed
- * approved
- * rejected
- * under_review
+ request. One of: 'not_reviewed', 'approved', 'rejected',
+ 'under_review'
:type status: str
+ :param comment_type: Comment type, one of: 'note', 'todo'
+ :type comment_type: Optional(str), default: 'note'
:param userid: Comment on the pull request as this user
:type userid: Optional(str or int)
@@ -393,7 +400,9 @@ def comment_pull_request(request, apiuse
result :
{
"pull_request_id": "",
- "comment_id": ""
+ "comment_id": "",
+ "status": {"given": ,
+ "was_changed": },
}
error : null
"""
@@ -412,37 +421,68 @@ def comment_pull_request(request, apiuse
raise JSONRPCError('repository `%s` does not exist' % (repoid,))
message = Optional.extract(message)
status = Optional.extract(status)
+ commit_id = Optional.extract(commit_id)
+ comment_type = Optional.extract(comment_type)
+ resolves_comment_id = Optional.extract(resolves_comment_id)
+
if not message and not status:
- raise JSONRPCError('message and status parameter missing')
+ raise JSONRPCError(
+ 'Both message and status parameters are missing. '
+ 'At least one is required.')
if (status not in (st[0] for st in ChangesetStatus.STATUSES) and
status is not None):
- raise JSONRPCError('unknown comment status`%s`' % status)
+ raise JSONRPCError('Unknown comment status: `%s`' % status)
+
+ if commit_id and commit_id not in pull_request.revisions:
+ raise JSONRPCError(
+ 'Invalid commit_id `%s` for this pull request.' % commit_id)
allowed_to_change_status = PullRequestModel().check_user_change_status(
pull_request, apiuser)
+
+ # if commit_id is passed re-validated if user is allowed to change status
+ # based on latest commit_id from the PR
+ if commit_id:
+ commit_idx = pull_request.revisions.index(commit_id)
+ if commit_idx != 0:
+ allowed_to_change_status = False
+
+ if resolves_comment_id:
+ comment = ChangesetComment.get(resolves_comment_id)
+ if not comment:
+ raise JSONRPCError(
+ 'Invalid resolves_comment_id `%s` for this pull request.'
+ % resolves_comment_id)
+ if comment.comment_type != ChangesetComment.COMMENT_TYPE_TODO:
+ raise JSONRPCError(
+ 'Comment `%s` is wrong type for setting status to resolved.'
+ % resolves_comment_id)
+
text = message
+ status_label = ChangesetStatus.get_status_lbl(status)
if status and allowed_to_change_status:
- st_message = (('Status change %(transition_icon)s %(status)s')
- % {'transition_icon': '>',
- 'status': ChangesetStatus.get_status_lbl(status)})
+ st_message = ('Status change %(transition_icon)s %(status)s'
+ % {'transition_icon': '>', 'status': status_label})
text = message or st_message
rc_config = SettingsModel().get_all_settings()
renderer = rc_config.get('rhodecode_markup_renderer', 'rst')
- comment = ChangesetCommentsModel().create(
+
+ status_change = status and allowed_to_change_status
+ comment = CommentsModel().create(
text=text,
repo=pull_request.target_repo.repo_id,
user=apiuser.user_id,
pull_request=pull_request.pull_request_id,
f_path=None,
line_no=None,
- status_change=(ChangesetStatus.get_status_lbl(status)
- if status and allowed_to_change_status else None),
- status_change_type=(status
- if status and allowed_to_change_status else None),
+ status_change=(status_label if status_change else None),
+ status_change_type=(status if status_change else None),
closing_pr=False,
- renderer=renderer
+ renderer=renderer,
+ comment_type=comment_type,
+ resolves_comment_id=resolves_comment_id
)
if allowed_to_change_status and status:
@@ -458,8 +498,8 @@ def comment_pull_request(request, apiuse
Session().commit()
data = {
'pull_request_id': pull_request.pull_request_id,
- 'comment_id': comment.comment_id,
- 'status': status
+ 'comment_id': comment.comment_id if comment else None,
+ 'status': {'given': status, 'was_changed': status_change},
}
return data
diff --git a/rhodecode/api/views/repo_api.py b/rhodecode/api/views/repo_api.py
--- a/rhodecode/api/views/repo_api.py
+++ b/rhodecode/api/views/repo_api.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2011-2016 RhodeCode GmbH
+# Copyright (C) 2011-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -34,9 +34,10 @@ from rhodecode.lib.exceptions import Sta
from rhodecode.lib.utils2 import str2bool, time_to_datetime
from rhodecode.lib.ext_json import json
from rhodecode.model.changeset_status import ChangesetStatusModel
-from rhodecode.model.comment import ChangesetCommentsModel
+from rhodecode.model.comment import CommentsModel
from rhodecode.model.db import (
- Session, ChangesetStatus, RepositoryField, Repository)
+ Session, ChangesetStatus, RepositoryField, Repository, RepoGroup,
+ ChangesetComment)
from rhodecode.model.repo import RepoModel
from rhodecode.model.scm import ScmModel, RepoList
from rhodecode.model.settings import SettingsModel, VcsSettingsModel
@@ -217,7 +218,7 @@ def get_repo(request, apiuser, repoid, c
@jsonrpc_method()
-def get_repos(request, apiuser):
+def get_repos(request, apiuser, root=Optional(None), traverse=Optional(True)):
"""
Lists all existing repositories.
@@ -226,6 +227,14 @@ def get_repos(request, apiuser):
:param apiuser: This is filled automatically from the |authtoken|.
:type apiuser: AuthUser
+ :param root: specify root repository group to fetch repositories.
+ filters the returned repositories to be members of given root group.
+ :type root: Optional(None)
+ :param traverse: traverse given root into subrepositories. With this flag
+ set to False, it will only return top-level repositories from `root`.
+ if root is empty it will return just top-level repositories.
+ :type traverse: Optional(True)
+
Example output:
@@ -257,8 +266,28 @@ def get_repos(request, apiuser):
_perms = ('repository.read', 'repository.write', 'repository.admin',)
extras = {'user': apiuser}
- repo_list = RepoList(
- RepoModel().get_all(), perm_set=_perms, extra_kwargs=extras)
+ root = Optional.extract(root)
+ traverse = Optional.extract(traverse, binary=True)
+
+ if root:
+ # verify parent existance, if it's empty return an error
+ parent = RepoGroup.get_by_group_name(root)
+ if not parent:
+ raise JSONRPCError(
+ 'Root repository group `{}` does not exist'.format(root))
+
+ if traverse:
+ repos = RepoModel().get_repos_for_root(root=root, traverse=traverse)
+ else:
+ repos = RepoModel().get_repos_for_root(root=parent)
+ else:
+ if traverse:
+ repos = RepoModel().get_all()
+ else:
+ # return just top-level
+ repos = RepoModel().get_repos_for_root(root=None)
+
+ repo_list = RepoList(repos, perm_set=_perms, extra_kwargs=extras)
return [repo.get_api_data(include_secrets=include_secrets)
for repo in repo_list]
@@ -1354,8 +1383,10 @@ def lock(request, apiuser, repoid, locke
@jsonrpc_method()
def comment_commit(
- request, apiuser, repoid, commit_id, message,
- userid=Optional(OAttr('apiuser')), status=Optional(None)):
+ request, apiuser, repoid, commit_id, message, status=Optional(None),
+ comment_type=Optional(ChangesetComment.COMMENT_TYPE_NOTE),
+ resolves_comment_id=Optional(None),
+ userid=Optional(OAttr('apiuser'))):
"""
Set a commit comment, and optionally change the status of the commit.
@@ -1367,15 +1398,17 @@ def comment_commit(
:type commit_id: str
:param message: The comment text.
:type message: str
+ :param status: (**Optional**) status of commit, one of: 'not_reviewed',
+ 'approved', 'rejected', 'under_review'
+ :type status: str
+ :param comment_type: Comment type, one of: 'note', 'todo'
+ :type comment_type: Optional(str), default: 'note'
:param userid: Set the user name of the comment creator.
:type userid: Optional(str or int)
- :param status: status, one of 'not_reviewed', 'approved', 'rejected',
- 'under_review'
- :type status: str
Example error output:
- .. code-block:: json
+ .. code-block:: bash
{
"id" : ,
@@ -1398,21 +1431,37 @@ def comment_commit(
user = get_user_or_error(userid)
status = Optional.extract(status)
+ comment_type = Optional.extract(comment_type)
+ resolves_comment_id = Optional.extract(resolves_comment_id)
allowed_statuses = [x[0] for x in ChangesetStatus.STATUSES]
if status and status not in allowed_statuses:
raise JSONRPCError('Bad status, must be on '
'of %s got %s' % (allowed_statuses, status,))
+ if resolves_comment_id:
+ comment = ChangesetComment.get(resolves_comment_id)
+ if not comment:
+ raise JSONRPCError(
+ 'Invalid resolves_comment_id `%s` for this commit.'
+ % resolves_comment_id)
+ if comment.comment_type != ChangesetComment.COMMENT_TYPE_TODO:
+ raise JSONRPCError(
+ 'Comment `%s` is wrong type for setting status to resolved.'
+ % resolves_comment_id)
+
try:
rc_config = SettingsModel().get_all_settings()
renderer = rc_config.get('rhodecode_markup_renderer', 'rst')
status_change_label = ChangesetStatus.get_status_lbl(status)
- comm = ChangesetCommentsModel().create(
- message, repo, user, revision=commit_id,
+ comm = CommentsModel().create(
+ message, repo, user, commit_id=commit_id,
status_change=status_change_label,
status_change_type=status,
- renderer=renderer)
+ renderer=renderer,
+ comment_type=comment_type,
+ resolves_comment_id=resolves_comment_id
+ )
if status:
# also do a status change
try:
diff --git a/rhodecode/api/views/repo_group_api.py b/rhodecode/api/views/repo_group_api.py
--- a/rhodecode/api/views/repo_group_api.py
+++ b/rhodecode/api/views/repo_group_api.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2011-2016 RhodeCode GmbH
+# Copyright (C) 2011-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/views/server_api.py b/rhodecode/api/views/server_api.py
--- a/rhodecode/api/views/server_api.py
+++ b/rhodecode/api/views/server_api.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2011-2016 RhodeCode GmbH
+# Copyright (C) 2011-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -26,6 +26,8 @@ from rhodecode.api import jsonrpc_method
from rhodecode.api.utils import (
Optional, OAttr, has_superadmin_permission, get_user_or_error)
from rhodecode.lib.utils import repo2db_mapper
+from rhodecode.lib import system_info
+from rhodecode.lib import user_sessions
from rhodecode.model.db import UserIpMap
from rhodecode.model.scm import ScmModel
@@ -176,3 +178,67 @@ def rescan_repos(request, apiuser, remov
'Error occurred during rescan repositories action'
)
+
+@jsonrpc_method()
+def cleanup_sessions(request, apiuser, older_then=Optional(60)):
+ """
+ Triggers a session cleanup action.
+
+ If the ``older_then`` option is set, only sessions that hasn't been
+ accessed in the given number of days will be removed.
+
+ This command can only be run using an |authtoken| with admin rights to
+ the specified repository.
+
+ This command takes the following options:
+
+ :param apiuser: This is filled automatically from the |authtoken|.
+ :type apiuser: AuthUser
+ :param older_then: Deletes session that hasn't been accessed
+ in given number of days.
+ :type older_then: Optional(int)
+
+ Example output:
+
+ .. code-block:: bash
+
+ id :
+ result: {
+ "backend": "",
+ "sessions_removed":
+ }
+ error : null
+
+ Example error output:
+
+ .. code-block:: bash
+
+ id :
+ result : null
+ error : {
+ 'Error occurred during session cleanup'
+ }
+
+ """
+ if not has_superadmin_permission(apiuser):
+ raise JSONRPCForbidden()
+
+ older_then = Optional.extract(older_then)
+ older_than_seconds = 60 * 60 * 24 * older_then
+
+ config = system_info.rhodecode_config().get_value()['value']['config']
+ session_model = user_sessions.get_session_handler(
+ config.get('beaker.session.type', 'memory'))(config)
+
+ backend = session_model.SESSION_TYPE
+ try:
+ cleaned = session_model.clean_sessions(
+ older_than_seconds=older_than_seconds)
+ return {'sessions_removed': cleaned, 'backend': backend}
+ except user_sessions.CleanupCommand as msg:
+ return {'cleanup_command': msg.message, 'backend': backend}
+ except Exception as e:
+ log.exception('Failed session cleanup')
+ raise JSONRPCError(
+ 'Error occurred during session cleanup'
+ )
diff --git a/rhodecode/api/views/testing_api.py b/rhodecode/api/views/testing_api.py
--- a/rhodecode/api/views/testing_api.py
+++ b/rhodecode/api/views/testing_api.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2011-2016 RhodeCode GmbH
+# Copyright (C) 2011-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/views/user_api.py b/rhodecode/api/views/user_api.py
--- a/rhodecode/api/views/user_api.py
+++ b/rhodecode/api/views/user_api.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2011-2016 RhodeCode GmbH
+# Copyright (C) 2011-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/api/views/user_group_api.py b/rhodecode/api/views/user_group_api.py
--- a/rhodecode/api/views/user_group_api.py
+++ b/rhodecode/api/views/user_group_api.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2011-2016 RhodeCode GmbH
+# Copyright (C) 2011-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/authentication/__init__.py b/rhodecode/authentication/__init__.py
--- a/rhodecode/authentication/__init__.py
+++ b/rhodecode/authentication/__init__.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2012-2016 RhodeCode GmbH
+# Copyright (C) 2012-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/authentication/base.py b/rhodecode/authentication/base.py
--- a/rhodecode/authentication/base.py
+++ b/rhodecode/authentication/base.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/authentication/interface.py b/rhodecode/authentication/interface.py
--- a/rhodecode/authentication/interface.py
+++ b/rhodecode/authentication/interface.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2012-2016 RhodeCode GmbH
+# Copyright (C) 2012-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/authentication/plugins/auth_crowd.py b/rhodecode/authentication/plugins/auth_crowd.py
--- a/rhodecode/authentication/plugins/auth_crowd.py
+++ b/rhodecode/authentication/plugins/auth_crowd.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2012-2016 RhodeCode GmbH
+# Copyright (C) 2012-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -197,14 +197,14 @@ class RhodeCodeAuthPlugin(RhodeCodeExter
config.add_view(
'rhodecode.authentication.views.AuthnPluginViewBase',
attr='settings_get',
- renderer='rhodecode:templates/admin/auth/plugin_settings.html',
+ renderer='rhodecode:templates/admin/auth/plugin_settings.mako',
request_method='GET',
route_name='auth_home',
context=CrowdAuthnResource)
config.add_view(
'rhodecode.authentication.views.AuthnPluginViewBase',
attr='settings_post',
- renderer='rhodecode:templates/admin/auth/plugin_settings.html',
+ renderer='rhodecode:templates/admin/auth/plugin_settings.mako',
request_method='POST',
route_name='auth_home',
context=CrowdAuthnResource)
diff --git a/rhodecode/authentication/plugins/auth_headers.py b/rhodecode/authentication/plugins/auth_headers.py
--- a/rhodecode/authentication/plugins/auth_headers.py
+++ b/rhodecode/authentication/plugins/auth_headers.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2012-2016 RhodeCode GmbH
+# Copyright (C) 2012-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -83,14 +83,14 @@ class RhodeCodeAuthPlugin(RhodeCodeExter
config.add_view(
'rhodecode.authentication.views.AuthnPluginViewBase',
attr='settings_get',
- renderer='rhodecode:templates/admin/auth/plugin_settings.html',
+ renderer='rhodecode:templates/admin/auth/plugin_settings.mako',
request_method='GET',
route_name='auth_home',
context=HeadersAuthnResource)
config.add_view(
'rhodecode.authentication.views.AuthnPluginViewBase',
attr='settings_post',
- renderer='rhodecode:templates/admin/auth/plugin_settings.html',
+ renderer='rhodecode:templates/admin/auth/plugin_settings.mako',
request_method='POST',
route_name='auth_home',
context=HeadersAuthnResource)
diff --git a/rhodecode/authentication/plugins/auth_jasig_cas.py b/rhodecode/authentication/plugins/auth_jasig_cas.py
--- a/rhodecode/authentication/plugins/auth_jasig_cas.py
+++ b/rhodecode/authentication/plugins/auth_jasig_cas.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2012-2016 RhodeCode GmbH
+# Copyright (C) 2012-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -74,14 +74,14 @@ class RhodeCodeAuthPlugin(RhodeCodeExter
config.add_view(
'rhodecode.authentication.views.AuthnPluginViewBase',
attr='settings_get',
- renderer='rhodecode:templates/admin/auth/plugin_settings.html',
+ renderer='rhodecode:templates/admin/auth/plugin_settings.mako',
request_method='GET',
route_name='auth_home',
context=JasigCasAuthnResource)
config.add_view(
'rhodecode.authentication.views.AuthnPluginViewBase',
attr='settings_post',
- renderer='rhodecode:templates/admin/auth/plugin_settings.html',
+ renderer='rhodecode:templates/admin/auth/plugin_settings.mako',
request_method='POST',
route_name='auth_home',
context=JasigCasAuthnResource)
diff --git a/rhodecode/authentication/plugins/auth_ldap.py b/rhodecode/authentication/plugins/auth_ldap.py
--- a/rhodecode/authentication/plugins/auth_ldap.py
+++ b/rhodecode/authentication/plugins/auth_ldap.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -332,14 +332,14 @@ class RhodeCodeAuthPlugin(RhodeCodeExter
config.add_view(
'rhodecode.authentication.views.AuthnPluginViewBase',
attr='settings_get',
- renderer='rhodecode:templates/admin/auth/plugin_settings.html',
+ renderer='rhodecode:templates/admin/auth/plugin_settings.mako',
request_method='GET',
route_name='auth_home',
context=LdapAuthnResource)
config.add_view(
'rhodecode.authentication.views.AuthnPluginViewBase',
attr='settings_post',
- renderer='rhodecode:templates/admin/auth/plugin_settings.html',
+ renderer='rhodecode:templates/admin/auth/plugin_settings.mako',
request_method='POST',
route_name='auth_home',
context=LdapAuthnResource)
diff --git a/rhodecode/authentication/plugins/auth_pam.py b/rhodecode/authentication/plugins/auth_pam.py
--- a/rhodecode/authentication/plugins/auth_pam.py
+++ b/rhodecode/authentication/plugins/auth_pam.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2012-2016 RhodeCode GmbH
+# Copyright (C) 2012-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -82,14 +82,14 @@ class RhodeCodeAuthPlugin(RhodeCodeExter
config.add_view(
'rhodecode.authentication.views.AuthnPluginViewBase',
attr='settings_get',
- renderer='rhodecode:templates/admin/auth/plugin_settings.html',
+ renderer='rhodecode:templates/admin/auth/plugin_settings.mako',
request_method='GET',
route_name='auth_home',
context=PamAuthnResource)
config.add_view(
'rhodecode.authentication.views.AuthnPluginViewBase',
attr='settings_post',
- renderer='rhodecode:templates/admin/auth/plugin_settings.html',
+ renderer='rhodecode:templates/admin/auth/plugin_settings.mako',
request_method='POST',
route_name='auth_home',
context=PamAuthnResource)
diff --git a/rhodecode/authentication/plugins/auth_rhodecode.py b/rhodecode/authentication/plugins/auth_rhodecode.py
--- a/rhodecode/authentication/plugins/auth_rhodecode.py
+++ b/rhodecode/authentication/plugins/auth_rhodecode.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2012-2016 RhodeCode GmbH
+# Copyright (C) 2012-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -52,14 +52,14 @@ class RhodeCodeAuthPlugin(RhodeCodeAuthP
config.add_view(
'rhodecode.authentication.views.AuthnPluginViewBase',
attr='settings_get',
- renderer='rhodecode:templates/admin/auth/plugin_settings.html',
+ renderer='rhodecode:templates/admin/auth/plugin_settings.mako',
request_method='GET',
route_name='auth_home',
context=RhodecodeAuthnResource)
config.add_view(
'rhodecode.authentication.views.AuthnPluginViewBase',
attr='settings_post',
- renderer='rhodecode:templates/admin/auth/plugin_settings.html',
+ renderer='rhodecode:templates/admin/auth/plugin_settings.mako',
request_method='POST',
route_name='auth_home',
context=RhodecodeAuthnResource)
diff --git a/rhodecode/authentication/plugins/auth_token.py b/rhodecode/authentication/plugins/auth_token.py
--- a/rhodecode/authentication/plugins/auth_token.py
+++ b/rhodecode/authentication/plugins/auth_token.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2016-2016 RhodeCode GmbH
+# Copyright (C) 2016-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -55,14 +55,14 @@ class RhodeCodeAuthPlugin(RhodeCodeAuthP
config.add_view(
'rhodecode.authentication.views.AuthnPluginViewBase',
attr='settings_get',
- renderer='rhodecode:templates/admin/auth/plugin_settings.html',
+ renderer='rhodecode:templates/admin/auth/plugin_settings.mako',
request_method='GET',
route_name='auth_home',
context=RhodecodeAuthnResource)
config.add_view(
'rhodecode.authentication.views.AuthnPluginViewBase',
attr='settings_post',
- renderer='rhodecode:templates/admin/auth/plugin_settings.html',
+ renderer='rhodecode:templates/admin/auth/plugin_settings.mako',
request_method='POST',
route_name='auth_home',
context=RhodecodeAuthnResource)
diff --git a/rhodecode/authentication/registry.py b/rhodecode/authentication/registry.py
--- a/rhodecode/authentication/registry.py
+++ b/rhodecode/authentication/registry.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2012-2016 RhodeCode GmbH
+# Copyright (C) 2012-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/authentication/routes.py b/rhodecode/authentication/routes.py
--- a/rhodecode/authentication/routes.py
+++ b/rhodecode/authentication/routes.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2012-2016 RhodeCode GmbH
+# Copyright (C) 2012-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/authentication/schema.py b/rhodecode/authentication/schema.py
--- a/rhodecode/authentication/schema.py
+++ b/rhodecode/authentication/schema.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2012-2016 RhodeCode GmbH
+# Copyright (C) 2012-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/authentication/tests/conftest.py b/rhodecode/authentication/tests/conftest.py
--- a/rhodecode/authentication/tests/conftest.py
+++ b/rhodecode/authentication/tests/conftest.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2016-2016 RhodeCode GmbH
+# Copyright (C) 2016-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/authentication/tests/functional/test_settings.py b/rhodecode/authentication/tests/functional/test_settings.py
--- a/rhodecode/authentication/tests/functional/test_settings.py
+++ b/rhodecode/authentication/tests/functional/test_settings.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2016-2016 RhodeCode GmbH
+# Copyright (C) 2016-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/authentication/tests/test_auth_plugin_base.py b/rhodecode/authentication/tests/test_auth_plugin_base.py
--- a/rhodecode/authentication/tests/test_auth_plugin_base.py
+++ b/rhodecode/authentication/tests/test_auth_plugin_base.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2016 RhodeCode GmbH
+# Copyright (C) 2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/authentication/views.py b/rhodecode/authentication/views.py
--- a/rhodecode/authentication/views.py
+++ b/rhodecode/authentication/views.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2012-2016 RhodeCode GmbH
+# Copyright (C) 2012-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -134,7 +134,7 @@ class AuthSettingsView(object):
'available_plugins': authn_registry.get_plugins(),
'enabled_plugins': enabled_plugins,
}
- html = render('rhodecode:templates/admin/auth/auth_settings.html',
+ html = render('rhodecode:templates/admin/auth/auth_settings.mako',
template_context,
request=self.request)
diff --git a/rhodecode/channelstream/__init__.py b/rhodecode/channelstream/__init__.py
--- a/rhodecode/channelstream/__init__.py
+++ b/rhodecode/channelstream/__init__.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -46,7 +46,7 @@ PLUGIN_DEFINITION = {
'javascript': [],
'css': [],
'template_hooks': {
- 'plugin_init_template': 'rhodecode:templates/channelstream/plugin_init.html'
+ 'plugin_init_template': 'rhodecode:templates/channelstream/plugin_init.mako'
},
'url_gen': url_gen,
'static': None,
diff --git a/rhodecode/channelstream/views.py b/rhodecode/channelstream/views.py
--- a/rhodecode/channelstream/views.py
+++ b/rhodecode/channelstream/views.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -62,7 +62,7 @@ class ChannelstreamView(object):
registry = request.registry
self.channelstream_config = registry.rhodecode_plugins['channelstream']
if not self.channelstream_config.get('enabled'):
- log.exception('Channelstream plugin is disabled')
+ log.error('Channelstream plugin is disabled')
raise HTTPBadRequest()
@NotAnonymous()
diff --git a/rhodecode/config/__init__.py b/rhodecode/config/__init__.py
--- a/rhodecode/config/__init__.py
+++ b/rhodecode/config/__init__.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/config/conf.py b/rhodecode/config/conf.py
--- a/rhodecode/config/conf.py
+++ b/rhodecode/config/conf.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2013-2016 RhodeCode GmbH
+# Copyright (C) 2013-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/config/environment.py b/rhodecode/config/environment.py
--- a/rhodecode/config/environment.py
+++ b/rhodecode/config/environment.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/config/jsroutes.py b/rhodecode/config/jsroutes.py
--- a/rhodecode/config/jsroutes.py
+++ b/rhodecode/config/jsroutes.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/config/middleware.py b/rhodecode/config/middleware.py
--- a/rhodecode/config/middleware.py
+++ b/rhodecode/config/middleware.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -52,7 +52,8 @@ from rhodecode.lib.middleware.https_fixu
from rhodecode.lib.middleware.vcs import VCSMiddleware
from rhodecode.lib.plugins.utils import register_rhodecode_plugin
from rhodecode.lib.utils2 import aslist as rhodecode_aslist
-from rhodecode.subscribers import scan_repositories_if_enabled
+from rhodecode.subscribers import (
+ scan_repositories_if_enabled, write_metadata_if_needed)
log = logging.getLogger(__name__)
@@ -232,6 +233,14 @@ def error_handler(exception, request):
if isinstance(exception, HTTPError):
base_response = exception
+ def is_http_error(response):
+ # error which should have traceback
+ return response.status_code > 499
+
+ if is_http_error(base_response):
+ log.exception(
+ 'error occurred handling this request for path: %s', request.path)
+
c = AttributeDict()
c.error_message = base_response.status
c.error_explanation = base_response.explanation or str(base_response)
@@ -251,7 +260,7 @@ def error_handler(exception, request):
c.causes = base_response.causes
response = render_to_response(
- '/errors/error_document.html', {'c': c}, request=request,
+ '/errors/error_document.mako', {'c': c}, request=request,
response=base_response)
return response
@@ -283,8 +292,12 @@ def includeme(config):
config.add_route(
'rhodecode_support', 'https://rhodecode.com/help/', static=True)
+ config.add_translation_dirs('rhodecode:i18n/')
+ settings['default_locale_name'] = settings.get('lang', 'en')
+
# Add subscribers.
config.add_subscriber(scan_repositories_if_enabled, ApplicationCreated)
+ config.add_subscriber(write_metadata_if_needed, ApplicationCreated)
# Set the authorization policy.
authz_policy = ACLAuthorizationPolicy()
@@ -320,6 +333,13 @@ def includeme_first(config):
config.add_view(favicon_redirect, route_name='favicon')
config.add_route('favicon', '/favicon.ico')
+ def robots_redirect(context, request):
+ return HTTPFound(
+ request.static_path('rhodecode:public/robots.txt'))
+
+ config.add_view(robots_redirect, route_name='robots')
+ config.add_route('robots', '/robots.txt')
+
config.add_static_view(
'_static/deform', 'deform:static')
config.add_static_view(
@@ -351,7 +371,6 @@ def wrap_app_in_wsgi_middlewares(pyramid
pyramid_app = make_gzip_middleware(
pyramid_app, settings, compress_level=1)
-
# this should be the outer most middleware in the wsgi stack since
# middleware like Routes make database calls
def pyramid_app_with_cleanup(environ, start_response):
diff --git a/rhodecode/config/patches.py b/rhodecode/config/patches.py
--- a/rhodecode/config/patches.py
+++ b/rhodecode/config/patches.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2016-2016 RhodeCode GmbH
+# Copyright (C) 2016-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/config/routing.py b/rhodecode/config/routing.py
--- a/rhodecode/config/routing.py
+++ b/rhodecode/config/routing.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -503,12 +503,6 @@ def make_map(config):
m.connect('admin_settings_search', '/settings/search',
action='settings_search', conditions={'method': ['GET']})
- m.connect('admin_settings_system', '/settings/system',
- action='settings_system', conditions={'method': ['GET']})
-
- m.connect('admin_settings_system_update', '/settings/system/updates',
- action='settings_system_update', conditions={'method': ['GET']})
-
m.connect('admin_settings_supervisor', '/settings/supervisor',
action='settings_supervisor', conditions={'method': ['GET']})
m.connect('admin_settings_supervisor_log', '/settings/supervisor/{procid}/log',
@@ -566,6 +560,10 @@ def make_map(config):
'/my_account/toggle_visibility',
action='my_notifications_toggle_visibility',
conditions={'method': ['POST']})
+ m.connect('my_account_notifications_test_channelstream',
+ '/my_account/test_channelstream',
+ action='my_account_notifications_test_channelstream',
+ conditions={'method': ['POST']})
# NOTIFICATION REST ROUTES
with rmap.submapper(path_prefix=ADMIN_PREFIX,
@@ -624,9 +622,11 @@ def make_map(config):
'pull_requests_global_0', '/pull_requests/{pull_request_id:[0-9]+}',
action='pull_requests')
m.connect(
- 'pull_requests_global', '/pull-requests/{pull_request_id:[0-9]+}',
+ 'pull_requests_global_1', '/pull-requests/{pull_request_id:[0-9]+}',
action='pull_requests')
-
+ m.connect(
+ 'pull_requests_global', '/pull-request/{pull_request_id:[0-9]+}',
+ action='pull_requests')
# USER JOURNAL
rmap.connect('journal', '%s/journal' % (ADMIN_PREFIX,),
@@ -694,8 +694,8 @@ def make_map(config):
requirements=URL_NAME_REQUIREMENTS, jsroute=True)
rmap.connect('repo_refs_data', '/{repo_name}/refs-data',
- controller='summary', action='repo_refs_data', jsroute=True,
- requirements=URL_NAME_REQUIREMENTS)
+ controller='summary', action='repo_refs_data',
+ requirements=URL_NAME_REQUIREMENTS, jsroute=True)
rmap.connect('repo_refs_changelog_data', '/{repo_name}/refs-data-changelog',
controller='summary', action='repo_refs_changelog_data',
requirements=URL_NAME_REQUIREMENTS, jsroute=True)
@@ -704,9 +704,9 @@ def make_map(config):
jsroute=True, requirements=URL_NAME_REQUIREMENTS)
rmap.connect('changeset_home', '/{repo_name}/changeset/{revision}',
- controller='changeset', revision='tip', jsroute=True,
+ controller='changeset', revision='tip',
conditions={'function': check_repo},
- requirements=URL_NAME_REQUIREMENTS)
+ requirements=URL_NAME_REQUIREMENTS, jsroute=True)
rmap.connect('changeset_children', '/{repo_name}/changeset_children/{revision}',
controller='changeset', revision='tip', action='changeset_children',
conditions={'function': check_repo},
@@ -923,7 +923,7 @@ def make_map(config):
controller='pullrequests',
action='show', conditions={'function': check_repo,
'method': ['GET']},
- requirements=URL_NAME_REQUIREMENTS)
+ requirements=URL_NAME_REQUIREMENTS, jsroute=True)
rmap.connect('pullrequest_update',
'/{repo_name}/pull-request/{pull_request_id}',
@@ -997,10 +997,10 @@ def make_map(config):
conditions={'function': check_repo},
requirements=URL_NAME_REQUIREMENTS, jsroute=True)
- rmap.connect('changelog_details', '/{repo_name}/changelog_details/{cs}',
- controller='changelog', action='changelog_details',
+ rmap.connect('changelog_elements', '/{repo_name}/changelog_details',
+ controller='changelog', action='changelog_elements',
conditions={'function': check_repo},
- requirements=URL_NAME_REQUIREMENTS)
+ requirements=URL_NAME_REQUIREMENTS, jsroute=True)
rmap.connect('files_home', '/{repo_name}/files/{revision}/{f_path}',
controller='files', revision='tip', f_path='',
@@ -1064,7 +1064,7 @@ def make_map(config):
'/{repo_name}/annotate/{revision}/{f_path}',
controller='files', action='index', revision='tip',
f_path='', annotate=True, conditions={'function': check_repo},
- requirements=URL_NAME_REQUIREMENTS)
+ requirements=URL_NAME_REQUIREMENTS, jsroute=True)
rmap.connect('files_edit',
'/{repo_name}/edit/{revision}/{f_path}',
diff --git a/rhodecode/config/routing_links.py b/rhodecode/config/routing_links.py
--- a/rhodecode/config/routing_links.py
+++ b/rhodecode/config/routing_links.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/config/utils.py b/rhodecode/config/utils.py
--- a/rhodecode/config/utils.py
+++ b/rhodecode/config/utils.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/controllers/__init__.py b/rhodecode/controllers/__init__.py
--- a/rhodecode/controllers/__init__.py
+++ b/rhodecode/controllers/__init__.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/controllers/admin/__init__.py b/rhodecode/controllers/admin/__init__.py
--- a/rhodecode/controllers/admin/__init__.py
+++ b/rhodecode/controllers/admin/__init__.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/controllers/admin/admin.py b/rhodecode/controllers/admin/admin.py
--- a/rhodecode/controllers/admin/admin.py
+++ b/rhodecode/controllers/admin/admin.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -153,11 +153,11 @@ class AdminController(BaseController):
c.users_log = Page(users_log, page=p, items_per_page=10,
url=url_generator)
- c.log_data = render('admin/admin_log.html')
+ c.log_data = render('admin/admin_log.mako')
if request.is_xhr:
return c.log_data
- return render('admin/admin.html')
+ return render('admin/admin.mako')
# global redirect doesn't need permissions
def pull_requests(self, pull_request_id):
diff --git a/rhodecode/controllers/admin/defaults.py b/rhodecode/controllers/admin/defaults.py
--- a/rhodecode/controllers/admin/defaults.py
+++ b/rhodecode/controllers/admin/defaults.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -57,7 +57,7 @@ class DefaultsController(BaseController)
defaults = SettingsModel().get_default_repo_settings()
return htmlfill.render(
- render('admin/defaults/defaults.html'),
+ render('admin/defaults/defaults.mako'),
defaults=defaults,
encoding="UTF-8",
force_defaults=False
@@ -88,7 +88,7 @@ class DefaultsController(BaseController)
defaults = errors.value
return htmlfill.render(
- render('admin/defaults/defaults.html'),
+ render('admin/defaults/defaults.mako'),
defaults=defaults,
errors=errors.error_dict or {},
prefix_error=False,
diff --git a/rhodecode/controllers/admin/gists.py b/rhodecode/controllers/admin/gists.py
--- a/rhodecode/controllers/admin/gists.py
+++ b/rhodecode/controllers/admin/gists.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2013-2016 RhodeCode GmbH
+# Copyright (C) 2013-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -114,7 +114,7 @@ class GistsController(BaseController):
c.active = 'public'
from rhodecode.lib.utils import PartialRenderer
- _render = PartialRenderer('data_table/_dt_elements.html')
+ _render = PartialRenderer('data_table/_dt_elements.mako')
data = []
@@ -130,7 +130,7 @@ class GistsController(BaseController):
'description': _render('gist_description', gist.gist_description)
})
c.data = json.dumps(data)
- return render('admin/gists/index.html')
+ return render('admin/gists/index.mako')
@LoginRequired()
@NotAnonymous()
@@ -186,7 +186,7 @@ class GistsController(BaseController):
del errors['nodes.0.filename']
return formencode.htmlfill.render(
- render('admin/gists/new.html'),
+ render('admin/gists/new.mako'),
defaults=defaults,
errors=errors,
prefix_error=False,
@@ -202,11 +202,11 @@ class GistsController(BaseController):
@LoginRequired()
@NotAnonymous()
- def new(self, format='html'):
+ def new(self):
"""GET /admin/gists/new: Form to create a new item"""
# url('new_gist')
self.__load_defaults()
- return render('admin/gists/new.html')
+ return render('admin/gists/new.mako')
@LoginRequired()
@NotAnonymous()
@@ -266,7 +266,7 @@ class GistsController(BaseController):
if (f_path is None or f.path == f_path)])
response.content_type = 'text/plain'
return content
- return render('admin/gists/show.html')
+ return render('admin/gists/show.mako')
@LoginRequired()
@NotAnonymous()
@@ -322,7 +322,9 @@ class GistsController(BaseController):
@LoginRequired()
@NotAnonymous()
- def edit_form(self, gist_id, format='html'):
+ def edit_form(self, gist_id):
+ translate = _ = c.pyramid_request.translate
+
"""GET /admin/gists/gist_id/edit: Form to edit an existing item"""
# url('edit_gist', gist_id=ID)
self._add_gist_to_context(gist_id)
@@ -342,9 +344,11 @@ class GistsController(BaseController):
else:
# this cannot use timeago, since it's used in select2 as a value
expiry = h.age(h.time_to_datetime(c.gist.gist_expires))
+
+ expiry = translate(expiry)
self.__load_defaults(
extra_values=(0, _('%(expiry)s - current value') % {'expiry': expiry}))
- return render('admin/gists/edit.html')
+ return render('admin/gists/edit.mako')
@LoginRequired()
@NotAnonymous()
diff --git a/rhodecode/controllers/admin/my_account.py b/rhodecode/controllers/admin/my_account.py
--- a/rhodecode/controllers/admin/my_account.py
+++ b/rhodecode/controllers/admin/my_account.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2013-2016 RhodeCode GmbH
+# Copyright (C) 2013-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -24,13 +24,16 @@ my account controller for RhodeCode admi
"""
import logging
+import datetime
import formencode
from formencode import htmlfill
+from pyramid.threadlocal import get_current_registry
from pylons import request, tmpl_context as c, url, session
from pylons.controllers.util import redirect
from pylons.i18n.translation import _
from sqlalchemy.orm import joinedload
+from webob.exc import HTTPBadGateway
from rhodecode import forms
from rhodecode.lib import helpers as h
@@ -41,6 +44,8 @@ from rhodecode.lib.base import BaseContr
from rhodecode.lib.utils import jsonify
from rhodecode.lib.utils2 import safe_int, md5, str2bool
from rhodecode.lib.ext_json import json
+from rhodecode.lib.channelstream import channelstream_request, \
+ ChannelstreamException
from rhodecode.model.validation_schema.schemas import user_schema
from rhodecode.model.db import (
@@ -52,7 +57,7 @@ from rhodecode.model.repo import RepoMod
from rhodecode.model.auth_token import AuthTokenModel
from rhodecode.model.meta import Session
from rhodecode.model.pull_request import PullRequestModel
-from rhodecode.model.comment import ChangesetCommentsModel
+from rhodecode.model.comment import CommentsModel
log = logging.getLogger(__name__)
@@ -76,6 +81,9 @@ class MyAccountController(BaseController
" crucial for entire application"), category='warning')
return redirect(url('users'))
+ c.auth_user = AuthUser(
+ user_id=c.rhodecode_user.user_id, ip_addr=self.ip_addr)
+
def _load_my_repos_data(self, watched=False):
if watched:
admin = False
@@ -104,8 +112,7 @@ class MyAccountController(BaseController
# url('my_account')
c.active = 'profile_edit'
self.__load_data()
- c.perm_user = AuthUser(user_id=c.rhodecode_user.user_id,
- ip_addr=self.ip_addr)
+ c.perm_user = c.auth_user
c.extern_type = c.user.extern_type
c.extern_name = c.user.extern_name
@@ -137,7 +144,7 @@ class MyAccountController(BaseController
except formencode.Invalid as errors:
return htmlfill.render(
- render('admin/my_account/my_account.html'),
+ render('admin/my_account/my_account.mako'),
defaults=errors.value,
errors=errors.error_dict or {},
prefix_error=False,
@@ -152,7 +159,7 @@ class MyAccountController(BaseController
return redirect('my_account')
return htmlfill.render(
- render('admin/my_account/my_account.html'),
+ render('admin/my_account/my_account.mako'),
defaults=defaults,
encoding="UTF-8",
force_defaults=False
@@ -168,7 +175,7 @@ class MyAccountController(BaseController
defaults = c.user.get_dict()
return htmlfill.render(
- render('admin/my_account/my_account.html'),
+ render('admin/my_account/my_account.mako'),
defaults=defaults, encoding="UTF-8", force_defaults=False)
def my_account_edit(self):
@@ -177,14 +184,13 @@ class MyAccountController(BaseController
"""
c.active = 'profile_edit'
self.__load_data()
- c.perm_user = AuthUser(user_id=c.rhodecode_user.user_id,
- ip_addr=self.ip_addr)
+ c.perm_user = c.auth_user
c.extern_type = c.user.extern_type
c.extern_name = c.user.extern_name
defaults = c.user.get_dict()
return htmlfill.render(
- render('admin/my_account/my_account.html'),
+ render('admin/my_account/my_account.mako'),
defaults=defaults,
encoding="UTF-8",
force_defaults=False
@@ -194,6 +200,7 @@ class MyAccountController(BaseController
def my_account_password(self):
c.active = 'password'
self.__load_data()
+ c.extern_type = c.user.extern_type
schema = user_schema.ChangePasswordSchema().bind(
username=c.rhodecode_user.username)
@@ -201,7 +208,7 @@ class MyAccountController(BaseController
form = forms.Form(schema,
buttons=(forms.buttons.save, forms.buttons.reset))
- if request.method == 'POST':
+ if request.method == 'POST' and c.extern_type == 'rhodecode':
controls = request.POST.items()
try:
valid_data = form.validate(controls)
@@ -228,7 +235,7 @@ class MyAccountController(BaseController
return redirect(url('my_account_password'))
c.form = form
- return render('admin/my_account/my_account.html')
+ return render('admin/my_account/my_account.mako')
def my_account_repos(self):
c.active = 'repos'
@@ -236,7 +243,7 @@ class MyAccountController(BaseController
# json used to render the grid
c.data = self._load_my_repos_data()
- return render('admin/my_account/my_account.html')
+ return render('admin/my_account/my_account.mako')
def my_account_watched(self):
c.active = 'watched'
@@ -244,15 +251,14 @@ class MyAccountController(BaseController
# json used to render the grid
c.data = self._load_my_repos_data(watched=True)
- return render('admin/my_account/my_account.html')
+ return render('admin/my_account/my_account.mako')
def my_account_perms(self):
c.active = 'perms'
self.__load_data()
- c.perm_user = AuthUser(user_id=c.rhodecode_user.user_id,
- ip_addr=self.ip_addr)
+ c.perm_user = c.auth_user
- return render('admin/my_account/my_account.html')
+ return render('admin/my_account/my_account.mako')
def my_account_emails(self):
c.active = 'emails'
@@ -260,7 +266,7 @@ class MyAccountController(BaseController
c.user_email_map = UserEmailMap.query()\
.filter(UserEmailMap.user == c.user).all()
- return render('admin/my_account/my_account.html')
+ return render('admin/my_account/my_account.mako')
@auth.CSRFRequired()
def my_account_emails_add(self):
@@ -312,11 +318,11 @@ class MyAccountController(BaseController
user_id=c.rhodecode_user.user_id, statuses=statuses)
from rhodecode.lib.utils import PartialRenderer
- _render = PartialRenderer('data_table/_dt_elements.html')
+ _render = PartialRenderer('data_table/_dt_elements.mako')
data = []
for pr in pull_requests:
repo_id = pr.target_repo_id
- comments = ChangesetCommentsModel().get_all_comments(
+ comments = CommentsModel().get_all_comments(
repo_id, pull_request=pr)
owned = pr.user_id == c.rhodecode_user.user_id
status = pr.calculated_review_status()
@@ -366,7 +372,7 @@ class MyAccountController(BaseController
if not request.is_xhr:
c.data_participate = json.dumps(data['data'])
c.records_total_participate = data['recordsTotal']
- return render('admin/my_account/my_account.html')
+ return render('admin/my_account/my_account.mako')
else:
return json.dumps(data)
@@ -387,7 +393,7 @@ class MyAccountController(BaseController
c.role_options = [(c.role_values, _("Role"))]
c.user_auth_tokens = AuthTokenModel().get_auth_tokens(
c.rhodecode_user.user_id, show_expired=show_expired)
- return render('admin/my_account/my_account.html')
+ return render('admin/my_account/my_account.mako')
@auth.CSRFRequired()
def my_account_auth_tokens_add(self):
@@ -420,7 +426,7 @@ class MyAccountController(BaseController
def my_notifications(self):
c.active = 'notifications'
- return render('admin/my_account/my_account.html')
+ return render('admin/my_account/my_account.mako')
@auth.CSRFRequired()
@jsonify
@@ -430,3 +436,33 @@ class MyAccountController(BaseController
user.update_userdata(notification_status=new_status)
Session().commit()
return user.user_data['notification_status']
+
+ @auth.CSRFRequired()
+ @jsonify
+ def my_account_notifications_test_channelstream(self):
+ message = 'Test message sent via Channelstream by user: {}, on {}'.format(
+ c.rhodecode_user.username, datetime.datetime.now())
+ payload = {
+ 'type': 'message',
+ 'timestamp': datetime.datetime.utcnow(),
+ 'user': 'system',
+ #'channel': 'broadcast',
+ 'pm_users': [c.rhodecode_user.username],
+ 'message': {
+ 'message': message,
+ 'level': 'info',
+ 'topic': '/notifications'
+ }
+ }
+
+ registry = get_current_registry()
+ rhodecode_plugins = getattr(registry, 'rhodecode_plugins', {})
+ channelstream_config = rhodecode_plugins.get('channelstream', {})
+
+ try:
+ channelstream_request(channelstream_config, [payload], '/message')
+ except ChannelstreamException as e:
+ log.exception('Failed to send channelstream data')
+ return {"response": 'ERROR: {}'.format(e.__class__.__name__)}
+ return {"response": 'Channelstream data sent. '
+ 'You should see a new live message now.'}
diff --git a/rhodecode/controllers/admin/notifications.py b/rhodecode/controllers/admin/notifications.py
--- a/rhodecode/controllers/admin/notifications.py
+++ b/rhodecode/controllers/admin/notifications.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -82,9 +82,9 @@ class NotificationsController(BaseContro
c.current_filter = 'comment'
if request.is_xhr:
- return render('admin/notifications/notifications_data.html')
+ return render('admin/notifications/notifications_data.mako')
- return render('admin/notifications/notifications.html')
+ return render('admin/notifications/notifications.mako')
@auth.CSRFRequired()
@@ -102,7 +102,7 @@ class NotificationsController(BaseContro
url('notifications'), request.GET)
c.notifications = Page(notif, page=1, items_per_page=10,
url=notifications_url)
- return render('admin/notifications/notifications_data.html')
+ return render('admin/notifications/notifications_data.mako')
def _has_permissions(self, notification):
def is_owner():
@@ -173,6 +173,6 @@ class NotificationsController(BaseContro
Session().commit()
c.notification = no
- return render('admin/notifications/show_notification.html')
+ return render('admin/notifications/show_notification.mako')
return abort(403)
diff --git a/rhodecode/controllers/admin/permissions.py b/rhodecode/controllers/admin/permissions.py
--- a/rhodecode/controllers/admin/permissions.py
+++ b/rhodecode/controllers/admin/permissions.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -80,7 +80,7 @@ class PermissionsController(BaseControll
defaults.update(c.user.get_default_perms())
return htmlfill.render(
- render('admin/permissions/permissions.html'),
+ render('admin/permissions/permissions.mako'),
defaults=defaults,
encoding="UTF-8",
force_defaults=False)
@@ -116,7 +116,7 @@ class PermissionsController(BaseControll
defaults = errors.value
return htmlfill.render(
- render('admin/permissions/permissions.html'),
+ render('admin/permissions/permissions.mako'),
defaults=defaults,
errors=errors.error_dict or {},
prefix_error=False,
@@ -137,7 +137,7 @@ class PermissionsController(BaseControll
defaults = {}
defaults.update(c.user.get_default_perms())
return htmlfill.render(
- render('admin/permissions/permissions.html'),
+ render('admin/permissions/permissions.mako'),
defaults=defaults,
encoding="UTF-8",
force_defaults=False)
@@ -165,7 +165,7 @@ class PermissionsController(BaseControll
defaults = errors.value
return htmlfill.render(
- render('admin/permissions/permissions.html'),
+ render('admin/permissions/permissions.mako'),
defaults=defaults,
errors=errors.error_dict or {},
prefix_error=False,
@@ -188,7 +188,7 @@ class PermissionsController(BaseControll
defaults.update(c.user.get_default_perms())
return htmlfill.render(
- render('admin/permissions/permissions.html'),
+ render('admin/permissions/permissions.mako'),
defaults=defaults,
encoding="UTF-8",
force_defaults=False)
@@ -219,7 +219,7 @@ class PermissionsController(BaseControll
defaults = errors.value
return htmlfill.render(
- render('admin/permissions/permissions.html'),
+ render('admin/permissions/permissions.mako'),
defaults=defaults,
errors=errors.error_dict or {},
prefix_error=False,
@@ -239,11 +239,11 @@ class PermissionsController(BaseControll
c.user_ip_map = (
UserIpMap.query().filter(UserIpMap.user == c.user).all())
- return render('admin/permissions/permissions.html')
+ return render('admin/permissions/permissions.mako')
@HasPermissionAllDecorator('hg.admin')
def permission_perms(self):
c.active = 'perms'
c.user = User.get_default_user()
c.perm_user = c.user.AuthUser
- return render('admin/permissions/permissions.html')
+ return render('admin/permissions/permissions.mako')
diff --git a/rhodecode/controllers/admin/repo_groups.py b/rhodecode/controllers/admin/repo_groups.py
--- a/rhodecode/controllers/admin/repo_groups.py
+++ b/rhodecode/controllers/admin/repo_groups.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -162,7 +162,7 @@ class RepoGroupsController(BaseControlle
repo_group_data = RepoGroupModel().get_repo_groups_as_dict(
repo_group_list=repo_group_list_acl, admin=True)
c.data = json.dumps(repo_group_data)
- return render('admin/repo_groups/repo_groups.html')
+ return render('admin/repo_groups/repo_groups.mako')
# perm checks inside
@NotAnonymous()
@@ -199,7 +199,7 @@ class RepoGroupsController(BaseControlle
# TODO: in futureaction_logger(, '', '', '', self.sa)
except formencode.Invalid as errors:
return htmlfill.render(
- render('admin/repo_groups/repo_group_add.html'),
+ render('admin/repo_groups/repo_group_add.mako'),
defaults=errors.value,
errors=errors.error_dict or {},
prefix_error=False,
@@ -224,7 +224,7 @@ class RepoGroupsController(BaseControlle
return abort(403)
self.__load_defaults()
- return render('admin/repo_groups/repo_group_add.html')
+ return render('admin/repo_groups/repo_group_add.mako')
@HasRepoGroupPermissionAnyDecorator('group.admin')
@auth.CSRFRequired()
@@ -263,7 +263,7 @@ class RepoGroupsController(BaseControlle
except formencode.Invalid as errors:
c.active = 'settings'
return htmlfill.render(
- render('admin/repo_groups/repo_group_edit.html'),
+ render('admin/repo_groups/repo_group_edit.mako'),
defaults=errors.value,
errors=errors.error_dict or {},
prefix_error=False,
@@ -338,7 +338,7 @@ class RepoGroupsController(BaseControlle
defaults = self.__load_data(c.repo_group.group_id)
return htmlfill.render(
- render('admin/repo_groups/repo_group_edit.html'),
+ render('admin/repo_groups/repo_group_edit.mako'),
defaults=defaults,
encoding="UTF-8",
force_defaults=False
@@ -351,7 +351,7 @@ class RepoGroupsController(BaseControlle
c.active = 'advanced'
c.repo_group = RepoGroupModel()._get_repo_group(group_name)
- return render('admin/repo_groups/repo_group_edit.html')
+ return render('admin/repo_groups/repo_group_edit.mako')
@HasRepoGroupPermissionAnyDecorator('group.admin')
def edit_repo_group_perms(self, group_name):
@@ -363,7 +363,7 @@ class RepoGroupsController(BaseControlle
defaults = self.__load_data(c.repo_group.group_id)
return htmlfill.render(
- render('admin/repo_groups/repo_group_edit.html'),
+ render('admin/repo_groups/repo_group_edit.mako'),
defaults=defaults,
encoding="UTF-8",
force_defaults=False
diff --git a/rhodecode/controllers/admin/repos.py b/rhodecode/controllers/admin/repos.py
--- a/rhodecode/controllers/admin/repos.py
+++ b/rhodecode/controllers/admin/repos.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2013-2016 RhodeCode GmbH
+# Copyright (C) 2013-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -147,7 +147,7 @@ class ReposController(BaseRepoController
# json used to render the grid
c.data = json.dumps(repos_data)
- return render('admin/repos/repos.html')
+ return render('admin/repos/repos.mako')
# perms check inside
@NotAnonymous()
@@ -175,7 +175,7 @@ class ReposController(BaseRepoController
task_id = task.task_id
except formencode.Invalid as errors:
return htmlfill.render(
- render('admin/repos/repo_add.html'),
+ render('admin/repos/repo_add.mako'),
defaults=errors.value,
errors=errors.error_dict or {},
prefix_error=False,
@@ -235,7 +235,7 @@ class ReposController(BaseRepoController
defaults.update({'repo_group': parent_group_choice})
return htmlfill.render(
- render('admin/repos/repo_add.html'),
+ render('admin/repos/repo_add.mako'),
defaults=defaults,
errors={},
prefix_error=False,
@@ -249,7 +249,7 @@ class ReposController(BaseRepoController
c.task_id = request.GET.get('task_id')
if not c.repo:
raise HTTPNotFound()
- return render('admin/repos/repo_creating.html')
+ return render('admin/repos/repo_creating.mako')
@NotAnonymous()
@jsonify
@@ -334,7 +334,7 @@ class ReposController(BaseRepoController
defaults = self.__load_data(repo_name)
defaults.update(errors.value)
return htmlfill.render(
- render('admin/repos/repo_edit.html'),
+ render('admin/repos/repo_edit.mako'),
defaults=defaults,
errors=errors.error_dict or {},
prefix_error=False,
@@ -410,7 +410,7 @@ class ReposController(BaseRepoController
c.personal_repo_group = c.rhodecode_user.personal_repo_group
c.active = 'settings'
return htmlfill.render(
- render('admin/repos/repo_edit.html'),
+ render('admin/repos/repo_edit.mako'),
defaults=defaults,
encoding="UTF-8",
force_defaults=False)
@@ -424,7 +424,7 @@ class ReposController(BaseRepoController
defaults = RepoModel()._get_defaults(repo_name)
return htmlfill.render(
- render('admin/repos/repo_edit.html'),
+ render('admin/repos/repo_edit.mako'),
defaults=defaults,
encoding="UTF-8",
force_defaults=False)
@@ -454,7 +454,7 @@ class ReposController(BaseRepoController
if request.POST:
return redirect(url('repo_edit_fields'))
- return render('admin/repos/repo_edit.html')
+ return render('admin/repos/repo_edit.mako')
@HasRepoPermissionAllDecorator('repository.admin')
@auth.CSRFRequired()
@@ -509,7 +509,7 @@ class ReposController(BaseRepoController
if request.POST:
return redirect(url('repo_edit_advanced'))
- return render('admin/repos/repo_edit.html')
+ return render('admin/repos/repo_edit.mako')
@HasRepoPermissionAllDecorator('repository.admin')
@auth.CSRFRequired()
@@ -642,7 +642,7 @@ class ReposController(BaseRepoController
c.repo_info = self._load_repo(repo_name)
c.active = 'caches'
- return render('admin/repos/repo_edit.html')
+ return render('admin/repos/repo_edit.mako')
@HasRepoPermissionAllDecorator('repository.admin')
@auth.CSRFRequired()
@@ -664,7 +664,7 @@ class ReposController(BaseRepoController
c.repo_info = self._load_repo(repo_name)
c.active = 'remote'
- return render('admin/repos/repo_edit.html')
+ return render('admin/repos/repo_edit.mako')
@HasRepoPermissionAllDecorator('repository.admin')
@auth.CSRFRequired()
@@ -702,7 +702,7 @@ class ReposController(BaseRepoController
c.active = 'statistics'
- return render('admin/repos/repo_edit.html')
+ return render('admin/repos/repo_edit.mako')
@HasRepoPermissionAllDecorator('repository.admin')
@auth.CSRFRequired()
@@ -771,7 +771,7 @@ class ReposController(BaseRepoController
c.global_patterns = c.settings_model.get_global_settings()
c.repo_patterns = c.settings_model.get_repo_settings()
- return render('admin/repos/repo_edit.html')
+ return render('admin/repos/repo_edit.mako')
@HasRepoPermissionAllDecorator('repository.admin')
def repo_settings_vcs(self, repo_name):
@@ -791,7 +791,7 @@ class ReposController(BaseRepoController
rhodecode.CONFIG.get('labs_settings_active', 'true'))
return htmlfill.render(
- render('admin/repos/repo_edit.html'),
+ render('admin/repos/repo_edit.mako'),
defaults=defaults,
encoding="UTF-8",
force_defaults=False)
@@ -819,7 +819,7 @@ class ReposController(BaseRepoController
_("Some form inputs contain invalid data."),
category='error')
return htmlfill.render(
- render('admin/repos/repo_edit.html'),
+ render('admin/repos/repo_edit.mako'),
defaults=errors.value,
errors=errors.error_dict or {},
prefix_error=False,
@@ -842,7 +842,7 @@ class ReposController(BaseRepoController
return redirect(url('repo_vcs_settings', repo_name=repo_name))
return htmlfill.render(
- render('admin/repos/repo_edit.html'),
+ render('admin/repos/repo_edit.mako'),
defaults=self._vcs_form_defaults(repo_name),
encoding="UTF-8",
force_defaults=False)
diff --git a/rhodecode/controllers/admin/settings.py b/rhodecode/controllers/admin/settings.py
--- a/rhodecode/controllers/admin/settings.py
+++ b/rhodecode/controllers/admin/settings.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -25,15 +25,13 @@ settings controller for rhodecode admin
import collections
import logging
-import urllib2
import datetime
import formencode
from formencode import htmlfill
-import packaging.version
from pylons import request, tmpl_context as c, url, config
from pylons.controllers.util import redirect
-from pylons.i18n.translation import _, lazy_ugettext
+from pylons.i18n.translation import _
from pyramid.threadlocal import get_current_registry
from webob.exc import HTTPBadRequest
@@ -48,7 +46,6 @@ from rhodecode.lib.utils import repo2db_
from rhodecode.lib.utils2 import (
str2bool, safe_unicode, AttributeDict, safe_int)
from rhodecode.lib.compat import OrderedDict
-from rhodecode.lib.ext_json import json
from rhodecode.lib.utils import jsonify
from rhodecode.model.db import RhodeCodeUi, Repository
@@ -150,7 +147,7 @@ class SettingsController(BaseController)
_("Some form inputs contain invalid data."),
category='error')
return htmlfill.render(
- render('admin/settings/settings.html'),
+ render('admin/settings/settings.mako'),
defaults=errors.value,
errors=errors.error_dict or {},
prefix_error=False,
@@ -179,7 +176,7 @@ class SettingsController(BaseController)
return redirect(url('admin_settings_vcs'))
return htmlfill.render(
- render('admin/settings/settings.html'),
+ render('admin/settings/settings.mako'),
defaults=self._form_defaults(),
encoding="UTF-8",
force_defaults=False)
@@ -198,7 +195,7 @@ class SettingsController(BaseController)
c.svn_proxy_generate_config = pyramid_settings[generate_config]
return htmlfill.render(
- render('admin/settings/settings.html'),
+ render('admin/settings/settings.mako'),
defaults=self._form_defaults(),
encoding="UTF-8",
force_defaults=False)
@@ -235,7 +232,7 @@ class SettingsController(BaseController)
c.active = 'mapping'
return htmlfill.render(
- render('admin/settings/settings.html'),
+ render('admin/settings/settings.mako'),
defaults=self._form_defaults(),
encoding="UTF-8",
force_defaults=False)
@@ -253,7 +250,7 @@ class SettingsController(BaseController)
form_result = application_form.to_python(dict(request.POST))
except formencode.Invalid as errors:
return htmlfill.render(
- render('admin/settings/settings.html'),
+ render('admin/settings/settings.mako'),
defaults=errors.value,
errors=errors.error_dict or {},
prefix_error=False,
@@ -296,7 +293,7 @@ class SettingsController(BaseController)
.get_personal_group_name_pattern()
return htmlfill.render(
- render('admin/settings/settings.html'),
+ render('admin/settings/settings.mako'),
defaults=self._form_defaults(),
encoding="UTF-8",
force_defaults=False)
@@ -312,7 +309,7 @@ class SettingsController(BaseController)
form_result = application_form.to_python(dict(request.POST))
except formencode.Invalid as errors:
return htmlfill.render(
- render('admin/settings/settings.html'),
+ render('admin/settings/settings.mako'),
defaults=errors.value,
errors=errors.error_dict or {},
prefix_error=False,
@@ -360,7 +357,7 @@ class SettingsController(BaseController)
c.active = 'visual'
return htmlfill.render(
- render('admin/settings/settings.html'),
+ render('admin/settings/settings.mako'),
defaults=self._form_defaults(),
encoding="UTF-8",
force_defaults=False)
@@ -406,7 +403,7 @@ class SettingsController(BaseController)
'desc': defaults.get('rhodecode_issuetracker_desc_' + uid),
})
- return render('admin/settings/settings.html')
+ return render('admin/settings/settings.mako')
@HasPermissionAllDecorator('hg.admin')
@auth.CSRFRequired()
@@ -469,7 +466,7 @@ class SettingsController(BaseController)
c.rhodecode_ini = rhodecode.CONFIG
return htmlfill.render(
- render('admin/settings/settings.html'),
+ render('admin/settings/settings.mako'),
defaults=self._form_defaults(),
encoding="UTF-8",
force_defaults=False)
@@ -526,7 +523,7 @@ class SettingsController(BaseController)
c.custom_hooks = model.get_custom_hooks()
return htmlfill.render(
- render('admin/settings/settings.html'),
+ render('admin/settings/settings.mako'),
defaults=self._form_defaults(),
encoding="UTF-8",
force_defaults=False)
@@ -541,154 +538,7 @@ class SettingsController(BaseController)
searcher = searcher_from_config(config)
c.statistics = searcher.statistics()
- return render('admin/settings/settings.html')
-
- @HasPermissionAllDecorator('hg.admin')
- def settings_system(self):
- """GET /admin/settings/system: All items in the collection"""
- # url('admin_settings_system')
- snapshot = str2bool(request.GET.get('snapshot'))
- defaults = self._form_defaults()
-
- c.active = 'system'
- c.rhodecode_update_url = defaults.get('rhodecode_update_url')
- server_info = ScmModel().get_server_info(request.environ)
-
- for key, val in server_info.iteritems():
- setattr(c, key, val)
-
- def val(name, subkey='human_value'):
- return server_info[name][subkey]
-
- def state(name):
- return server_info[name]['state']
-
- def val2(name):
- val = server_info[name]['human_value']
- state = server_info[name]['state']
- return val, state
-
- c.data_items = [
- # update info
- (_('Update info'), h.literal(
- '%s.' % (
- _('Check for updates')) +
- ' %s.' % (_('Note: please make sure this server can access `%s` for the update link to work') % c.rhodecode_update_url)
- ), ''),
-
- # RhodeCode specific
- (_('RhodeCode Version'), val('rhodecode_app')['text'], state('rhodecode_app')),
- (_('RhodeCode Server IP'), val('server')['server_ip'], state('server')),
- (_('RhodeCode Server ID'), val('server')['server_id'], state('server')),
- (_('RhodeCode Configuration'), val('rhodecode_config')['path'], state('rhodecode_config')),
- ('', '', ''), # spacer
-
- # Database
- (_('Database'), val('database')['url'], state('database')),
- (_('Database version'), val('database')['version'], state('database')),
- ('', '', ''), # spacer
-
- # Platform/Python
- (_('Platform'), val('platform')['name'], state('platform')),
- (_('Platform UUID'), val('platform')['uuid'], state('platform')),
- (_('Python version'), val('python')['version'], state('python')),
- (_('Python path'), val('python')['executable'], state('python')),
- ('', '', ''), # spacer
-
- # Systems stats
- (_('CPU'), val('cpu'), state('cpu')),
- (_('Load'), val('load')['text'], state('load')),
- (_('Memory'), val('memory')['text'], state('memory')),
- (_('Uptime'), val('uptime')['text'], state('uptime')),
- ('', '', ''), # spacer
-
- # Repo storage
- (_('Storage location'), val('storage')['path'], state('storage')),
- (_('Storage info'), val('storage')['text'], state('storage')),
- (_('Storage inodes'), val('storage_inodes')['text'], state('storage_inodes')),
-
- (_('Gist storage location'), val('storage_gist')['path'], state('storage_gist')),
- (_('Gist storage info'), val('storage_gist')['text'], state('storage_gist')),
-
- (_('Archive cache storage location'), val('storage_archive')['path'], state('storage_archive')),
- (_('Archive cache info'), val('storage_archive')['text'], state('storage_archive')),
-
- (_('Temp storage location'), val('storage_temp')['path'], state('storage_temp')),
- (_('Temp storage info'), val('storage_temp')['text'], state('storage_temp')),
-
- (_('Search info'), val('search')['text'], state('search')),
- (_('Search location'), val('search')['location'], state('search')),
- ('', '', ''), # spacer
-
- # VCS specific
- (_('VCS Backends'), val('vcs_backends'), state('vcs_backends')),
- (_('VCS Server'), val('vcs_server')['text'], state('vcs_server')),
- (_('GIT'), val('git'), state('git')),
- (_('HG'), val('hg'), state('hg')),
- (_('SVN'), val('svn'), state('svn')),
-
- ]
-
- # TODO: marcink, figure out how to allow only selected users to do this
- c.allowed_to_snapshot = c.rhodecode_user.admin
-
- if snapshot:
- if c.allowed_to_snapshot:
- c.data_items.pop(0) # remove server info
- return render('admin/settings/settings_system_snapshot.html')
- else:
- h.flash('You are not allowed to do this', category='warning')
-
- return htmlfill.render(
- render('admin/settings/settings.html'),
- defaults=defaults,
- encoding="UTF-8",
- force_defaults=False)
-
- @staticmethod
- def get_update_data(update_url):
- """Return the JSON update data."""
- ver = rhodecode.__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)
-
- return data
-
- @HasPermissionAllDecorator('hg.admin')
- def settings_system_update(self):
- """GET /admin/settings/system/updates: All items in the collection"""
- # url('admin_settings_system_update')
- defaults = self._form_defaults()
- update_url = defaults.get('rhodecode_update_url', '')
-
- _err = lambda s: '
%s
' % (s)
- try:
- data = self.get_update_data(update_url)
- except urllib2.URLError as e:
- log.exception("Exception contacting upgrade server")
- return _err('Failed to contact upgrade server: %r' % e)
- except ValueError as e:
- log.exception("Bad data sent from update server")
- return _err('Bad data sent from update server')
-
- latest = data['versions'][0]
-
- c.update_url = update_url
- c.latest_data = latest
- c.latest_ver = latest['version']
- c.cur_ver = rhodecode.__version__
- c.should_upgrade = False
-
- if (packaging.version.Version(c.latest_ver) >
- packaging.version.Version(c.cur_ver)):
- c.should_upgrade = True
- c.important_notices = latest['general']
-
- return render('admin/settings/settings_system_update.html')
+ return render('admin/settings/settings.mako')
@HasPermissionAllDecorator('hg.admin')
def settings_supervisor(self):
@@ -710,7 +560,7 @@ class SettingsController(BaseController)
except Exception as e:
c.connection_error = str(e)
log.exception("Exception reading supervisor data")
- return render('admin/settings/settings.html')
+ return render('admin/settings/settings.mako')
groupid = c.rhodecode_ini.get('supervisor.group_id')
@@ -734,7 +584,7 @@ class SettingsController(BaseController)
log.exception("Exception reading supervisor data")
c.supervisor_procs[k] = {'_rhodecode_error': str(e)}
- return render('admin/settings/settings.html')
+ return render('admin/settings/settings.mako')
@HasPermissionAllDecorator('hg.admin')
def settings_supervisor_log(self, procid):
@@ -751,7 +601,7 @@ class SettingsController(BaseController)
offset = abs(safe_int(request.GET.get('offset', c.log_size))) * -1
c.log = supervisor.read_process_log(_connection, procid, offset, 0)
- return render('admin/settings/settings.html')
+ return render('admin/settings/settings.mako')
@HasPermissionAllDecorator('hg.admin')
@auth.CSRFRequired()
@@ -768,7 +618,7 @@ class SettingsController(BaseController)
_('Some form inputs contain invalid data.'),
category='error')
return htmlfill.render(
- render('admin/settings/settings.html'),
+ render('admin/settings/settings.mako'),
defaults=errors.value,
errors=errors.error_dict or {},
prefix_error=False,
@@ -795,7 +645,7 @@ class SettingsController(BaseController)
return redirect(url('admin_settings_labs'))
return htmlfill.render(
- render('admin/settings/settings.html'),
+ render('admin/settings/settings.mako'),
defaults=self._form_defaults(),
encoding='UTF-8',
force_defaults=False)
@@ -811,7 +661,7 @@ class SettingsController(BaseController)
c.lab_settings = _LAB_SETTINGS
return htmlfill.render(
- render('admin/settings/settings.html'),
+ render('admin/settings/settings.mako'),
defaults=self._form_defaults(),
encoding='UTF-8',
force_defaults=False)
diff --git a/rhodecode/controllers/admin/user_groups.py b/rhodecode/controllers/admin/user_groups.py
--- a/rhodecode/controllers/admin/user_groups.py
+++ b/rhodecode/controllers/admin/user_groups.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2011-2016 RhodeCode GmbH
+# Copyright (C) 2011-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -109,7 +109,7 @@ class UserGroupsController(BaseControlle
# url('users_groups')
from rhodecode.lib.utils import PartialRenderer
- _render = PartialRenderer('data_table/_dt_elements.html')
+ _render = PartialRenderer('data_table/_dt_elements.mako')
def user_group_name(user_group_id, user_group_name):
return _render("user_group_name", user_group_id, user_group_name)
@@ -136,7 +136,7 @@ class UserGroupsController(BaseControlle
})
c.data = json.dumps(user_groups_data)
- return render('admin/user_groups/user_groups.html')
+ return render('admin/user_groups/user_groups.mako')
@HasPermissionAnyDecorator('hg.admin', 'hg.usergroup.create.true')
@auth.CSRFRequired()
@@ -167,7 +167,7 @@ class UserGroupsController(BaseControlle
Session().commit()
except formencode.Invalid as errors:
return htmlfill.render(
- render('admin/user_groups/user_group_add.html'),
+ render('admin/user_groups/user_group_add.mako'),
defaults=errors.value,
errors=errors.error_dict or {},
prefix_error=False,
@@ -185,7 +185,7 @@ class UserGroupsController(BaseControlle
def new(self):
"""GET /user_groups/new: Form to create a new item"""
# url('new_users_group')
- return render('admin/user_groups/user_group_add.html')
+ return render('admin/user_groups/user_group_add.mako')
@HasUserGroupPermissionAnyDecorator('usergroup.admin')
@auth.CSRFRequired()
@@ -224,7 +224,7 @@ class UserGroupsController(BaseControlle
e = errors.error_dict or {}
return htmlfill.render(
- render('admin/user_groups/user_group_edit.html'),
+ render('admin/user_groups/user_group_edit.mako'),
defaults=defaults,
errors=e,
prefix_error=False,
@@ -276,7 +276,7 @@ class UserGroupsController(BaseControlle
defaults = self.__load_defaults(user_group_id)
return htmlfill.render(
- render('admin/user_groups/user_group_edit.html'),
+ render('admin/user_groups/user_group_edit.mako'),
defaults=defaults,
encoding="UTF-8",
force_defaults=False
@@ -299,7 +299,7 @@ class UserGroupsController(BaseControlle
p.permission.permission_name})
return htmlfill.render(
- render('admin/user_groups/user_group_edit.html'),
+ render('admin/user_groups/user_group_edit.mako'),
defaults=defaults,
encoding="UTF-8",
force_defaults=False
@@ -365,7 +365,7 @@ class UserGroupsController(BaseControlle
permissions['repositories_groups'][gr.group.group_name] \
= gr.permission.permission_name
c.permissions = permissions
- return render('admin/user_groups/user_group_edit.html')
+ return render('admin/user_groups/user_group_edit.mako')
@HasUserGroupPermissionAnyDecorator('usergroup.admin')
def edit_global_perms(self, user_group_id):
@@ -379,7 +379,7 @@ class UserGroupsController(BaseControlle
defaults.update(c.user_group.get_default_perms())
return htmlfill.render(
- render('admin/user_groups/user_group_edit.html'),
+ render('admin/user_groups/user_group_edit.mako'),
defaults=defaults,
encoding="UTF-8",
force_defaults=False
@@ -425,7 +425,7 @@ class UserGroupsController(BaseControlle
defaults = errors.value
c.user_group = user_group
return htmlfill.render(
- render('admin/user_groups/user_group_edit.html'),
+ render('admin/user_groups/user_group_edit.mako'),
defaults=defaults,
errors=errors.error_dict or {},
prefix_error=False,
@@ -456,7 +456,7 @@ class UserGroupsController(BaseControlle
(x.group for x in c.user_group.users_group_repo_group_to_perm),
key=lambda u: u.group_name.lower())
- return render('admin/user_groups/user_group_edit.html')
+ return render('admin/user_groups/user_group_edit.mako')
@HasUserGroupPermissionAnyDecorator('usergroup.admin')
@XHRRequired()
diff --git a/rhodecode/controllers/admin/users.py b/rhodecode/controllers/admin/users.py
--- a/rhodecode/controllers/admin/users.py
+++ b/rhodecode/controllers/admin/users.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -82,7 +82,7 @@ class UsersController(BaseController):
# url('users')
from rhodecode.lib.utils import PartialRenderer
- _render = PartialRenderer('data_table/_dt_elements.html')
+ _render = PartialRenderer('data_table/_dt_elements.mako')
def username(user_id, username):
return _render("user_name", user_id, username)
@@ -119,7 +119,7 @@ class UsersController(BaseController):
c.data = json.dumps(users_data)
- return render('admin/users/users.html')
+ return render('admin/users/users.mako')
def _get_personal_repo_group_template_vars(self):
DummyUser = AttributeDict({
@@ -156,7 +156,7 @@ class UsersController(BaseController):
except formencode.Invalid as errors:
self._get_personal_repo_group_template_vars()
return htmlfill.render(
- render('admin/users/user_add.html'),
+ render('admin/users/user_add.mako'),
defaults=errors.value,
errors=errors.error_dict or {},
prefix_error=False,
@@ -176,7 +176,7 @@ class UsersController(BaseController):
# url('new_user')
c.default_extern_type = auth_rhodecode.RhodeCodeAuthPlugin.name
self._get_personal_repo_group_template_vars()
- return render('admin/users/user_add.html')
+ return render('admin/users/user_add.mako')
@HasPermissionAllDecorator('hg.admin')
@auth.CSRFRequired()
@@ -218,7 +218,7 @@ class UsersController(BaseController):
e = errors.error_dict or {}
return htmlfill.render(
- render('admin/users/user_edit.html'),
+ render('admin/users/user_edit.mako'),
defaults=defaults,
errors=e,
prefix_error=False,
@@ -414,7 +414,7 @@ class UsersController(BaseController):
defaults = c.user.get_dict()
defaults.update({'language': c.user.user_data.get('language')})
return htmlfill.render(
- render('admin/users/user_edit.html'),
+ render('admin/users/user_edit.mako'),
defaults=defaults,
encoding="UTF-8",
force_defaults=False)
@@ -446,7 +446,7 @@ class UsersController(BaseController):
'"inactive" instead of deleting it.') if has_review else ''
return htmlfill.render(
- render('admin/users/user_edit.html'),
+ render('admin/users/user_edit.mako'),
defaults=defaults,
encoding="UTF-8",
force_defaults=False)
@@ -476,7 +476,7 @@ class UsersController(BaseController):
c.user.user_id, show_expired=show_expired)
defaults = c.user.get_dict()
return htmlfill.render(
- render('admin/users/user_edit.html'),
+ render('admin/users/user_edit.mako'),
defaults=defaults,
encoding="UTF-8",
force_defaults=False)
@@ -539,7 +539,7 @@ class UsersController(BaseController):
defaults.update(c.user.get_default_perms())
return htmlfill.render(
- render('admin/users/user_edit.html'),
+ render('admin/users/user_edit.mako'),
defaults=defaults,
encoding="UTF-8",
force_defaults=False)
@@ -584,7 +584,7 @@ class UsersController(BaseController):
defaults = errors.value
c.user = user
return htmlfill.render(
- render('admin/users/user_edit.html'),
+ render('admin/users/user_edit.mako'),
defaults=defaults,
errors=errors.error_dict or {},
prefix_error=False,
@@ -607,7 +607,7 @@ class UsersController(BaseController):
c.active = 'perms_summary'
c.perm_user = AuthUser(user_id=user_id, ip_addr=self.ip_addr)
- return render('admin/users/user_edit.html')
+ return render('admin/users/user_edit.mako')
@HasPermissionAllDecorator('hg.admin')
def edit_emails(self, user_id):
@@ -623,7 +623,7 @@ class UsersController(BaseController):
defaults = c.user.get_dict()
return htmlfill.render(
- render('admin/users/user_edit.html'),
+ render('admin/users/user_edit.mako'),
defaults=defaults,
encoding="UTF-8",
force_defaults=False)
@@ -685,7 +685,7 @@ class UsersController(BaseController):
defaults = c.user.get_dict()
return htmlfill.render(
- render('admin/users/user_edit.html'),
+ render('admin/users/user_edit.mako'),
defaults=defaults,
encoding="UTF-8",
force_defaults=False)
diff --git a/rhodecode/controllers/base_references.py b/rhodecode/controllers/base_references.py
--- a/rhodecode/controllers/base_references.py
+++ b/rhodecode/controllers/base_references.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/controllers/bookmarks.py b/rhodecode/controllers/bookmarks.py
--- a/rhodecode/controllers/bookmarks.py
+++ b/rhodecode/controllers/bookmarks.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2011-2016 RhodeCode GmbH
+# Copyright (C) 2011-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -34,8 +34,8 @@ log = logging.getLogger(__name__)
class BookmarksController(BaseReferencesController):
- partials_template = 'bookmarks/bookmarks_data.html'
- template = 'bookmarks/bookmarks.html'
+ partials_template = 'bookmarks/bookmarks_data.mako'
+ template = 'bookmarks/bookmarks.mako'
def __before__(self):
super(BookmarksController, self).__before__()
diff --git a/rhodecode/controllers/branches.py b/rhodecode/controllers/branches.py
--- a/rhodecode/controllers/branches.py
+++ b/rhodecode/controllers/branches.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -34,8 +34,8 @@ log = logging.getLogger(__name__)
class BranchesController(BaseReferencesController):
- partials_template = 'branches/branches_data.html'
- template = 'branches/branches.html'
+ partials_template = 'branches/branches_data.mako'
+ template = 'branches/branches.mako'
def __before__(self):
super(BranchesController, self).__before__()
diff --git a/rhodecode/controllers/changelog.py b/rhodecode/controllers/changelog.py
--- a/rhodecode/controllers/changelog.py
+++ b/rhodecode/controllers/changelog.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -30,7 +30,8 @@ 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.auth import (
+ LoginRequired, HasRepoPermissionAnyDecorator, XHRRequired)
from rhodecode.lib.base import BaseRepoController, render
from rhodecode.lib.ext_json import json
from rhodecode.lib.graphmod import _colored, _dagwalker
@@ -98,7 +99,7 @@ class ChangelogController(BaseRepoContro
redirect(h.url('changelog_home', repo_name=repo.repo_name))
raise HTTPBadRequest()
- def _graph(self, repo, commits):
+ def _graph(self, repo, commits, prev_data=None, next_data=None):
"""
Generates a DAG graph for repo
@@ -106,12 +107,30 @@ class ChangelogController(BaseRepoContro
:param commits: list of commits
"""
if not commits:
- c.jsdata = json.dumps([])
- return
+ return json.dumps([])
+
+ def serialize(commit, parents=True):
+ data = dict(
+ raw_id=commit.raw_id,
+ idx=commit.idx,
+ branch=commit.branch,
+ )
+ if parents:
+ data['parents'] = [
+ serialize(x, parents=False) for x in commit.parents]
+ return data
+
+ prev_data = prev_data or []
+ next_data = next_data or []
+
+ current = [serialize(x) for x in commits]
+ commits = prev_data + current + next_data
dag = _dagwalker(repo, commits)
- data = [['', vtx, edges] for vtx, edges in _colored(dag)]
- c.jsdata = json.dumps(data)
+
+ data = [[commit_id, vtx, edges, branch]
+ for commit_id, vtx, edges, branch in _colored(dag)]
+ return json.dumps(data), json.dumps(current)
def _check_if_valid_branch(self, branch_name, repo_name, f_path):
if branch_name not in c.rhodecode_repo.branches_all:
@@ -120,26 +139,37 @@ class ChangelogController(BaseRepoContro
redirect(url('changelog_file_home', repo_name=repo_name,
revision=branch_name, f_path=f_path or ''))
+ def _load_changelog_data(self, collection, page, chunk_size, branch_name=None, dynamic=False):
+ c.total_cs = len(collection)
+ c.showing_commits = min(chunk_size, c.total_cs)
+ c.pagination = RepoPage(collection, page=page, item_count=c.total_cs,
+ items_per_page=chunk_size, branch=branch_name)
+
+ c.next_page = c.pagination.next_page
+ c.prev_page = c.pagination.previous_page
+
+ if dynamic:
+ if request.GET.get('chunk') != 'next':
+ c.next_page = None
+ if request.GET.get('chunk') != 'prev':
+ c.prev_page = None
+
+ page_commit_ids = [x.raw_id for x in c.pagination]
+ c.comments = c.rhodecode_db_repo.get_comments(page_commit_ids)
+ c.statuses = c.rhodecode_db_repo.statuses(page_commit_ids)
+
@LoginRequired()
@HasRepoPermissionAnyDecorator('repository.read', 'repository.write',
'repository.admin')
def index(self, repo_name, revision=None, f_path=None):
commit_id = revision
- limit = 100
+ chunk_size = 20
+
+ c.branch_name = branch_name = request.GET.get('branch', None)
+ c.book_name = book_name = request.GET.get('bookmark', None)
hist_limit = safe_int(request.GET.get('limit')) or None
- if request.GET.get('size'):
- c.size = safe_int(request.GET.get('size'), 1)
- session['changelog_size'] = c.size
- session.save()
- else:
- c.size = int(session.get('changelog_size', DEFAULT_CHANGELOG_SIZE))
-
- # min size must be 1 and less than limit
- c.size = max(c.size, 1) if c.size <= limit else limit
p = safe_int(request.GET.get('page', 1), 1)
- c.branch_name = branch_name = request.GET.get('branch', None)
- c.book_name = book_name = request.GET.get('bookmark', None)
c.selected_name = branch_name or book_name
if not commit_id and branch_name:
@@ -147,6 +177,8 @@ class ChangelogController(BaseRepoContro
c.changelog_for_path = f_path
pre_load = ['author', 'branch', 'date', 'message', 'parents']
+ commit_ids = []
+
try:
if f_path:
log.debug('generating changelog for path %s', f_path)
@@ -174,13 +206,9 @@ class ChangelogController(BaseRepoContro
collection = c.rhodecode_repo.get_commits(
branch_name=branch_name, pre_load=pre_load)
- c.total_cs = len(collection)
- c.showing_commits = min(c.size, c.total_cs)
- c.pagination = RepoPage(collection, page=p, item_count=c.total_cs,
- items_per_page=c.size, branch=branch_name)
- page_commit_ids = [x.raw_id for x in c.pagination]
- c.comments = c.rhodecode_db_repo.get_comments(page_commit_ids)
- c.statuses = c.rhodecode_db_repo.statuses(page_commit_ids)
+ self._load_changelog_data(
+ collection, p, chunk_size, c.branch_name, dynamic=f_path)
+
except EmptyRepositoryError as e:
h.flash(safe_str(e), category='warning')
return redirect(url('summary_home', repo_name=repo_name))
@@ -193,24 +221,64 @@ class ChangelogController(BaseRepoContro
if (request.environ.get('HTTP_X_PARTIAL_XHR')
or request.environ.get('HTTP_X_PJAX')):
# loading from ajax, we don't want the first result, it's popped
- return render('changelog/changelog_file_history.html')
+ return render('changelog/changelog_file_history.mako')
+
+ if not f_path:
+ commit_ids = c.pagination
- if f_path:
- revs = []
- else:
- revs = c.pagination
- self._graph(c.rhodecode_repo, revs)
+ c.graph_data, c.graph_commits = self._graph(
+ c.rhodecode_repo, commit_ids)
- return render('changelog/changelog.html')
+ return render('changelog/changelog.mako')
@LoginRequired()
- @HasRepoPermissionAnyDecorator('repository.read', 'repository.write',
- 'repository.admin')
- def changelog_details(self, commit_id):
- if request.environ.get('HTTP_X_PARTIAL_XHR'):
- c.commit = c.rhodecode_repo.get_commit(commit_id=commit_id)
- return render('changelog/changelog_details.html')
- raise HTTPNotFound()
+ @XHRRequired()
+ @HasRepoPermissionAnyDecorator(
+ 'repository.read', 'repository.write', 'repository.admin')
+ def changelog_elements(self, repo_name):
+ commit_id = None
+ chunk_size = 20
+
+ def wrap_for_error(err):
+ return '
ERROR: {}
'.format(err)
+
+ c.branch_name = branch_name = request.GET.get('branch', None)
+ c.book_name = book_name = request.GET.get('bookmark', None)
+
+ p = safe_int(request.GET.get('page', 1), 1)
+
+ c.selected_name = branch_name or book_name
+ if not commit_id and branch_name:
+ if branch_name not in c.rhodecode_repo.branches_all:
+ return wrap_for_error(
+ safe_str('Missing branch: {}'.format(branch_name)))
+
+ pre_load = ['author', 'branch', 'date', 'message', 'parents']
+ collection = c.rhodecode_repo.get_commits(
+ branch_name=branch_name, pre_load=pre_load)
+
+ try:
+ self._load_changelog_data(collection, p, chunk_size, dynamic=True)
+ except EmptyRepositoryError as e:
+ return wrap_for_error(safe_str(e))
+ except (RepositoryError, CommitDoesNotExistError, Exception) as e:
+ log.exception('Failed to fetch commits')
+ return wrap_for_error(safe_str(e))
+
+ prev_data = None
+ next_data = None
+
+ prev_graph = json.loads(request.POST.get('graph', ''))
+
+ if request.GET.get('chunk') == 'prev':
+ next_data = prev_graph
+ elif request.GET.get('chunk') == 'next':
+ prev_data = prev_graph
+
+ c.graph_data, c.graph_commits = self._graph(
+ c.rhodecode_repo, c.pagination,
+ prev_data=prev_data, next_data=next_data)
+ return render('changelog/changelog_elements.mako')
@LoginRequired()
@HasRepoPermissionAnyDecorator('repository.read', 'repository.write',
@@ -218,5 +286,5 @@ class ChangelogController(BaseRepoContro
def changelog_summary(self, repo_name):
if request.environ.get('HTTP_X_PJAX'):
_load_changelog_summary()
- return render('changelog/changelog_summary_data.html')
+ return render('changelog/changelog_summary_data.mako')
raise HTTPNotFound()
diff --git a/rhodecode/controllers/changeset.py b/rhodecode/controllers/changeset.py
--- a/rhodecode/controllers/changeset.py
+++ b/rhodecode/controllers/changeset.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -46,7 +46,7 @@ from rhodecode.lib.vcs.exceptions import
RepositoryError, CommitDoesNotExistError, NodeDoesNotExistError)
from rhodecode.model.db import ChangesetComment, ChangesetStatus
from rhodecode.model.changeset_status import ChangesetStatusModel
-from rhodecode.model.comment import ChangesetCommentsModel
+from rhodecode.model.comment import CommentsModel
from rhodecode.model.meta import Session
from rhodecode.model.repo import RepoModel
@@ -198,15 +198,20 @@ class ChangesetController(BaseRepoContro
c.lines_added = 0
c.lines_deleted = 0
+ # auto collapse if we have more than limit
+ collapse_limit = diffs.DiffProcessor._collapse_commits_over
+ c.collapse_all_commits = len(c.commit_ranges) > collapse_limit
+
c.commit_statuses = ChangesetStatus.STATUSES
c.inline_comments = []
c.files = []
c.statuses = []
c.comments = []
+ c.unresolved_comments = []
if len(c.commit_ranges) == 1:
commit = c.commit_ranges[0]
- c.comments = ChangesetCommentsModel().get_comments(
+ c.comments = CommentsModel().get_comments(
c.rhodecode_db_repo.repo_id,
revision=commit.raw_id)
c.statuses.append(ChangesetStatusModel().get_status(
@@ -222,6 +227,9 @@ class ChangesetController(BaseRepoContro
for pr in prs:
c.comments.extend(pr.comments)
+ c.unresolved_comments = CommentsModel()\
+ .get_commit_unresolved_todos(commit.raw_id)
+
# Iterate over ranges (default commit view is always one commit)
for commit in c.commit_ranges:
c.changes[commit.raw_id] = []
@@ -251,9 +259,9 @@ class ChangesetController(BaseRepoContro
return None
return get_node
- inline_comments = ChangesetCommentsModel().get_inline_comments(
+ inline_comments = CommentsModel().get_inline_comments(
c.rhodecode_db_repo.repo_id, revision=commit.raw_id)
- c.inline_cnt = ChangesetCommentsModel().get_inline_comments_count(
+ c.inline_cnt = CommentsModel().get_inline_comments_count(
inline_comments)
diffset = codeblocks.DiffSet(
@@ -271,7 +279,6 @@ class ChangesetController(BaseRepoContro
# sort comments by how they were generated
c.comments = sorted(c.comments, key=lambda x: x.comment_id)
-
if len(c.commit_ranges) == 1:
c.commit = c.commit_ranges[0]
c.parent_tmpl = ''.join(
@@ -284,17 +291,17 @@ class ChangesetController(BaseRepoContro
elif method == 'patch':
response.content_type = 'text/plain'
c.diff = safe_unicode(diff)
- return render('changeset/patch_changeset.html')
+ return render('changeset/patch_changeset.mako')
elif method == 'raw':
response.content_type = 'text/plain'
return diff
elif method == 'show':
if len(c.commit_ranges) == 1:
- return render('changeset/changeset.html')
+ return render('changeset/changeset.mako')
else:
c.ancestor = None
c.target_repo = c.rhodecode_db_repo
- return render('changeset/changeset_range.html')
+ return render('changeset/changeset_range.mako')
@LoginRequired()
@HasRepoPermissionAnyDecorator('repository.read', 'repository.write',
@@ -330,29 +337,39 @@ class ChangesetController(BaseRepoContro
commit_id = revision
status = request.POST.get('changeset_status', None)
text = request.POST.get('text')
+ comment_type = request.POST.get('comment_type')
+ resolves_comment_id = request.POST.get('resolves_comment_id', None)
+
if status:
text = text or (_('Status change %(transition_icon)s %(status)s')
% {'transition_icon': '>',
'status': ChangesetStatus.get_status_lbl(status)})
- multi_commit_ids = filter(
- lambda s: s not in ['', None],
- request.POST.get('commit_ids', '').split(','),)
+ multi_commit_ids = []
+ for _commit_id in request.POST.get('commit_ids', '').split(','):
+ if _commit_id not in ['', None, EmptyCommit.raw_id]:
+ if _commit_id not in multi_commit_ids:
+ multi_commit_ids.append(_commit_id)
commit_ids = multi_commit_ids or [commit_id]
+
comment = None
for current_id in filter(None, commit_ids):
- c.co = comment = ChangesetCommentsModel().create(
+ c.co = comment = CommentsModel().create(
text=text,
repo=c.rhodecode_db_repo.repo_id,
user=c.rhodecode_user.user_id,
- revision=current_id,
+ commit_id=current_id,
f_path=request.POST.get('f_path'),
line_no=request.POST.get('line'),
status_change=(ChangesetStatus.get_status_lbl(status)
if status else None),
- status_change_type=status
+ status_change_type=status,
+ comment_type=comment_type,
+ resolves_comment_id=resolves_comment_id
)
+ c.inline_comment = True if comment.line_no else False
+
# get status if set !
if status:
# if latest status was from pull request and it's closed
@@ -386,7 +403,7 @@ class ChangesetController(BaseRepoContro
if comment:
data.update(comment.get_dict())
data.update({'rendered_text':
- render('changeset/changeset_comment_block.html')})
+ render('changeset/changeset_comment_block.mako')})
return data
@@ -417,10 +434,15 @@ class ChangesetController(BaseRepoContro
@jsonify
def delete_comment(self, repo_name, comment_id):
comment = ChangesetComment.get(comment_id)
+ if not comment:
+ log.debug('Comment with id:%s not found, skipping', comment_id)
+ # comment already deleted in another call probably
+ return True
+
owner = (comment.author.user_id == c.rhodecode_user.user_id)
is_repo_admin = h.HasRepoPermissionAny('repository.admin')(c.repo_name)
if h.HasPermissionAny('hg.admin')() or is_repo_admin or owner:
- ChangesetCommentsModel().delete(comment=comment)
+ CommentsModel().delete(comment=comment)
Session().commit()
return True
else:
diff --git a/rhodecode/controllers/compare.py b/rhodecode/controllers/compare.py
--- a/rhodecode/controllers/compare.py
+++ b/rhodecode/controllers/compare.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2012-2016 RhodeCode GmbH
+# Copyright (C) 2012-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -79,6 +79,7 @@ class CompareController(BaseRepoControll
def index(self, repo_name):
c.compare_home = True
c.commit_ranges = []
+ c.collapse_all_commits = False
c.diffset = None
c.limited_diff = False
source_repo = c.rhodecode_db_repo.repo_name
@@ -90,7 +91,8 @@ class CompareController(BaseRepoControll
c.target_ref_type = ""
c.commit_statuses = ChangesetStatus.STATUSES
c.preview_mode = False
- return render('compare/compare_diff.html')
+ c.file_path = None
+ return render('compare/compare_diff.mako')
@LoginRequired()
@HasRepoPermissionAnyDecorator('repository.read', 'repository.write',
@@ -103,8 +105,10 @@ class CompareController(BaseRepoControll
# target_ref will be evaluated in target_repo
target_repo_name = request.GET.get('target_repo', source_repo_name)
- target_path, target_id = parse_path_ref(target_ref)
+ target_path, target_id = parse_path_ref(
+ target_ref, default_path=request.GET.get('f_path', ''))
+ c.file_path = target_path
c.commit_statuses = ChangesetStatus.STATUSES
# if merge is True
@@ -115,7 +119,6 @@ class CompareController(BaseRepoControll
# if merge is False
# Show a raw diff of source/target refs even if no ancestor exists
-
# c.fulldiff disables cut_off_limit
c.fulldiff = str2bool(request.GET.get('fulldiff'))
@@ -131,7 +134,8 @@ class CompareController(BaseRepoControll
target_repo=source_repo_name,
target_ref_type=source_ref_type,
target_ref=source_ref,
- merge=merge and '1' or '')
+ merge=merge and '1' or '',
+ f_path=target_path)
source_repo = Repository.get_by_repo_name(source_repo_name)
target_repo = Repository.get_by_repo_name(target_repo_name)
@@ -151,8 +155,11 @@ class CompareController(BaseRepoControll
h.flash(msg, category='error')
return redirect(url('compare_home', repo_name=c.repo_name))
- source_alias = source_repo.scm_instance().alias
- target_alias = target_repo.scm_instance().alias
+ source_scm = source_repo.scm_instance()
+ target_scm = target_repo.scm_instance()
+
+ source_alias = source_scm.alias
+ target_alias = target_scm.alias
if source_alias != target_alias:
msg = _('The comparison of two different kinds of remote repos '
'is not available')
@@ -175,34 +182,42 @@ class CompareController(BaseRepoControll
c.source_ref_type = source_ref_type
c.target_ref_type = target_ref_type
- source_scm = source_repo.scm_instance()
- target_scm = target_repo.scm_instance()
-
pre_load = ["author", "branch", "date", "message"]
c.ancestor = None
- try:
- c.commit_ranges = source_scm.compare(
- source_commit.raw_id, target_commit.raw_id,
- target_scm, merge, pre_load=pre_load)
- if merge:
- c.ancestor = source_scm.get_common_ancestor(
- source_commit.raw_id, target_commit.raw_id, target_scm)
- except RepositoryRequirementError:
- msg = _('Could not compare repos with different '
- 'large file settings')
- log.error(msg)
- if partial:
- return msg
- h.flash(msg, category='error')
- return redirect(url('compare_home', repo_name=c.repo_name))
+
+ if c.file_path:
+ if source_commit == target_commit:
+ c.commit_ranges = []
+ else:
+ c.commit_ranges = [target_commit]
+ else:
+ try:
+ c.commit_ranges = source_scm.compare(
+ source_commit.raw_id, target_commit.raw_id,
+ target_scm, merge, pre_load=pre_load)
+ if merge:
+ c.ancestor = source_scm.get_common_ancestor(
+ source_commit.raw_id, target_commit.raw_id, target_scm)
+ except RepositoryRequirementError:
+ msg = _('Could not compare repos with different '
+ 'large file settings')
+ log.error(msg)
+ if partial:
+ return msg
+ h.flash(msg, category='error')
+ return redirect(url('compare_home', repo_name=c.repo_name))
c.statuses = c.rhodecode_db_repo.statuses(
[x.raw_id for x in c.commit_ranges])
- if partial: # for PR ajax commits loader
+ # auto collapse if we have more than limit
+ collapse_limit = diffs.DiffProcessor._collapse_commits_over
+ c.collapse_all_commits = len(c.commit_ranges) > collapse_limit
+
+ if partial: # for PR ajax commits loader
if not c.ancestor:
- return '' # cannot merge if there is no ancestor
- return render('compare/compare_commits.html')
+ return '' # cannot merge if there is no ancestor
+ return render('compare/compare_commits.mako')
if c.ancestor:
# case we want a simple diff without incoming commits,
@@ -238,7 +253,8 @@ class CompareController(BaseRepoControll
txtdiff = source_repo.scm_instance().get_diff(
commit1=source_commit, commit2=target_commit,
- path1=source_path, path=target_path)
+ path=target_path, path1=source_path)
+
diff_processor = diffs.DiffProcessor(
txtdiff, format='newdiff', diff_limit=diff_limit,
file_limit=file_limit, show_full_diff=c.fulldiff)
@@ -260,5 +276,7 @@ class CompareController(BaseRepoControll
).render_patchset(_parsed, source_ref, target_ref)
c.preview_mode = merge
+ c.source_commit = source_commit
+ c.target_commit = target_commit
- return render('compare/compare_diff.html')
+ return render('compare/compare_diff.mako')
diff --git a/rhodecode/controllers/debug_style.py b/rhodecode/controllers/debug_style.py
--- a/rhodecode/controllers/debug_style.py
+++ b/rhodecode/controllers/debug_style.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2014-2016 RhodeCode GmbH
+# Copyright (C) 2014-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/controllers/feed.py b/rhodecode/controllers/feed.py
--- a/rhodecode/controllers/feed.py
+++ b/rhodecode/controllers/feed.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/controllers/files.py b/rhodecode/controllers/files.py
--- a/rhodecode/controllers/files.py
+++ b/rhodecode/controllers/files.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -144,7 +144,7 @@ class FilesController(BaseRepoController
log.debug('Generating cached file tree for %s, %s, %s',
repo_name, commit_id, f_path)
c.full_load = full_load
- return render('files/files_browser_tree.html')
+ return render('files/files_browser_tree.mako')
cache_manager = self.__get_tree_cache_manager(
repo_name, caches.FILE_TREE)
@@ -255,9 +255,9 @@ class FilesController(BaseRepoController
raise HTTPNotFound()
if request.environ.get('HTTP_X_PJAX'):
- return render('files/files_pjax.html')
+ return render('files/files_pjax.mako')
- return render('files/files.html')
+ return render('files/files.mako')
@LoginRequired()
@HasRepoPermissionAnyDecorator('repository.read', 'repository.write',
@@ -305,7 +305,7 @@ class FilesController(BaseRepoController
c.authors.append((
h.email(author),
h.person(author, 'username_or_name_or_email')))
- return render('files/file_authors_box.html')
+ return render('files/file_authors_box.mako')
@LoginRequired()
@HasRepoPermissionAnyDecorator('repository.read', 'repository.write',
@@ -465,7 +465,7 @@ class FilesController(BaseRepoController
'Deleted file %s via RhodeCode Enterprise') % (f_path)
c.f_path = f_path
- return render('files/files_delete.html')
+ return render('files/files_delete.mako')
@CSRFRequired()
@LoginRequired()
@@ -574,7 +574,7 @@ class FilesController(BaseRepoController
'Edited file %s via RhodeCode Enterprise') % (f_path)
c.f_path = f_path
- return render('files/files_edit.html')
+ return render('files/files_edit.mako')
def _is_valid_head(self, commit_id, repo):
# check if commit is a branch identifier- basically we cannot
@@ -700,7 +700,7 @@ class FilesController(BaseRepoController
c.default_message = (_('Added file via RhodeCode Enterprise'))
c.f_path = f_path
- return render('files/files_add.html')
+ return render('files/files_add.mako')
@LoginRequired()
@HasRepoPermissionAnyDecorator('repository.read', 'repository.write',
@@ -799,21 +799,15 @@ class FilesController(BaseRepoController
@HasRepoPermissionAnyDecorator('repository.read', 'repository.write',
'repository.admin')
def diff(self, repo_name, f_path):
- ignore_whitespace = request.GET.get('ignorews') == '1'
- line_context = request.GET.get('context', 3)
+
+ c.action = request.GET.get('diff')
diff1 = request.GET.get('diff1', '')
+ diff2 = request.GET.get('diff2', '')
path1, diff1 = parse_path_ref(diff1, default_path=f_path)
- diff2 = request.GET.get('diff2', '')
- c.action = request.GET.get('diff')
- c.no_changes = diff1 == diff2
- c.f_path = f_path
- c.big_diff = False
- c.ignorews_url = _ignorews_url
- c.context_url = _context_url
- c.changes = OrderedDict()
- c.changes[diff2] = []
+ ignore_whitespace = str2bool(request.GET.get('ignorews'))
+ line_context = request.GET.get('context', 3)
if not any((diff1, diff2)):
h.flash(
@@ -821,18 +815,16 @@ class FilesController(BaseRepoController
category='error')
raise HTTPBadRequest()
- # special case if we want a show commit_id only, it's impl here
- # to reduce JS and callbacks
-
- if request.GET.get('show_rev') and diff1:
- if str2bool(request.GET.get('annotate', 'False')):
- _url = url('files_annotate_home', repo_name=c.repo_name,
- revision=diff1, f_path=path1)
- else:
- _url = url('files_home', repo_name=c.repo_name,
- revision=diff1, f_path=path1)
-
- return redirect(_url)
+ if c.action not in ['download', 'raw']:
+ # redirect to new view if we render diff
+ return redirect(
+ url('compare_url', repo_name=repo_name,
+ source_ref_type='rev',
+ source_ref=diff1,
+ target_repo=c.repo_name,
+ target_ref_type='rev',
+ target_ref=diff2,
+ f_path=f_path))
try:
node1 = self._get_file_node(diff1, path1)
@@ -877,98 +869,40 @@ class FilesController(BaseRepoController
return diff.as_raw()
else:
- fid = h.FID(diff2, node2.path)
- line_context_lcl = get_line_ctx(fid, request.GET)
- ign_whitespace_lcl = get_ignore_ws(fid, request.GET)
-
- __, commit1, commit2, diff, st, data = diffs.wrapped_diff(
- filenode_old=node1,
- filenode_new=node2,
- diff_limit=self.cut_off_limit_diff,
- file_limit=self.cut_off_limit_file,
- show_full_diff=request.GET.get('fulldiff'),
- ignore_whitespace=ign_whitespace_lcl,
- line_context=line_context_lcl,)
-
- c.lines_added = data['stats']['added'] if data else 0
- c.lines_deleted = data['stats']['deleted'] if data else 0
- c.files = [data]
- c.commit_ranges = [c.commit_1, c.commit_2]
- c.ancestor = None
- c.statuses = []
- c.target_repo = c.rhodecode_db_repo
- c.filename1 = node1.path
- c.filename = node2.path
- c.binary_file = node1.is_binary or node2.is_binary
- operation = data['operation'] if data else ''
-
- commit_changes = {
- # TODO: it's passing the old file to the diff to keep the
- # standard but this is not being used for this template,
- # but might need both files in the future or a more standard
- # way to work with that
- 'fid': [commit1, commit2, operation,
- c.filename, diff, st, data]
- }
-
- c.changes = commit_changes
-
- return render('files/file_diff.html')
+ return redirect(
+ url('compare_url', repo_name=repo_name,
+ source_ref_type='rev',
+ source_ref=diff1,
+ target_repo=c.repo_name,
+ target_ref_type='rev',
+ target_ref=diff2,
+ f_path=f_path))
@LoginRequired()
@HasRepoPermissionAnyDecorator('repository.read', 'repository.write',
'repository.admin')
def diff_2way(self, repo_name, f_path):
+ """
+ Kept only to make OLD links work
+ """
diff1 = request.GET.get('diff1', '')
diff2 = request.GET.get('diff2', '')
- nodes = []
- unknown_commits = []
- for commit in [diff1, diff2]:
- try:
- nodes.append(self._get_file_node(commit, f_path))
- except (RepositoryError, NodeError):
- log.exception('%(commit)s does not exist' % {'commit': commit})
- unknown_commits.append(commit)
- h.flash(h.literal(
- _('Commit %(commit)s does not exist.') % {'commit': commit}
- ), category='error')
-
- if unknown_commits:
- return redirect(url('files_home', repo_name=c.repo_name,
- f_path=f_path))
-
- if all(isinstance(node.commit, EmptyCommit) for node in nodes):
- raise HTTPNotFound
-
- node1, node2 = nodes
+ if not any((diff1, diff2)):
+ h.flash(
+ 'Need query parameter "diff1" or "diff2" to generate a diff.',
+ category='error')
+ raise HTTPBadRequest()
- f_gitdiff = diffs.get_gitdiff(node1, node2, ignore_whitespace=False)
- diff_processor = diffs.DiffProcessor(f_gitdiff, format='gitdiff')
- diff_data = diff_processor.prepare()
-
- if not diff_data or diff_data[0]['raw_diff'] == '':
- h.flash(h.literal(_('%(file_path)s has not changed '
- 'between %(commit_1)s and %(commit_2)s.') % {
- 'file_path': f_path,
- 'commit_1': node1.commit.id,
- 'commit_2': node2.commit.id
- }), category='error')
- return redirect(url('files_home', repo_name=c.repo_name,
- f_path=f_path))
-
- c.diff_data = diff_data[0]
- c.FID = h.FID(diff2, node2.path)
- # cleanup some unneeded data
- del c.diff_data['raw_diff']
- del c.diff_data['chunks']
-
- c.node1 = node1
- c.commit_1 = node1.commit
- c.node2 = node2
- c.commit_2 = node2.commit
-
- return render('files/diff_2way.html')
+ return redirect(
+ url('compare_url', repo_name=repo_name,
+ source_ref_type='rev',
+ source_ref=diff1,
+ target_repo=c.repo_name,
+ target_ref_type='rev',
+ target_ref=diff2,
+ f_path=f_path,
+ diffmode='sideside'))
def _get_file_node(self, commit_id, f_path):
if commit_id not in ['', None, 'None', '0' * 12, '0' * 40]:
diff --git a/rhodecode/controllers/followers.py b/rhodecode/controllers/followers.py
--- a/rhodecode/controllers/followers.py
+++ b/rhodecode/controllers/followers.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2011-2016 RhodeCode GmbH
+# Copyright (C) 2011-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -50,9 +50,9 @@ class FollowersController(BaseRepoContro
.order_by(UserFollowing.follows_from)
c.followers_pager = Page(d, page=p, items_per_page=20)
- c.followers_data = render('/followers/followers_data.html')
+ c.followers_data = render('/followers/followers_data.mako')
if request.environ.get('HTTP_X_PJAX'):
return c.followers_data
- return render('/followers/followers.html')
+ return render('/followers/followers.mako')
diff --git a/rhodecode/controllers/forks.py b/rhodecode/controllers/forks.py
--- a/rhodecode/controllers/forks.py
+++ b/rhodecode/controllers/forks.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2011-2016 RhodeCode GmbH
+# Copyright (C) 2011-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -122,12 +122,12 @@ class ForksController(BaseRepoController
d.append(r)
c.forks_pager = Page(d, page=p, items_per_page=20)
- c.forks_data = render('/forks/forks_data.html')
+ c.forks_data = render('/forks/forks_data.mako')
if request.environ.get('HTTP_X_PJAX'):
return c.forks_data
- return render('/forks/forks.html')
+ return render('/forks/forks.mako')
@LoginRequired()
@NotAnonymous()
@@ -144,7 +144,7 @@ class ForksController(BaseRepoController
defaults = self.__load_data(repo_name)
return htmlfill.render(
- render('forks/fork.html'),
+ render('forks/fork.mako'),
defaults=defaults,
encoding="UTF-8",
force_defaults=False
@@ -177,7 +177,7 @@ class ForksController(BaseRepoController
except formencode.Invalid as errors:
c.new_repo = errors.value['repo_name']
return htmlfill.render(
- render('forks/fork.html'),
+ render('forks/fork.mako'),
defaults=errors.value,
errors=errors.error_dict or {},
prefix_error=False,
diff --git a/rhodecode/controllers/home.py b/rhodecode/controllers/home.py
--- a/rhodecode/controllers/home.py
+++ b/rhodecode/controllers/home.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -97,7 +97,7 @@ class HomeController(BaseController):
c.repos_data = json.dumps(repo_data)
c.repo_groups_data = json.dumps(repo_group_data)
- return render('/index.html')
+ return render('/index.mako')
@LoginRequired()
@HasRepoGroupPermissionAnyDecorator('group.read', 'group.write',
@@ -112,7 +112,7 @@ class HomeController(BaseController):
c.repos_data = json.dumps(repo_data)
c.repo_groups_data = json.dumps(repo_group_data)
- return render('index_repo_group.html')
+ return render('index_repo_group.mako')
def _get_repo_list(self, name_contains=None, repo_type=None, limit=20):
query = Repository.query()\
diff --git a/rhodecode/controllers/journal.py b/rhodecode/controllers/journal.py
--- a/rhodecode/controllers/journal.py
+++ b/rhodecode/controllers/journal.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -205,11 +205,11 @@ class JournalController(BaseController):
c.journal_pager = Page(journal, page=p, items_per_page=20, url=url_generator)
c.journal_day_aggreagate = self._get_daily_aggregate(c.journal_pager)
- c.journal_data = render('journal/journal_data.html')
+ c.journal_data = render('journal/journal_data.mako')
if request.is_xhr:
return c.journal_data
- return render('journal/journal.html')
+ return render('journal/journal.mako')
@LoginRequired(auth_token_access=True)
@NotAnonymous()
@@ -276,10 +276,10 @@ class JournalController(BaseController):
c.journal_day_aggreagate = self._get_daily_aggregate(c.journal_pager)
- c.journal_data = render('journal/journal_data.html')
+ c.journal_data = render('journal/journal_data.mako')
if request.is_xhr:
return c.journal_data
- return render('journal/public_journal.html')
+ return render('journal/public_journal.mako')
@LoginRequired(auth_token_access=True)
def public_journal_atom(self):
diff --git a/rhodecode/controllers/pullrequests.py b/rhodecode/controllers/pullrequests.py
--- a/rhodecode/controllers/pullrequests.py
+++ b/rhodecode/controllers/pullrequests.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2012-2016 RhodeCode GmbH
+# Copyright (C) 2012-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -21,10 +21,12 @@
"""
pull requests controller for rhodecode for initializing pull requests
"""
+import types
import peppercorn
import formencode
import logging
+import collections
from webob.exc import HTTPNotFound, HTTPForbidden, HTTPBadRequest
from pylons import request, tmpl_context as c, url
@@ -43,125 +45,31 @@ from rhodecode.lib.auth import (
LoginRequired, HasRepoPermissionAnyDecorator, NotAnonymous,
HasAcceptedRepoType, XHRRequired)
from rhodecode.lib.channelstream import channelstream_request
-from rhodecode.lib.compat import OrderedDict
from rhodecode.lib.utils import jsonify
-from rhodecode.lib.utils2 import safe_int, safe_str, str2bool, safe_unicode
-from rhodecode.lib.vcs.backends.base import EmptyCommit, UpdateFailureReason
+from rhodecode.lib.utils2 import (
+ safe_int, safe_str, str2bool, safe_unicode)
+from rhodecode.lib.vcs.backends.base import (
+ EmptyCommit, UpdateFailureReason, EmptyRepository)
from rhodecode.lib.vcs.exceptions import (
EmptyRepositoryError, CommitDoesNotExistError, RepositoryRequirementError,
NodeDoesNotExistError)
-from rhodecode.lib.diffs import LimitedDiffContainer
+
from rhodecode.model.changeset_status import ChangesetStatusModel
-from rhodecode.model.comment import ChangesetCommentsModel
-from rhodecode.model.db import PullRequest, ChangesetStatus, ChangesetComment, \
- Repository
+from rhodecode.model.comment import CommentsModel
+from rhodecode.model.db import (PullRequest, ChangesetStatus, ChangesetComment,
+ Repository, PullRequestVersion)
from rhodecode.model.forms import PullRequestForm
from rhodecode.model.meta import Session
-from rhodecode.model.pull_request import PullRequestModel
+from rhodecode.model.pull_request import PullRequestModel, MergeCheck
log = logging.getLogger(__name__)
class PullrequestsController(BaseRepoController):
+
def __before__(self):
super(PullrequestsController, self).__before__()
- def _load_compare_data(self, pull_request, inline_comments, enable_comments=True):
- """
- Load context data needed for generating compare diff
-
- :param pull_request: object related to the request
- :param enable_comments: flag to determine if comments are included
- """
- source_repo = pull_request.source_repo
- source_ref_id = pull_request.source_ref_parts.commit_id
-
- target_repo = pull_request.target_repo
- target_ref_id = pull_request.target_ref_parts.commit_id
-
- # despite opening commits for bookmarks/branches/tags, we always
- # convert this to rev to prevent changes after bookmark or branch change
- c.source_ref_type = 'rev'
- c.source_ref = source_ref_id
-
- c.target_ref_type = 'rev'
- c.target_ref = target_ref_id
-
- c.source_repo = source_repo
- c.target_repo = target_repo
-
- c.fulldiff = bool(request.GET.get('fulldiff'))
-
- # diff_limit is the old behavior, will cut off the whole diff
- # if the limit is applied otherwise will just hide the
- # big files from the front-end
- diff_limit = self.cut_off_limit_diff
- file_limit = self.cut_off_limit_file
-
- pre_load = ["author", "branch", "date", "message"]
-
- c.commit_ranges = []
- source_commit = EmptyCommit()
- target_commit = EmptyCommit()
- c.missing_requirements = False
- try:
- c.commit_ranges = [
- source_repo.get_commit(commit_id=rev, pre_load=pre_load)
- for rev in pull_request.revisions]
-
- c.statuses = source_repo.statuses(
- [x.raw_id for x in c.commit_ranges])
-
- target_commit = source_repo.get_commit(
- commit_id=safe_str(target_ref_id))
- source_commit = source_repo.get_commit(
- commit_id=safe_str(source_ref_id))
- except RepositoryRequirementError:
- c.missing_requirements = True
-
- c.changes = {}
- c.missing_commits = False
- if (c.missing_requirements or
- isinstance(source_commit, EmptyCommit) or
- source_commit == target_commit):
- _parsed = []
- c.missing_commits = True
- else:
- vcs_diff = PullRequestModel().get_diff(pull_request)
- diff_processor = diffs.DiffProcessor(
- vcs_diff, format='newdiff', diff_limit=diff_limit,
- file_limit=file_limit, show_full_diff=c.fulldiff)
- _parsed = diff_processor.prepare()
-
- commit_changes = OrderedDict()
- _parsed = diff_processor.prepare()
- c.limited_diff = isinstance(_parsed, diffs.LimitedDiffContainer)
-
- _parsed = diff_processor.prepare()
-
- def _node_getter(commit):
- def get_node(fname):
- try:
- return commit.get_node(fname)
- except NodeDoesNotExistError:
- return None
- return get_node
-
- c.diffset = codeblocks.DiffSet(
- repo_name=c.repo_name,
- source_node_getter=_node_getter(target_commit),
- target_node_getter=_node_getter(source_commit),
- comments=inline_comments
- ).render_patchset(_parsed, target_commit.raw_id, source_commit.raw_id)
-
- c.included_files = []
- c.deleted_files = []
-
- for f in _parsed:
- st = f['stats']
- fid = h.FID('', f['filename'])
- c.included_files.append(f['filename'])
-
def _extract_ordering(self, request):
column_index = safe_int(request.GET.get('order[0][column]'))
order_dir = request.GET.get('order[0][dir]', 'desc')
@@ -205,7 +113,7 @@ class PullrequestsController(BaseRepoCon
if not request.is_xhr:
c.data = json.dumps(data['data'])
c.records_total = data['recordsTotal']
- return render('/pullrequests/pullrequests.html')
+ return render('/pullrequests/pullrequests.mako')
else:
return json.dumps(data)
@@ -244,10 +152,10 @@ class PullrequestsController(BaseRepoCon
opened_by=opened_by)
from rhodecode.lib.utils import PartialRenderer
- _render = PartialRenderer('data_table/_dt_elements.html')
+ _render = PartialRenderer('data_table/_dt_elements.mako')
data = []
for pr in pull_requests:
- comments = ChangesetCommentsModel().get_all_comments(
+ comments = CommentsModel().get_all_comments(
c.rhodecode_db_repo.repo_id, pull_request=pr)
data.append({
@@ -336,7 +244,7 @@ class PullrequestsController(BaseRepoCon
}
c.default_source_ref = selected_source_ref
- return render('/pullrequests/pullrequest.html')
+ return render('/pullrequests/pullrequest.mako')
@LoginRequired()
@NotAnonymous()
@@ -586,14 +494,20 @@ class PullrequestsController(BaseRepoCon
Merge will perform a server-side merge of the specified
pull request, if the pull request is approved and mergeable.
- After succesfull merging, the pull request is automatically
+ After successful merging, the pull request is automatically
closed, with a relevant comment.
"""
pull_request_id = safe_int(pull_request_id)
pull_request = PullRequest.get_or_404(pull_request_id)
user = c.rhodecode_user
- if self._meets_merge_pre_conditions(pull_request, user):
+ check = MergeCheck.validate(pull_request, user)
+ merge_possible = not check.failed
+
+ for err_type, error_msg in check.errors:
+ h.flash(error_msg, category=err_type)
+
+ if merge_possible:
log.debug("Pre-conditions checked, trying to merge.")
extras = vcs_operation_context(
request.environ, repo_name=pull_request.target_repo.repo_name,
@@ -606,24 +520,6 @@ class PullrequestsController(BaseRepoCon
repo_name=pull_request.target_repo.repo_name,
pull_request_id=pull_request.pull_request_id))
- def _meets_merge_pre_conditions(self, pull_request, user):
- if not PullRequestModel().check_user_merge(pull_request, user):
- raise HTTPForbidden()
-
- merge_status, msg = PullRequestModel().merge_status(pull_request)
- if not merge_status:
- log.debug("Cannot merge, not mergeable.")
- h.flash(msg, category='error')
- return False
-
- if (pull_request.calculated_review_status()
- is not ChangesetStatus.STATUS_APPROVED):
- log.debug("Cannot merge, approval is pending.")
- msg = _('Pull request reviewer approval is pending.')
- h.flash(msg, category='error')
- return False
- return True
-
def _merge_pull_request(self, pull_request, user, extras):
merge_resp = PullRequestModel().merge(
pull_request, user, extras=extras)
@@ -675,82 +571,295 @@ class PullrequestsController(BaseRepoCon
return redirect(url('my_account_pullrequests'))
raise HTTPForbidden()
+ def _get_pr_version(self, pull_request_id, version=None):
+ pull_request_id = safe_int(pull_request_id)
+ at_version = None
+
+ if version and version == 'latest':
+ pull_request_ver = PullRequest.get(pull_request_id)
+ pull_request_obj = pull_request_ver
+ _org_pull_request_obj = pull_request_obj
+ at_version = 'latest'
+ elif version:
+ pull_request_ver = PullRequestVersion.get_or_404(version)
+ pull_request_obj = pull_request_ver
+ _org_pull_request_obj = pull_request_ver.pull_request
+ at_version = pull_request_ver.pull_request_version_id
+ else:
+ _org_pull_request_obj = pull_request_obj = PullRequest.get_or_404(pull_request_id)
+
+ pull_request_display_obj = PullRequest.get_pr_display_object(
+ pull_request_obj, _org_pull_request_obj)
+
+ return _org_pull_request_obj, pull_request_obj, \
+ pull_request_display_obj, at_version
+
+ def _get_diffset(
+ self, source_repo, source_ref_id, target_ref_id, target_commit,
+ source_commit, diff_limit, file_limit, display_inline_comments):
+ vcs_diff = PullRequestModel().get_diff(
+ source_repo, source_ref_id, target_ref_id)
+
+ diff_processor = diffs.DiffProcessor(
+ vcs_diff, format='newdiff', diff_limit=diff_limit,
+ file_limit=file_limit, show_full_diff=c.fulldiff)
+
+ _parsed = diff_processor.prepare()
+
+ def _node_getter(commit):
+ def get_node(fname):
+ try:
+ return commit.get_node(fname)
+ except NodeDoesNotExistError:
+ return None
+
+ return get_node
+
+ diffset = codeblocks.DiffSet(
+ repo_name=c.repo_name,
+ source_repo_name=c.source_repo.repo_name,
+ source_node_getter=_node_getter(target_commit),
+ target_node_getter=_node_getter(source_commit),
+ comments=display_inline_comments
+ )
+ diffset = diffset.render_patchset(
+ _parsed, target_commit.raw_id, source_commit.raw_id)
+
+ return diffset
+
@LoginRequired()
@HasRepoPermissionAnyDecorator('repository.read', 'repository.write',
'repository.admin')
def show(self, repo_name, pull_request_id):
pull_request_id = safe_int(pull_request_id)
- c.pull_request = PullRequest.get_or_404(pull_request_id)
+ version = request.GET.get('version')
+ from_version = request.GET.get('from_version') or version
+ merge_checks = request.GET.get('merge_checks')
+ c.fulldiff = str2bool(request.GET.get('fulldiff'))
+
+ (pull_request_latest,
+ pull_request_at_ver,
+ pull_request_display_obj,
+ at_version) = self._get_pr_version(
+ pull_request_id, version=version)
+ versions = pull_request_display_obj.versions()
- c.template_context['pull_request_data']['pull_request_id'] = \
- pull_request_id
+ c.at_version = at_version
+ c.at_version_num = (at_version
+ if at_version and at_version != 'latest'
+ else None)
+ c.at_version_pos = ChangesetComment.get_index_from_version(
+ c.at_version_num, versions)
+
+ (prev_pull_request_latest,
+ prev_pull_request_at_ver,
+ prev_pull_request_display_obj,
+ prev_at_version) = self._get_pr_version(
+ pull_request_id, version=from_version)
+
+ c.from_version = prev_at_version
+ c.from_version_num = (prev_at_version
+ if prev_at_version and prev_at_version != 'latest'
+ else None)
+ c.from_version_pos = ChangesetComment.get_index_from_version(
+ c.from_version_num, versions)
+
+ # define if we're in COMPARE mode or VIEW at version mode
+ compare = at_version != prev_at_version
# pull_requests repo_name we opened it against
# ie. target_repo must match
- if repo_name != c.pull_request.target_repo.repo_name:
+ if repo_name != pull_request_at_ver.target_repo.repo_name:
raise HTTPNotFound
- c.allowed_to_change_status = PullRequestModel(). \
- check_user_change_status(c.pull_request, c.rhodecode_user)
- c.allowed_to_update = PullRequestModel().check_user_update(
- c.pull_request, c.rhodecode_user) and not c.pull_request.is_closed()
- c.allowed_to_merge = PullRequestModel().check_user_merge(
- c.pull_request, c.rhodecode_user) and not c.pull_request.is_closed()
c.shadow_clone_url = PullRequestModel().get_shadow_clone_url(
- c.pull_request)
- c.allowed_to_delete = PullRequestModel().check_user_delete(
- c.pull_request, c.rhodecode_user) and not c.pull_request.is_closed()
+ pull_request_at_ver)
+
+ c.ancestor = None # empty ancestor hidden in display
+ c.pull_request = pull_request_display_obj
+ c.pull_request_latest = pull_request_latest
+
+ pr_closed = pull_request_latest.is_closed()
+ if compare or (at_version and not at_version == 'latest'):
+ c.allowed_to_change_status = False
+ c.allowed_to_update = False
+ c.allowed_to_merge = False
+ c.allowed_to_delete = False
+ c.allowed_to_comment = False
+ else:
+ c.allowed_to_change_status = PullRequestModel(). \
+ check_user_change_status(pull_request_at_ver, c.rhodecode_user)
+ c.allowed_to_update = PullRequestModel().check_user_update(
+ pull_request_latest, c.rhodecode_user) and not pr_closed
+ c.allowed_to_merge = PullRequestModel().check_user_merge(
+ pull_request_latest, c.rhodecode_user) and not pr_closed
+ c.allowed_to_delete = PullRequestModel().check_user_delete(
+ pull_request_latest, c.rhodecode_user) and not pr_closed
+ c.allowed_to_comment = not pr_closed
+
+ # check merge capabilities
+ _merge_check = MergeCheck.validate(
+ pull_request_latest, user=c.rhodecode_user)
+ c.pr_merge_errors = _merge_check.error_details
+ c.pr_merge_possible = not _merge_check.failed
+ c.pr_merge_message = _merge_check.merge_msg
+
+ if merge_checks:
+ return render('/pullrequests/pullrequest_merge_checks.mako')
+
+ comments_model = CommentsModel()
+
+ # reviewers and statuses
+ c.pull_request_reviewers = pull_request_at_ver.reviewers_statuses()
+ allowed_reviewers = [x[0].user_id for x in c.pull_request_reviewers]
+ c.pull_request_review_status = pull_request_at_ver.calculated_review_status()
- cc_model = ChangesetCommentsModel()
+ # GENERAL COMMENTS with versions #
+ q = comments_model._all_general_comments_of_pull_request(pull_request_latest)
+ q = q.order_by(ChangesetComment.comment_id.asc())
+ general_comments = q.order_by(ChangesetComment.pull_request_version_id.asc())
+
+ # pick comments we want to render at current version
+ c.comment_versions = comments_model.aggregate_comments(
+ general_comments, versions, c.at_version_num)
+ c.comments = c.comment_versions[c.at_version_num]['until']
- c.pull_request_reviewers = c.pull_request.reviewers_statuses()
+ # INLINE COMMENTS with versions #
+ q = comments_model._all_inline_comments_of_pull_request(pull_request_latest)
+ q = q.order_by(ChangesetComment.comment_id.asc())
+ inline_comments = q.order_by(ChangesetComment.pull_request_version_id.asc())
+ c.inline_versions = comments_model.aggregate_comments(
+ inline_comments, versions, c.at_version_num, inline=True)
+
+ # inject latest version
+ latest_ver = PullRequest.get_pr_display_object(
+ pull_request_latest, pull_request_latest)
+
+ c.versions = versions + [latest_ver]
- c.pull_request_review_status = c.pull_request.calculated_review_status()
- c.pr_merge_status, c.pr_merge_msg = PullRequestModel().merge_status(
- c.pull_request)
- c.approval_msg = None
- if c.pull_request_review_status != ChangesetStatus.STATUS_APPROVED:
- c.approval_msg = _('Reviewer approval is pending.')
- c.pr_merge_status = False
- # load compare data into template context
- enable_comments = not c.pull_request.is_closed()
+ # if we use version, then do not show later comments
+ # than current version
+ display_inline_comments = collections.defaultdict(
+ lambda: collections.defaultdict(list))
+ for co in inline_comments:
+ if c.at_version_num:
+ # pick comments that are at least UPTO given version, so we
+ # don't render comments for higher version
+ should_render = co.pull_request_version_id and \
+ co.pull_request_version_id <= c.at_version_num
+ else:
+ # showing all, for 'latest'
+ should_render = True
+
+ if should_render:
+ display_inline_comments[co.f_path][co.line_no].append(co)
+
+ # load diff data into template context, if we use compare mode then
+ # diff is calculated based on changes between versions of PR
+
+ source_repo = pull_request_at_ver.source_repo
+ source_ref_id = pull_request_at_ver.source_ref_parts.commit_id
+
+ target_repo = pull_request_at_ver.target_repo
+ target_ref_id = pull_request_at_ver.target_ref_parts.commit_id
+ if compare:
+ # in compare switch the diff base to latest commit from prev version
+ target_ref_id = prev_pull_request_display_obj.revisions[0]
- # inline comments
- c.inline_comments = cc_model.get_inline_comments(
- c.rhodecode_db_repo.repo_id,
- pull_request=pull_request_id)
+ # despite opening commits for bookmarks/branches/tags, we always
+ # convert this to rev to prevent changes after bookmark or branch change
+ c.source_ref_type = 'rev'
+ c.source_ref = source_ref_id
+
+ c.target_ref_type = 'rev'
+ c.target_ref = target_ref_id
+
+ c.source_repo = source_repo
+ c.target_repo = target_repo
+
+ # diff_limit is the old behavior, will cut off the whole diff
+ # if the limit is applied otherwise will just hide the
+ # big files from the front-end
+ diff_limit = self.cut_off_limit_diff
+ file_limit = self.cut_off_limit_file
- c.inline_cnt = cc_model.get_inline_comments_count(c.inline_comments)
+ c.commit_ranges = []
+ source_commit = EmptyCommit()
+ target_commit = EmptyCommit()
+ c.missing_requirements = False
- self._load_compare_data(
- c.pull_request, c.inline_comments, enable_comments=enable_comments)
+ # try first shadow repo, fallback to regular repo
+ try:
+ commits_source_repo = pull_request_latest.get_shadow_repo()
+ except Exception:
+ log.debug('Failed to get shadow repo', exc_info=True)
+ commits_source_repo = source_repo.scm_instance()
+
+ c.commits_source_repo = commits_source_repo
+ commit_cache = {}
+ try:
+ pre_load = ["author", "branch", "date", "message"]
+ show_revs = pull_request_at_ver.revisions
+ for rev in show_revs:
+ comm = commits_source_repo.get_commit(
+ commit_id=rev, pre_load=pre_load)
+ c.commit_ranges.append(comm)
+ commit_cache[comm.raw_id] = comm
- # outdated comments
- c.outdated_comments = {}
- c.outdated_cnt = 0
- if ChangesetCommentsModel.use_outdated_comments(c.pull_request):
- c.outdated_comments = cc_model.get_outdated_comments(
- c.rhodecode_db_repo.repo_id,
- pull_request=c.pull_request)
- # Count outdated comments and check for deleted files
- for file_name, lines in c.outdated_comments.iteritems():
- for comments in lines.values():
- c.outdated_cnt += len(comments)
- if file_name not in c.included_files:
- c.deleted_files.append(file_name)
+ target_commit = commits_source_repo.get_commit(
+ commit_id=safe_str(target_ref_id))
+ source_commit = commits_source_repo.get_commit(
+ commit_id=safe_str(source_ref_id))
+ except CommitDoesNotExistError:
+ pass
+ except RepositoryRequirementError:
+ log.warning(
+ 'Failed to get all required data from repo', exc_info=True)
+ c.missing_requirements = True
+
+ c.statuses = source_repo.statuses(
+ [x.raw_id for x in c.commit_ranges])
+
+ # auto collapse if we have more than limit
+ collapse_limit = diffs.DiffProcessor._collapse_commits_over
+ c.collapse_all_commits = len(c.commit_ranges) > collapse_limit
+ c.compare_mode = compare
+
+ c.missing_commits = False
+ if (c.missing_requirements or isinstance(source_commit, EmptyCommit)
+ or source_commit == target_commit):
+ c.missing_commits = True
+ else:
+
+ c.diffset = self._get_diffset(
+ commits_source_repo, source_ref_id, target_ref_id,
+ target_commit, source_commit,
+ diff_limit, file_limit, display_inline_comments)
+
+ c.limited_diff = c.diffset.limited_diff
+
+ # calculate removed files that are bound to comments
+ comment_deleted_files = [
+ fname for fname in display_inline_comments
+ if fname not in c.diffset.file_stats]
+
+ c.deleted_files_comments = collections.defaultdict(dict)
+ for fname, per_line_comments in display_inline_comments.items():
+ if fname in comment_deleted_files:
+ c.deleted_files_comments[fname]['stats'] = 0
+ c.deleted_files_comments[fname]['comments'] = list()
+ for lno, comments in per_line_comments.items():
+ c.deleted_files_comments[fname]['comments'].extend(
+ comments)
# this is a hack to properly display links, when creating PR, the
# compare view and others uses different notation, and
- # compare_commits.html renders links based on the target_repo.
+ # compare_commits.mako renders links based on the target_repo.
# We need to swap that here to generate it properly on the html side
c.target_repo = c.source_repo
- # comments
- c.comments = cc_model.get_comments(c.rhodecode_db_repo.repo_id,
- pull_request=pull_request_id)
-
if c.allowed_to_update:
force_close = ('forced_closed', _('Close Pull Request'))
statuses = ChangesetStatus.STATUSES + [force_close]
@@ -758,14 +867,55 @@ class PullrequestsController(BaseRepoCon
statuses = ChangesetStatus.STATUSES
c.commit_statuses = statuses
- c.ancestor = None # TODO: add ancestor here
+ c.show_version_changes = not pr_closed
+ if c.show_version_changes:
+ cur_obj = pull_request_at_ver
+ prev_obj = prev_pull_request_at_ver
+
+ old_commit_ids = prev_obj.revisions
+ new_commit_ids = cur_obj.revisions
+ commit_changes = PullRequestModel()._calculate_commit_id_changes(
+ old_commit_ids, new_commit_ids)
+ c.commit_changes_summary = commit_changes
+
+ # calculate the diff for commits between versions
+ c.commit_changes = []
+ mark = lambda cs, fw: list(
+ h.itertools.izip_longest([], cs, fillvalue=fw))
+ for c_type, raw_id in mark(commit_changes.added, 'a') \
+ + mark(commit_changes.removed, 'r') \
+ + mark(commit_changes.common, 'c'):
- return render('/pullrequests/pullrequest_show.html')
+ if raw_id in commit_cache:
+ commit = commit_cache[raw_id]
+ else:
+ try:
+ commit = commits_source_repo.get_commit(raw_id)
+ except CommitDoesNotExistError:
+ # in case we fail extracting still use "dummy" commit
+ # for display in commit diff
+ commit = h.AttributeDict(
+ {'raw_id': raw_id,
+ 'message': 'EMPTY or MISSING COMMIT'})
+ c.commit_changes.append([c_type, commit])
+
+ # current user review statuses for each version
+ c.review_versions = {}
+ if c.rhodecode_user.user_id in allowed_reviewers:
+ for co in general_comments:
+ if co.author.user_id == c.rhodecode_user.user_id:
+ # each comment has a status change
+ status = co.status_change
+ if status:
+ _ver_pr = status[0].comment.pull_request_version_id
+ c.review_versions[_ver_pr] = status[0]
+
+ return render('/pullrequests/pullrequest_show.mako')
@LoginRequired()
@NotAnonymous()
- @HasRepoPermissionAnyDecorator('repository.read', 'repository.write',
- 'repository.admin')
+ @HasRepoPermissionAnyDecorator(
+ 'repository.read', 'repository.write', 'repository.admin')
@auth.CSRFRequired()
@jsonify
def comment(self, repo_name, pull_request_id):
@@ -778,6 +928,9 @@ class PullrequestsController(BaseRepoCon
# as a changeset status, still we want to send it in one value.
status = request.POST.get('changeset_status', None)
text = request.POST.get('text')
+ comment_type = request.POST.get('comment_type')
+ resolves_comment_id = request.POST.get('resolves_comment_id', None)
+
if status and '_closed' in status:
close_pr = True
status = status.replace('_closed', '')
@@ -798,7 +951,7 @@ class PullrequestsController(BaseRepoCon
if close_pr:
message = _('Closing with') + ' ' + message
text = text or message
- comm = ChangesetCommentsModel().create(
+ comm = CommentsModel().create(
text=text,
repo=c.rhodecode_db_repo.repo_id,
user=c.rhodecode_user.user_id,
@@ -809,11 +962,11 @@ class PullrequestsController(BaseRepoCon
if status and allowed_to_change_status else None),
status_change_type=(status
if status and allowed_to_change_status else None),
- closing_pr=close_pr
+ closing_pr=close_pr,
+ comment_type=comment_type,
+ resolves_comment_id=resolves_comment_id
)
-
-
if allowed_to_change_status:
old_calculated_status = pull_request.calculated_review_status()
# get status if set !
@@ -863,9 +1016,10 @@ class PullrequestsController(BaseRepoCon
}
if comm:
c.co = comm
+ c.inline_comment = True if comm.line_no else False
data.update(comm.get_dict())
data.update({'rendered_text':
- render('changeset/changeset_comment_block.html')})
+ render('changeset/changeset_comment_block.mako')})
return data
@@ -889,7 +1043,7 @@ class PullrequestsController(BaseRepoCon
is_repo_admin = h.HasRepoPermissionAny('repository.admin')(c.repo_name)
if h.HasPermissionAny('hg.admin')() or is_repo_admin or is_owner:
old_calculated_status = co.pull_request.calculated_review_status()
- ChangesetCommentsModel().delete(comment=co)
+ CommentsModel().delete(comment=co)
Session().commit()
calculated_status = co.pull_request.calculated_review_status()
if old_calculated_status != calculated_status:
diff --git a/rhodecode/controllers/search.py b/rhodecode/controllers/search.py
--- a/rhodecode/controllers/search.py
+++ b/rhodecode/controllers/search.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -108,4 +108,4 @@ class SearchController(BaseRepoControlle
c.cur_query = search_query
c.search_type = search_type
# Return a rendered template
- return render('/search/search.html')
+ return render('/search/search.mako')
diff --git a/rhodecode/controllers/summary.py b/rhodecode/controllers/summary.py
--- a/rhodecode/controllers/summary.py
+++ b/rhodecode/controllers/summary.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -165,7 +165,7 @@ class SummaryController(BaseRepoControll
c.repo_name, c.rhodecode_user.user_id)
if c.repository_requirements_missing:
- return render('summary/missing_requirements.html')
+ return render('summary/missing_requirements.mako')
c.readme_data, c.readme_file = \
self.__get_readme_data(c.rhodecode_db_repo)
@@ -173,9 +173,9 @@ class SummaryController(BaseRepoControll
_load_changelog_summary()
if request.is_xhr:
- return render('changelog/changelog_summary_data.html')
+ return render('changelog/changelog_summary_data.mako')
- return render('summary/summary.html')
+ return render('summary/summary.mako')
@LoginRequired()
@XHRRequired()
diff --git a/rhodecode/controllers/tags.py b/rhodecode/controllers/tags.py
--- a/rhodecode/controllers/tags.py
+++ b/rhodecode/controllers/tags.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -31,8 +31,8 @@ log = logging.getLogger(__name__)
class TagsController(BaseReferencesController):
- partials_template = 'tags/tags_data.html'
- template = 'tags/tags.html'
+ partials_template = 'tags/tags_data.mako'
+ template = 'tags/tags.mako'
def _get_reference_items(self, repo):
return repo.tags.items()
diff --git a/rhodecode/controllers/users.py b/rhodecode/controllers/users.py
--- a/rhodecode/controllers/users.py
+++ b/rhodecode/controllers/users.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -40,4 +40,4 @@ class UsersController(BaseController):
raise HTTPNotFound()
c.active = 'user_profile'
- return render('users/user.html')
+ return render('users/user.mako')
diff --git a/rhodecode/controllers/utils.py b/rhodecode/controllers/utils.py
--- a/rhodecode/controllers/utils.py
+++ b/rhodecode/controllers/utils.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -27,6 +27,7 @@ Should only contain utilities to be shar
from rhodecode.lib import helpers as h
from rhodecode.lib.vcs.exceptions import RepositoryError
+
def parse_path_ref(ref, default_path=None):
"""
Parse out a path and reference combination and return both parts of it.
@@ -76,8 +77,8 @@ def get_commit_from_ref_name(repo, ref_n
}
commit_id = ref_name
- if repo_scm.alias != 'svn': # pass svn refs straight to backend until
- # the branch issue with svn is fixed
+ if repo_scm.alias != 'svn': # pass svn refs straight to backend until
+ # the branch issue with svn is fixed
if ref_type and ref_type in ref_type_mapping:
try:
commit_id = ref_type_mapping[ref_type][ref_name]
diff --git a/rhodecode/events/__init__.py b/rhodecode/events/__init__.py
--- a/rhodecode/events/__init__.py
+++ b/rhodecode/events/__init__.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2016-2016 RhodeCode GmbH
+# Copyright (C) 2016-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/events/base.py b/rhodecode/events/base.py
--- a/rhodecode/events/base.py
+++ b/rhodecode/events/base.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2016-2016 RhodeCode GmbH
+# Copyright (C) 2016-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/events/interfaces.py b/rhodecode/events/interfaces.py
--- a/rhodecode/events/interfaces.py
+++ b/rhodecode/events/interfaces.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2016-2016 RhodeCode GmbH
+# Copyright (C) 2016-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/events/pullrequest.py b/rhodecode/events/pullrequest.py
--- a/rhodecode/events/pullrequest.py
+++ b/rhodecode/events/pullrequest.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2016-2016 RhodeCode GmbH
+# Copyright (C) 2016-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -114,7 +114,7 @@ class PullRequestCommentEvent(PullReques
self.comment = comment
def as_dict(self):
- from rhodecode.model.comment import ChangesetCommentsModel
+ from rhodecode.model.comment import CommentsModel
data = super(PullRequestCommentEvent, self).as_dict()
status = None
@@ -125,7 +125,7 @@ class PullRequestCommentEvent(PullReques
'comment': {
'status': status,
'text': self.comment.text,
- 'url': ChangesetCommentsModel().get_url(self.comment)
+ 'url': CommentsModel().get_url(self.comment)
}
})
return data
diff --git a/rhodecode/events/repo.py b/rhodecode/events/repo.py
--- a/rhodecode/events/repo.py
+++ b/rhodecode/events/repo.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2016-2016 RhodeCode GmbH
+# Copyright (C) 2016-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/events/repo_group.py b/rhodecode/events/repo_group.py
--- a/rhodecode/events/repo_group.py
+++ b/rhodecode/events/repo_group.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2016-2016 RhodeCode GmbH
+# Copyright (C) 2016-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/events/user.py b/rhodecode/events/user.py
--- a/rhodecode/events/user.py
+++ b/rhodecode/events/user.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2016-2016 RhodeCode GmbH
+# Copyright (C) 2016-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/forms/__init__.py b/rhodecode/forms/__init__.py
--- a/rhodecode/forms/__init__.py
+++ b/rhodecode/forms/__init__.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/i18n/be/LC_MESSAGES/rhodecode.po b/rhodecode/i18n/be/LC_MESSAGES/rhodecode.po
--- a/rhodecode/i18n/be/LC_MESSAGES/rhodecode.po
+++ b/rhodecode/i18n/be/LC_MESSAGES/rhodecode.po
@@ -1,5 +1,5 @@
# Translations template for rhodecode-enterprise-ce.
-# Copyright (C) 2016 RhodeCode GmbH
+# Copyright (C) 2017 RhodeCode GmbH
# This file is distributed under the same license as the rhodecode-enterprise-ce project.
#
# Translators:
diff --git a/rhodecode/i18n/de/LC_MESSAGES/rhodecode.po b/rhodecode/i18n/de/LC_MESSAGES/rhodecode.po
--- a/rhodecode/i18n/de/LC_MESSAGES/rhodecode.po
+++ b/rhodecode/i18n/de/LC_MESSAGES/rhodecode.po
@@ -1,5 +1,5 @@
# Translations template for rhodecode-enterprise-ce.
-# Copyright (C) 2016 RhodeCode GmbH
+# Copyright (C) 2017 RhodeCode GmbH
# This file is distributed under the same license as the rhodecode-enterprise-ce project.
#
# Translators:
diff --git a/rhodecode/i18n/en/LC_MESSAGES/rhodecode.po b/rhodecode/i18n/en/LC_MESSAGES/rhodecode.po
--- a/rhodecode/i18n/en/LC_MESSAGES/rhodecode.po
+++ b/rhodecode/i18n/en/LC_MESSAGES/rhodecode.po
@@ -1,5 +1,5 @@
# Translations template for rhodecode-enterprise-ce.
-# Copyright (C) 2016 RhodeCode GmbH
+# Copyright (C) 2017 RhodeCode GmbH
# This file is distributed under the same license as the rhodecode-enterprise-ce project.
#
# Translators:
diff --git a/rhodecode/i18n/es/LC_MESSAGES/rhodecode.po b/rhodecode/i18n/es/LC_MESSAGES/rhodecode.po
--- a/rhodecode/i18n/es/LC_MESSAGES/rhodecode.po
+++ b/rhodecode/i18n/es/LC_MESSAGES/rhodecode.po
@@ -1,5 +1,5 @@
# Translations template for rhodecode-enterprise-ce.
-# Copyright (C) 2016 RhodeCode GmbH
+# Copyright (C) 2017 RhodeCode GmbH
# This file is distributed under the same license as the rhodecode-enterprise-ce project.
#
# Translators:
diff --git a/rhodecode/i18n/fr/LC_MESSAGES/rhodecode.po b/rhodecode/i18n/fr/LC_MESSAGES/rhodecode.po
--- a/rhodecode/i18n/fr/LC_MESSAGES/rhodecode.po
+++ b/rhodecode/i18n/fr/LC_MESSAGES/rhodecode.po
@@ -1,5 +1,5 @@
# Translations template for rhodecode-enterprise-ce.
-# Copyright (C) 2016 RhodeCode GmbH
+# Copyright (C) 2017 RhodeCode GmbH
# This file is distributed under the same license as the rhodecode-enterprise-ce project.
#
# Translators:
diff --git a/rhodecode/i18n/it/LC_MESSAGES/rhodecode.po b/rhodecode/i18n/it/LC_MESSAGES/rhodecode.po
--- a/rhodecode/i18n/it/LC_MESSAGES/rhodecode.po
+++ b/rhodecode/i18n/it/LC_MESSAGES/rhodecode.po
@@ -1,9 +1,9 @@
# Translations template for rhodecode-enterprise-ce.
-# Copyright (C) 2016 RhodeCode GmbH
+# Copyright (C) 2017 RhodeCode GmbH
# This file is distributed under the same license as the rhodecode-enterprise-ce project.
#
# Translators:
-# Alessandro sauzher Ceglie, 2014-2016
+# Alessandro sauzher Ceglie, 2014-2017
# FIRST AUTHOR , 2014
msgid ""
msgstr ""
diff --git a/rhodecode/i18n/ja/LC_MESSAGES/rhodecode.po b/rhodecode/i18n/ja/LC_MESSAGES/rhodecode.po
--- a/rhodecode/i18n/ja/LC_MESSAGES/rhodecode.po
+++ b/rhodecode/i18n/ja/LC_MESSAGES/rhodecode.po
@@ -1,5 +1,5 @@
# Translations template for rhodecode-enterprise-ce.
-# Copyright (C) 2016 RhodeCode GmbH
+# Copyright (C) 2017 RhodeCode GmbH
# This file is distributed under the same license as the rhodecode-enterprise-ce project.
#
# Translators:
diff --git a/rhodecode/i18n/pl/LC_MESSAGES/rhodecode.po b/rhodecode/i18n/pl/LC_MESSAGES/rhodecode.po
--- a/rhodecode/i18n/pl/LC_MESSAGES/rhodecode.po
+++ b/rhodecode/i18n/pl/LC_MESSAGES/rhodecode.po
@@ -1,5 +1,5 @@
# Translations template for rhodecode-enterprise-ce.
-# Copyright (C) 2016 RhodeCode GmbH
+# Copyright (C) 2017 RhodeCode GmbH
# This file is distributed under the same license as the rhodecode-enterprise-ce project.
#
# Translators:
diff --git a/rhodecode/i18n/pt/LC_MESSAGES/rhodecode.po b/rhodecode/i18n/pt/LC_MESSAGES/rhodecode.po
--- a/rhodecode/i18n/pt/LC_MESSAGES/rhodecode.po
+++ b/rhodecode/i18n/pt/LC_MESSAGES/rhodecode.po
@@ -1,5 +1,5 @@
# Translations template for rhodecode-enterprise-ce.
-# Copyright (C) 2016 RhodeCode GmbH
+# Copyright (C) 2017 RhodeCode GmbH
# This file is distributed under the same license as the rhodecode-enterprise-ce project.
#
# Translators:
diff --git a/rhodecode/i18n/rhodecode.pot b/rhodecode/i18n/rhodecode.pot
--- a/rhodecode/i18n/rhodecode.pot
+++ b/rhodecode/i18n/rhodecode.pot
@@ -1,14 +1,14 @@
# Translations template for rhodecode-enterprise-ce.
-# Copyright (C) 2016 RhodeCode GmbH
+# Copyright (C) 2017 RhodeCode GmbH
# This file is distributed under the same license as the rhodecode-enterprise-ce project.
-# FIRST AUTHOR , 2016.
+# FIRST AUTHOR , 2017.
#
#, fuzzy
msgid ""
msgstr ""
-"Project-Id-Version: rhodecode-enterprise-ce 4.5.0\n"
+"Project-Id-Version: rhodecode-enterprise-ce 4.6.0\n"
"Report-Msgid-Bugs-To: marcin@rhodecode.com\n"
-"POT-Creation-Date: 2016-12-01 10:12+0000\n"
+"POT-Creation-Date: 2017-02-01 21:09+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -17,89 +17,233 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 1.3\n"
-#: rhodecode/admin/navigation.py:74 rhodecode/authentication/routes.py:60
-#: rhodecode/integrations/views.py:168
-#: rhodecode/templates/admin/permissions/permissions.html:36
+#: rhodecode/admin/navigation.py:83 rhodecode/authentication/routes.py:60
+#: rhodecode/integrations/views.py:167
+#: rhodecode/templates/admin/permissions/permissions.mako:36
msgid "Global"
msgstr ""
-#: rhodecode/admin/navigation.py:75
-#: rhodecode/templates/admin/repos/repo_edit.html:52
+#: rhodecode/admin/navigation.py:84
+#: rhodecode/templates/admin/repos/repo_edit.mako:52
msgid "VCS"
msgstr ""
-#: rhodecode/admin/navigation.py:76
-msgid "Visual"
-msgstr ""
-
-#: rhodecode/admin/navigation.py:77
-msgid "Remap and Rescan"
-msgstr ""
-
-#: rhodecode/admin/navigation.py:78
-#: rhodecode/templates/admin/repos/repo_edit.html:58
-msgid "Issue Tracker"
-msgstr ""
-
-#: rhodecode/admin/navigation.py:80 rhodecode/integrations/types/email.py:232
-#: rhodecode/templates/register.html:75
-#: rhodecode/templates/admin/my_account/my_account_profile.html:48
-#: rhodecode/templates/admin/my_account/my_account_profile_edit.html:94
-#: rhodecode/templates/admin/users/user_add.html:86
-#: rhodecode/templates/admin/users/user_edit_profile.html:65
-#: rhodecode/templates/admin/users/users.html:92
-#: rhodecode/templates/email_templates/user_registration.mako:25
-#: rhodecode/templates/users/user_profile.html:51
-msgid "Email"
-msgstr ""
-
-#: rhodecode/admin/navigation.py:81
-msgid "Hooks"
-msgstr ""
-
-#: rhodecode/admin/navigation.py:82
-msgid "Full Text Search"
-msgstr ""
-
-#: rhodecode/admin/navigation.py:83
-#: rhodecode/templates/admin/integrations/base.html:23
-#: rhodecode/templates/admin/integrations/form.html:8
-#: rhodecode/templates/admin/integrations/form.html:21
-#: rhodecode/templates/admin/integrations/form.html:32
-#: rhodecode/templates/admin/integrations/list.html:21
-#: rhodecode/templates/admin/integrations/list.html:25
-#: rhodecode/templates/admin/integrations/list.html:29
-#: rhodecode/templates/admin/integrations/list.html:36
-#: rhodecode/templates/admin/integrations/new.html:9
-#: rhodecode/templates/admin/integrations/new.html:17
-#: rhodecode/templates/admin/integrations/new.html:23
-#: rhodecode/templates/admin/repo_groups/repo_group_edit.html:51
-#: rhodecode/templates/admin/repos/repo_edit.html:72
-#: rhodecode/templates/base/base.html:79
-msgid "Integrations"
-msgstr ""
-
#: rhodecode/admin/navigation.py:85
-#: rhodecode/templates/admin/settings/settings_system.html:9
-msgid "System Info"
+msgid "Visual"
msgstr ""
#: rhodecode/admin/navigation.py:86
-msgid "Open Source Licenses"
+msgid "Remap and Rescan"
+msgstr ""
+
+#: rhodecode/admin/navigation.py:87
+#: rhodecode/templates/admin/repos/repo_edit.mako:58
+msgid "Issue Tracker"
+msgstr ""
+
+#: rhodecode/admin/navigation.py:89 rhodecode/integrations/types/email.py:232
+#: rhodecode/templates/register.mako:75
+#: rhodecode/templates/admin/my_account/my_account_profile.mako:48
+#: rhodecode/templates/admin/my_account/my_account_profile_edit.mako:97
+#: rhodecode/templates/admin/users/user_add.mako:86
+#: rhodecode/templates/admin/users/user_edit_profile.mako:65
+#: rhodecode/templates/admin/users/users.mako:92
+#: rhodecode/templates/email_templates/user_registration.mako:25
+#: rhodecode/templates/users/user_profile.mako:51
+msgid "Email"
+msgstr ""
+
+#: rhodecode/admin/navigation.py:90
+msgid "Hooks"
+msgstr ""
+
+#: rhodecode/admin/navigation.py:91
+msgid "Full Text Search"
msgstr ""
#: rhodecode/admin/navigation.py:93
+#: rhodecode/templates/admin/integrations/base.mako:23
+#: rhodecode/templates/admin/integrations/form.mako:8
+#: rhodecode/templates/admin/integrations/form.mako:21
+#: rhodecode/templates/admin/integrations/form.mako:32
+#: rhodecode/templates/admin/integrations/list.mako:21
+#: rhodecode/templates/admin/integrations/list.mako:25
+#: rhodecode/templates/admin/integrations/list.mako:29
+#: rhodecode/templates/admin/integrations/list.mako:36
+#: rhodecode/templates/admin/integrations/new.mako:9
+#: rhodecode/templates/admin/integrations/new.mako:17
+#: rhodecode/templates/admin/integrations/new.mako:23
+#: rhodecode/templates/admin/repo_groups/repo_group_edit.mako:51
+#: rhodecode/templates/admin/repos/repo_edit.mako:72
+#: rhodecode/templates/base/base.mako:79
+msgid "Integrations"
+msgstr ""
+
+#: rhodecode/admin/navigation.py:95
+#: rhodecode/templates/admin/settings/settings_system.mako:9
+msgid "System Info"
+msgstr ""
+
+#: rhodecode/admin/navigation.py:97
+msgid "User Sessions"
+msgstr ""
+
+#: rhodecode/admin/navigation.py:99
+msgid "Open Source Licenses"
+msgstr ""
+
+#: rhodecode/admin/navigation.py:107
msgid "Labs"
msgstr ""
-#: rhodecode/admin/views.py:70
+#: rhodecode/admin/views/sessions.py:90
+msgid "Cleaned up old sessions"
+msgstr ""
+
+#: rhodecode/admin/views/sessions.py:96
+msgid "Failed to cleanup up old sessions"
+msgstr ""
+
+#: rhodecode/admin/views/svn_config.py:47
msgid "Apache configuration for Subversion generated."
msgstr ""
-#: rhodecode/admin/views.py:77
+#: rhodecode/admin/views/svn_config.py:55
msgid "Failed to generate the Apache configuration for Subversion."
msgstr ""
+#: rhodecode/admin/views/system_info.py:96
+msgid "Note: please make sure this server can access `${url}` for the update link to work"
+msgstr ""
+
+#: rhodecode/admin/views/system_info.py:99
+msgid "Update info"
+msgstr ""
+
+#: rhodecode/admin/views/system_info.py:101
+msgid "Check for updates"
+msgstr ""
+
+#: rhodecode/admin/views/system_info.py:106
+msgid "RhodeCode Version"
+msgstr ""
+
+#: rhodecode/admin/views/system_info.py:107
+msgid "RhodeCode Server IP"
+msgstr ""
+
+#: rhodecode/admin/views/system_info.py:108
+msgid "RhodeCode Server ID"
+msgstr ""
+
+#: rhodecode/admin/views/system_info.py:109
+msgid "RhodeCode Configuration"
+msgstr ""
+
+#: rhodecode/admin/views/system_info.py:113
+msgid "Database"
+msgstr ""
+
+#: rhodecode/admin/views/system_info.py:114
+msgid "Database version"
+msgstr ""
+
+#: rhodecode/admin/views/system_info.py:118
+msgid "Platform"
+msgstr ""
+
+#: rhodecode/admin/views/system_info.py:119
+msgid "Platform UUID"
+msgstr ""
+
+#: rhodecode/admin/views/system_info.py:120
+msgid "Python version"
+msgstr ""
+
+#: rhodecode/admin/views/system_info.py:121
+msgid "Python path"
+msgstr ""
+
+#: rhodecode/admin/views/system_info.py:125
+msgid "CPU"
+msgstr ""
+
+#: rhodecode/admin/views/system_info.py:126
+msgid "Load"
+msgstr ""
+
+#: rhodecode/admin/views/system_info.py:127
+msgid "Memory"
+msgstr ""
+
+#: rhodecode/admin/views/system_info.py:128
+msgid "Uptime"
+msgstr ""
+
+#: rhodecode/admin/views/system_info.py:132
+msgid "Storage location"
+msgstr ""
+
+#: rhodecode/admin/views/system_info.py:133
+msgid "Storage info"
+msgstr ""
+
+#: rhodecode/admin/views/system_info.py:134
+msgid "Storage inodes"
+msgstr ""
+
+#: rhodecode/admin/views/system_info.py:136
+msgid "Gist storage location"
+msgstr ""
+
+#: rhodecode/admin/views/system_info.py:137
+msgid "Gist storage info"
+msgstr ""
+
+#: rhodecode/admin/views/system_info.py:139
+msgid "Archive cache storage location"
+msgstr ""
+
+#: rhodecode/admin/views/system_info.py:140
+msgid "Archive cache info"
+msgstr ""
+
+#: rhodecode/admin/views/system_info.py:142
+msgid "Temp storage location"
+msgstr ""
+
+#: rhodecode/admin/views/system_info.py:143
+msgid "Temp storage info"
+msgstr ""
+
+#: rhodecode/admin/views/system_info.py:145
+msgid "Search info"
+msgstr ""
+
+#: rhodecode/admin/views/system_info.py:146
+msgid "Search location"
+msgstr ""
+
+#: rhodecode/admin/views/system_info.py:150
+msgid "VCS Backends"
+msgstr ""
+
+#: rhodecode/admin/views/system_info.py:151
+msgid "VCS Server"
+msgstr ""
+
+#: rhodecode/admin/views/system_info.py:152
+msgid "GIT"
+msgstr ""
+
+#: rhodecode/admin/views/system_info.py:153
+msgid "HG"
+msgstr ""
+
+#: rhodecode/admin/views/system_info.py:154
+msgid "SVN"
+msgstr ""
+
#: rhodecode/authentication/schema.py:35
msgid "Enable or disable this authentication plugin."
msgstr ""
@@ -109,7 +253,7 @@ msgstr ""
#: rhodecode/model/permission.py:108 rhodecode/model/permission.py:112
#: rhodecode/model/permission.py:116 rhodecode/model/permission.py:120
#: rhodecode/model/validation_schema/schemas/integration_schema.py:197
-#: rhodecode/templates/admin/integrations/list.html:101
+#: rhodecode/templates/admin/integrations/list.mako:101
msgid "Enabled"
msgstr ""
@@ -215,7 +359,7 @@ msgid "The url of the Jasig CAS REST ser
msgstr ""
#: rhodecode/authentication/plugins/auth_jasig_cas.py:65
-#: rhodecode/templates/admin/gists/show.html:21
+#: rhodecode/templates/admin/gists/show.mako:21
msgid "URL"
msgstr ""
@@ -248,10 +392,10 @@ msgid "Password to connect to LDAP"
msgstr ""
#: rhodecode/authentication/plugins/auth_ldap.py:101
-#: rhodecode/templates/login.html:49 rhodecode/templates/register.html:47
-#: rhodecode/templates/admin/my_account/my_account.html:30
-#: rhodecode/templates/admin/users/user_add.html:44
-#: rhodecode/templates/base/base.html:310
+#: rhodecode/templates/login.mako:49 rhodecode/templates/register.mako:47
+#: rhodecode/templates/admin/my_account/my_account.mako:30
+#: rhodecode/templates/admin/users/user_add.mako:44
+#: rhodecode/templates/base/base.mako:310
#: rhodecode/templates/debug_style/login.html:45
msgid "Password"
msgstr ""
@@ -364,13 +508,12 @@ msgstr ""
msgid "Rhodecode Token Auth"
msgstr ""
-#: rhodecode/controllers/changelog.py:90 rhodecode/controllers/compare.py:64
-#: rhodecode/controllers/pullrequests.py:306
+#: rhodecode/controllers/changelog.py:91 rhodecode/controllers/compare.py:64
+#: rhodecode/controllers/pullrequests.py:202
msgid "There are no commits yet"
msgstr ""
#: rhodecode/controllers/changeset.py:77
-#: rhodecode/templates/files/diff_2way.html:75
msgid "Show whitespace"
msgstr ""
@@ -379,7 +522,6 @@ msgid "Show whitespace for all diffs"
msgstr ""
#: rhodecode/controllers/changeset.py:84
-#: rhodecode/templates/files/diff_2way.html:74
msgid "Ignore whitespace"
msgstr ""
@@ -400,40 +542,40 @@ msgstr ""
msgid "No such commit exists for this repository"
msgstr ""
-#: rhodecode/controllers/changeset.py:334
-#: rhodecode/controllers/pullrequests.py:806
-#: rhodecode/model/pull_request.py:997
+#: rhodecode/controllers/changeset.py:344
+#: rhodecode/controllers/pullrequests.py:948
+#: rhodecode/model/pull_request.py:1009
#, python-format
msgid "Status change %(transition_icon)s %(status)s"
msgstr ""
-#: rhodecode/controllers/changeset.py:372
+#: rhodecode/controllers/changeset.py:389
msgid "Changing the status of a commit associated with a closed pull request is not allowed"
msgstr ""
-#: rhodecode/controllers/compare.py:88
+#: rhodecode/controllers/compare.py:89
msgid "Select commit"
msgstr ""
-#: rhodecode/controllers/compare.py:140
+#: rhodecode/controllers/compare.py:144
#, python-format
msgid "Could not find the original repo: %(repo)s"
msgstr ""
-#: rhodecode/controllers/compare.py:148
+#: rhodecode/controllers/compare.py:152
#, python-format
msgid "Could not find the other repo: %(repo)s"
msgstr ""
-#: rhodecode/controllers/compare.py:157
+#: rhodecode/controllers/compare.py:164
msgid "The comparison of two different kinds of remote repos is not available"
msgstr ""
-#: rhodecode/controllers/compare.py:191
+#: rhodecode/controllers/compare.py:202
msgid "Could not compare repos with different large file settings"
msgstr ""
-#: rhodecode/controllers/compare.py:227
+#: rhodecode/controllers/compare.py:242
#, python-format
msgid "Repositories unrelated. Cannot compare commit %(commit1)s from repository %(repo1)s with commit %(commit2)s from repository %(repo2)s."
msgstr ""
@@ -530,28 +672,18 @@ msgstr ""
msgid "Unknown archive type"
msgstr ""
-#: rhodecode/controllers/files.py:934
-#, python-format
-msgid "Commit %(commit)s does not exist."
-msgstr ""
-
-#: rhodecode/controllers/files.py:951
-#, python-format
-msgid "%(file_path)s has not changed between %(commit_1)s and %(commit_2)s."
-msgstr ""
-
-#: rhodecode/controllers/files.py:1018
+#: rhodecode/controllers/files.py:952
msgid "Changesets"
msgstr ""
-#: rhodecode/controllers/files.py:1039 rhodecode/controllers/summary.py:269
-#: rhodecode/model/pull_request.py:1222 rhodecode/model/scm.py:782
-#: rhodecode/templates/base/vcs_settings.html:193
+#: rhodecode/controllers/files.py:973 rhodecode/controllers/summary.py:269
+#: rhodecode/model/pull_request.py:1234 rhodecode/model/scm.py:782
+#: rhodecode/templates/base/vcs_settings.mako:193
msgid "Branches"
msgstr ""
-#: rhodecode/controllers/files.py:1043 rhodecode/model/scm.py:797
-#: rhodecode/templates/base/vcs_settings.html:218
+#: rhodecode/controllers/files.py:977 rhodecode/model/scm.py:797
+#: rhodecode/templates/base/vcs_settings.mako:218
msgid "Tags"
msgstr ""
@@ -565,13 +697,13 @@ msgid "Groups"
msgstr ""
#: rhodecode/controllers/home.py:212 rhodecode/controllers/home.py:247
-#: rhodecode/controllers/pullrequests.py:412
-#: rhodecode/templates/admin/repo_groups/repo_group_edit_perms.html:128
-#: rhodecode/templates/admin/repos/repo_add.html:15
-#: rhodecode/templates/admin/repos/repo_add.html:19
-#: rhodecode/templates/admin/users/user_edit_advanced.html:11
-#: rhodecode/templates/base/base.html:73 rhodecode/templates/base/base.html:145
-#: rhodecode/templates/base/base.html:627
+#: rhodecode/controllers/pullrequests.py:308
+#: rhodecode/templates/admin/repo_groups/repo_group_edit_perms.mako:128
+#: rhodecode/templates/admin/repos/repo_add.mako:15
+#: rhodecode/templates/admin/repos/repo_add.mako:19
+#: rhodecode/templates/admin/users/user_edit_advanced.mako:11
+#: rhodecode/templates/base/base.mako:73 rhodecode/templates/base/base.mako:145
+#: rhodecode/templates/base/base.mako:569
msgid "Repositories"
msgstr ""
@@ -588,68 +720,60 @@ msgstr ""
msgid "journal"
msgstr ""
-#: rhodecode/controllers/pullrequests.py:320
+#: rhodecode/controllers/pullrequests.py:216
msgid "Commit does not exist"
msgstr ""
-#: rhodecode/controllers/pullrequests.py:437
+#: rhodecode/controllers/pullrequests.py:333
msgid "Pull request requires a title with min. 3 chars"
msgstr ""
-#: rhodecode/controllers/pullrequests.py:439
+#: rhodecode/controllers/pullrequests.py:335
msgid "Error creating pull request: {}"
msgstr ""
-#: rhodecode/controllers/pullrequests.py:487
+#: rhodecode/controllers/pullrequests.py:383
msgid "Successfully opened new pull request"
msgstr ""
-#: rhodecode/controllers/pullrequests.py:490
+#: rhodecode/controllers/pullrequests.py:386
msgid "Error occurred during sending pull request"
msgstr ""
-#: rhodecode/controllers/pullrequests.py:533
+#: rhodecode/controllers/pullrequests.py:429
msgid "Cannot update closed pull requests."
msgstr ""
-#: rhodecode/controllers/pullrequests.py:539
+#: rhodecode/controllers/pullrequests.py:435
msgid "Pull request title & description updated."
msgstr ""
-#: rhodecode/controllers/pullrequests.py:547
+#: rhodecode/controllers/pullrequests.py:443
msgid "Pull request updated to \"{source_commit_id}\" with {count_added} added, {count_removed} removed commits."
msgstr ""
-#: rhodecode/controllers/pullrequests.py:562
+#: rhodecode/controllers/pullrequests.py:458
msgid "Reload page"
msgstr ""
-#: rhodecode/controllers/pullrequests.py:634
-msgid "Pull request reviewer approval is pending."
-msgstr ""
-
-#: rhodecode/controllers/pullrequests.py:648
+#: rhodecode/controllers/pullrequests.py:532
msgid "Pull request was successfully merged and closed."
msgstr ""
-#: rhodecode/controllers/pullrequests.py:685
+#: rhodecode/controllers/pullrequests.py:569
msgid "Successfully deleted pull request"
msgstr ""
-#: rhodecode/controllers/pullrequests.py:725
-msgid "Reviewer approval is pending."
-msgstr ""
-
-#: rhodecode/controllers/pullrequests.py:766
+#: rhodecode/controllers/pullrequests.py:864
msgid "Close Pull Request"
msgstr ""
-#: rhodecode/controllers/pullrequests.py:810
-#: rhodecode/model/pull_request.py:1001
+#: rhodecode/controllers/pullrequests.py:952
+#: rhodecode/model/pull_request.py:1013
msgid "Closing with"
msgstr ""
-#: rhodecode/controllers/pullrequests.py:860
+#: rhodecode/controllers/pullrequests.py:1002
#, python-format
msgid "Closing pull request on other statuses than rejected or approved is forbidden. Calculated status from all reviewers is currently: %s"
msgstr ""
@@ -679,37 +803,37 @@ msgid "Error occurred during update of d
msgstr ""
#: rhodecode/controllers/admin/gists.py:62
-#: rhodecode/controllers/admin/my_account.py:378
+#: rhodecode/controllers/admin/my_account.py:384
#: rhodecode/controllers/admin/users.py:465
msgid "forever"
msgstr ""
#: rhodecode/controllers/admin/gists.py:63
-#: rhodecode/controllers/admin/my_account.py:379
+#: rhodecode/controllers/admin/my_account.py:385
#: rhodecode/controllers/admin/users.py:466
msgid "5 minutes"
msgstr ""
#: rhodecode/controllers/admin/gists.py:64
-#: rhodecode/controllers/admin/my_account.py:380
+#: rhodecode/controllers/admin/my_account.py:386
#: rhodecode/controllers/admin/users.py:467
msgid "1 hour"
msgstr ""
#: rhodecode/controllers/admin/gists.py:65
-#: rhodecode/controllers/admin/my_account.py:381
+#: rhodecode/controllers/admin/my_account.py:387
#: rhodecode/controllers/admin/users.py:468
msgid "1 day"
msgstr ""
#: rhodecode/controllers/admin/gists.py:66
-#: rhodecode/controllers/admin/my_account.py:382
+#: rhodecode/controllers/admin/my_account.py:388
#: rhodecode/controllers/admin/users.py:469
msgid "1 month"
msgstr ""
#: rhodecode/controllers/admin/gists.py:70
-#: rhodecode/controllers/admin/my_account.py:384
+#: rhodecode/controllers/admin/my_account.py:390
#: rhodecode/controllers/admin/users.py:471
msgid "Lifetime"
msgstr ""
@@ -748,76 +872,76 @@ msgstr ""
msgid "Error occurred during update of gist %s"
msgstr ""
-#: rhodecode/controllers/admin/gists.py:341
-#: rhodecode/templates/admin/gists/show.html:67
-#: rhodecode/templates/admin/my_account/my_account_auth_tokens.html:19
-#: rhodecode/templates/admin/my_account/my_account_auth_tokens.html:42
-#: rhodecode/templates/admin/users/user_edit_auth_tokens.html:16
-#: rhodecode/templates/admin/users/user_edit_auth_tokens.html:38
-#: rhodecode/templates/data_table/_dt_elements.html:263
+#: rhodecode/controllers/admin/gists.py:343
+#: rhodecode/templates/admin/gists/show.mako:67
+#: rhodecode/templates/admin/my_account/my_account_auth_tokens.mako:23
+#: rhodecode/templates/admin/my_account/my_account_auth_tokens.mako:46
+#: rhodecode/templates/admin/users/user_edit_auth_tokens.mako:20
+#: rhodecode/templates/admin/users/user_edit_auth_tokens.mako:42
+#: rhodecode/templates/data_table/_dt_elements.mako:263
msgid "never"
msgstr ""
-#: rhodecode/controllers/admin/gists.py:346
+#: rhodecode/controllers/admin/gists.py:350
#, python-format
msgid "%(expiry)s - current value"
msgstr ""
-#: rhodecode/controllers/admin/my_account.py:75
+#: rhodecode/controllers/admin/my_account.py:80
msgid "You can't edit this user since it's crucial for entire application"
msgstr ""
-#: rhodecode/controllers/admin/my_account.py:133
+#: rhodecode/controllers/admin/my_account.py:140
msgid "Your account was updated successfully"
msgstr ""
-#: rhodecode/controllers/admin/my_account.py:148
+#: rhodecode/controllers/admin/my_account.py:155
#: rhodecode/controllers/admin/users.py:231
#, python-format
msgid "Error occurred during update of user %s"
msgstr ""
-#: rhodecode/controllers/admin/my_account.py:214
-#: rhodecode/controllers/admin/my_account.py:220
+#: rhodecode/controllers/admin/my_account.py:221
+#: rhodecode/controllers/admin/my_account.py:227
msgid "Error occurred during update of user password"
msgstr ""
-#: rhodecode/controllers/admin/my_account.py:227
+#: rhodecode/controllers/admin/my_account.py:234
msgid "Successfully updated password"
msgstr ""
-#: rhodecode/controllers/admin/my_account.py:272
+#: rhodecode/controllers/admin/my_account.py:278
#: rhodecode/controllers/admin/users.py:645
#, python-format
msgid "Added new email address `%s` for user account"
msgstr ""
-#: rhodecode/controllers/admin/my_account.py:279
+#: rhodecode/controllers/admin/my_account.py:285
#: rhodecode/controllers/admin/users.py:652
msgid "An error occurred during email saving"
msgstr ""
-#: rhodecode/controllers/admin/my_account.py:289
+#: rhodecode/controllers/admin/my_account.py:295
#: rhodecode/controllers/admin/users.py:667
msgid "Removed email address from user account"
msgstr ""
-#: rhodecode/controllers/admin/my_account.py:387
+#: rhodecode/controllers/admin/my_account.py:393
#: rhodecode/controllers/admin/users.py:474
msgid "Role"
msgstr ""
-#: rhodecode/controllers/admin/my_account.py:400
+#: rhodecode/controllers/admin/my_account.py:406
#: rhodecode/controllers/admin/users.py:498
msgid "Auth token successfully created"
msgstr ""
-#: rhodecode/controllers/admin/my_account.py:413
+#: rhodecode/controllers/admin/my_account.py:419
#: rhodecode/controllers/admin/users.py:517
msgid "Auth token successfully reset"
msgstr ""
-#: rhodecode/controllers/admin/my_account.py:417
+#: rhodecode/controllers/admin/my_account.py:423
#: rhodecode/controllers/admin/users.py:521
msgid "Auth token successfully deleted"
msgstr ""
@@ -903,344 +1027,211 @@ msgstr ""
msgid "Error creating repository %s"
msgstr ""
-#: rhodecode/controllers/admin/repos.py:264
+#: rhodecode/controllers/admin/repos.py:274
#, python-format
msgid "Created repository %s from %s"
msgstr ""
-#: rhodecode/controllers/admin/repos.py:273
+#: rhodecode/controllers/admin/repos.py:283
#, python-format
msgid "Forked repository %s as %s"
msgstr ""
-#: rhodecode/controllers/admin/repos.py:276
+#: rhodecode/controllers/admin/repos.py:286
#, python-format
msgid "Created repository %s"
msgstr ""
-#: rhodecode/controllers/admin/repos.py:317
+#: rhodecode/controllers/admin/repos.py:327
#, python-format
msgid "Repository %s updated successfully"
msgstr ""
-#: rhodecode/controllers/admin/repos.py:336
+#: rhodecode/controllers/admin/repos.py:346
#, python-format
msgid "Error occurred during update of repository %s"
msgstr ""
-#: rhodecode/controllers/admin/repos.py:364
+#: rhodecode/controllers/admin/repos.py:374
#, python-format
msgid "Detached %s forks"
msgstr ""
-#: rhodecode/controllers/admin/repos.py:367
+#: rhodecode/controllers/admin/repos.py:377
#, python-format
msgid "Deleted %s forks"
msgstr ""
-#: rhodecode/controllers/admin/repos.py:372
+#: rhodecode/controllers/admin/repos.py:382
#, python-format
msgid "Deleted repository %s"
msgstr ""
-#: rhodecode/controllers/admin/repos.py:375
+#: rhodecode/controllers/admin/repos.py:385
#, python-format
msgid "Cannot delete %s it still contains attached forks"
msgstr ""
-#: rhodecode/controllers/admin/repos.py:380
+#: rhodecode/controllers/admin/repos.py:390
#, python-format
msgid "An error occurred during deletion of %s"
msgstr ""
-#: rhodecode/controllers/admin/repos.py:433
+#: rhodecode/controllers/admin/repos.py:443
msgid "Repository permissions updated"
msgstr ""
-#: rhodecode/controllers/admin/repos.py:464
+#: rhodecode/controllers/admin/repos.py:474
msgid "An error occurred during creation of field"
msgstr ""
-#: rhodecode/controllers/admin/repos.py:479
+#: rhodecode/controllers/admin/repos.py:489
msgid "An error occurred during removal of field"
msgstr ""
-#: rhodecode/controllers/admin/repos.py:518
+#: rhodecode/controllers/admin/repos.py:528
msgid "Updated repository visibility in public journal"
msgstr ""
-#: rhodecode/controllers/admin/repos.py:522
+#: rhodecode/controllers/admin/repos.py:532
msgid "An error occurred during setting this repository in public journal"
msgstr ""
-#: rhodecode/controllers/admin/repos.py:546
+#: rhodecode/controllers/admin/repos.py:556
msgid "Nothing"
msgstr ""
-#: rhodecode/controllers/admin/repos.py:548
+#: rhodecode/controllers/admin/repos.py:558
#, python-format
msgid "Marked repo %s as fork of %s"
msgstr ""
-#: rhodecode/controllers/admin/repos.py:555
+#: rhodecode/controllers/admin/repos.py:565
msgid "An error occurred during this operation"
msgstr ""
-#: rhodecode/controllers/admin/repos.py:573
+#: rhodecode/controllers/admin/repos.py:583
msgid "Locked repository"
msgstr ""
-#: rhodecode/controllers/admin/repos.py:576
+#: rhodecode/controllers/admin/repos.py:586
msgid "Unlocked repository"
msgstr ""
-#: rhodecode/controllers/admin/repos.py:579
-#: rhodecode/controllers/admin/repos.py:608
+#: rhodecode/controllers/admin/repos.py:589
+#: rhodecode/controllers/admin/repos.py:618
msgid "An error occurred during unlocking"
msgstr ""
-#: rhodecode/controllers/admin/repos.py:598
+#: rhodecode/controllers/admin/repos.py:608
msgid "Unlocked"
msgstr ""
-#: rhodecode/controllers/admin/repos.py:602
+#: rhodecode/controllers/admin/repos.py:612
msgid "Locked"
msgstr ""
-#: rhodecode/controllers/admin/repos.py:604
+#: rhodecode/controllers/admin/repos.py:614
#, python-format
msgid "Repository has been %s"
msgstr ""
-#: rhodecode/controllers/admin/repos.py:619
+#: rhodecode/controllers/admin/repos.py:629
msgid "Cache invalidation successful"
msgstr ""
-#: rhodecode/controllers/admin/repos.py:623
+#: rhodecode/controllers/admin/repos.py:633
msgid "An error occurred during cache invalidation"
msgstr ""
-#: rhodecode/controllers/admin/repos.py:643
+#: rhodecode/controllers/admin/repos.py:653
msgid "Pulled from remote location"
msgstr ""
-#: rhodecode/controllers/admin/repos.py:646
+#: rhodecode/controllers/admin/repos.py:656
msgid "An error occurred during pull from remote location"
msgstr ""
-#: rhodecode/controllers/admin/repos.py:668
+#: rhodecode/controllers/admin/repos.py:678
msgid "An error occurred during deletion of repository stats"
msgstr ""
-#: rhodecode/controllers/admin/repos.py:715
+#: rhodecode/controllers/admin/repos.py:725
msgid "Error occurred during deleting issue tracker entry"
msgstr ""
-#: rhodecode/controllers/admin/repos.py:718
-#: rhodecode/controllers/admin/settings.py:383
+#: rhodecode/controllers/admin/repos.py:728
+#: rhodecode/controllers/admin/settings.py:380
msgid "Removed issue tracker entry"
msgstr ""
-#: rhodecode/controllers/admin/repos.py:748
-#: rhodecode/controllers/admin/settings.py:430
+#: rhodecode/controllers/admin/repos.py:758
+#: rhodecode/controllers/admin/settings.py:427
msgid "Updated issue tracker entries"
msgstr ""
-#: rhodecode/controllers/admin/repos.py:809
-#: rhodecode/controllers/admin/settings.py:150
-#: rhodecode/controllers/admin/settings.py:768
+#: rhodecode/controllers/admin/repos.py:819
+#: rhodecode/controllers/admin/settings.py:147
+#: rhodecode/controllers/admin/settings.py:618
msgid "Some form inputs contain invalid data."
msgstr ""
-#: rhodecode/controllers/admin/repos.py:827
+#: rhodecode/controllers/admin/repos.py:837
msgid "Error occurred during updating repository VCS settings"
msgstr ""
-#: rhodecode/controllers/admin/repos.py:831
-#: rhodecode/controllers/admin/settings.py:178
+#: rhodecode/controllers/admin/repos.py:841
+#: rhodecode/controllers/admin/settings.py:175
msgid "Updated VCS settings"
msgstr ""
-#: rhodecode/controllers/admin/settings.py:174
-#: rhodecode/controllers/admin/settings.py:285
+#: rhodecode/controllers/admin/settings.py:171
+#: rhodecode/controllers/admin/settings.py:282
msgid "Error occurred during updating application settings"
msgstr ""
-#: rhodecode/controllers/admin/settings.py:225
+#: rhodecode/controllers/admin/settings.py:222
#, python-format
msgid "Repositories successfully rescanned added: %s ; removed: %s"
msgstr ""
-#: rhodecode/controllers/admin/settings.py:281
+#: rhodecode/controllers/admin/settings.py:278
msgid "Updated application settings"
msgstr ""
+#: rhodecode/controllers/admin/settings.py:344
+msgid "Updated visualisation settings"
+msgstr ""
+
#: rhodecode/controllers/admin/settings.py:347
-msgid "Updated visualisation settings"
-msgstr ""
-
-#: rhodecode/controllers/admin/settings.py:350
msgid "Error occurred during updating visualisation settings"
msgstr ""
-#: rhodecode/controllers/admin/settings.py:443
+#: rhodecode/controllers/admin/settings.py:440
msgid "Please enter email address"
msgstr ""
-#: rhodecode/controllers/admin/settings.py:461
+#: rhodecode/controllers/admin/settings.py:458
msgid "Send email task created"
msgstr ""
-#: rhodecode/controllers/admin/settings.py:494
+#: rhodecode/controllers/admin/settings.py:491
msgid "Added new hook"
msgstr ""
-#: rhodecode/controllers/admin/settings.py:509
+#: rhodecode/controllers/admin/settings.py:506
msgid "Updated hooks"
msgstr ""
-#: rhodecode/controllers/admin/settings.py:513
+#: rhodecode/controllers/admin/settings.py:510
msgid "Error occurred during hook creation"
msgstr ""
-#: rhodecode/controllers/admin/settings.py:573
-msgid "Update info"
-msgstr ""
-
-#: rhodecode/controllers/admin/settings.py:575
-msgid "Check for updates"
-msgstr ""
-
-#: rhodecode/controllers/admin/settings.py:576
-#, python-format
-msgid "Note: please make sure this server can access `%s` for the update link to work"
-msgstr ""
-
-#: rhodecode/controllers/admin/settings.py:580
-msgid "RhodeCode Version"
-msgstr ""
-
-#: rhodecode/controllers/admin/settings.py:581
-msgid "RhodeCode Server IP"
-msgstr ""
-
-#: rhodecode/controllers/admin/settings.py:582
-msgid "RhodeCode Server ID"
-msgstr ""
-
-#: rhodecode/controllers/admin/settings.py:583
-msgid "RhodeCode Configuration"
-msgstr ""
-
-#: rhodecode/controllers/admin/settings.py:587
-msgid "Database"
-msgstr ""
-
-#: rhodecode/controllers/admin/settings.py:588
-msgid "Database version"
-msgstr ""
-
-#: rhodecode/controllers/admin/settings.py:592
-msgid "Platform"
-msgstr ""
-
-#: rhodecode/controllers/admin/settings.py:593
-msgid "Platform UUID"
-msgstr ""
-
-#: rhodecode/controllers/admin/settings.py:594
-msgid "Python version"
-msgstr ""
-
-#: rhodecode/controllers/admin/settings.py:595
-msgid "Python path"
-msgstr ""
-
-#: rhodecode/controllers/admin/settings.py:599
-msgid "CPU"
-msgstr ""
-
-#: rhodecode/controllers/admin/settings.py:600
-msgid "Load"
-msgstr ""
-
-#: rhodecode/controllers/admin/settings.py:601
-msgid "Memory"
-msgstr ""
-
-#: rhodecode/controllers/admin/settings.py:602
-msgid "Uptime"
-msgstr ""
-
-#: rhodecode/controllers/admin/settings.py:606
-msgid "Storage location"
-msgstr ""
-
-#: rhodecode/controllers/admin/settings.py:607
-msgid "Storage info"
-msgstr ""
-
-#: rhodecode/controllers/admin/settings.py:608
-msgid "Storage inodes"
-msgstr ""
-
-#: rhodecode/controllers/admin/settings.py:610
-msgid "Gist storage location"
-msgstr ""
-
-#: rhodecode/controllers/admin/settings.py:611
-msgid "Gist storage info"
-msgstr ""
-
-#: rhodecode/controllers/admin/settings.py:613
-msgid "Archive cache storage location"
-msgstr ""
-
-#: rhodecode/controllers/admin/settings.py:614
-msgid "Archive cache info"
-msgstr ""
-
-#: rhodecode/controllers/admin/settings.py:616
-msgid "Temp storage location"
-msgstr ""
-
-#: rhodecode/controllers/admin/settings.py:617
-msgid "Temp storage info"
-msgstr ""
-
-#: rhodecode/controllers/admin/settings.py:619
-msgid "Search info"
-msgstr ""
-
-#: rhodecode/controllers/admin/settings.py:620
-msgid "Search location"
-msgstr ""
-
-#: rhodecode/controllers/admin/settings.py:624
-msgid "VCS Backends"
-msgstr ""
-
-#: rhodecode/controllers/admin/settings.py:625
-msgid "VCS Server"
-msgstr ""
-
-#: rhodecode/controllers/admin/settings.py:626
-msgid "GIT"
-msgstr ""
-
-#: rhodecode/controllers/admin/settings.py:627
-msgid "HG"
-msgstr ""
-
-#: rhodecode/controllers/admin/settings.py:628
-msgid "SVN"
-msgstr ""
-
-#: rhodecode/controllers/admin/settings.py:789
+#: rhodecode/controllers/admin/settings.py:639
msgid "Error occurred during updating labs settings"
msgstr ""
-#: rhodecode/controllers/admin/settings.py:794
+#: rhodecode/controllers/admin/settings.py:644
msgid "Updated Labs settings"
msgstr ""
@@ -1494,61 +1485,62 @@ msgstr ""
msgid "user pre update"
msgstr ""
-#: rhodecode/forms/__init__.py:32 rhodecode/templates/admin/gists/new.html:62
-#: rhodecode/templates/admin/my_account/my_account_auth_tokens.html:27
-#: rhodecode/templates/admin/my_account/my_account_auth_tokens.html:84
-#: rhodecode/templates/admin/my_account/my_account_emails.html:65
-#: rhodecode/templates/admin/my_account/my_account_profile_edit.html:104
-#: rhodecode/templates/admin/permissions/permissions_application.html:60
-#: rhodecode/templates/admin/permissions/permissions_ips.html:61
-#: rhodecode/templates/admin/permissions/permissions_objects.html:57
-#: rhodecode/templates/admin/repo_groups/repo_group_edit_perms.html:136
-#: rhodecode/templates/admin/repo_groups/repo_group_edit_settings.html:68
-#: rhodecode/templates/admin/repos/repo_edit_fields.html:66
-#: rhodecode/templates/admin/repos/repo_edit_issuetracker.html:80
-#: rhodecode/templates/admin/repos/repo_edit_permissions.html:111
-#: rhodecode/templates/admin/repos/repo_edit_settings.html:161
-#: rhodecode/templates/admin/repos/repo_edit_vcs.html:46
-#: rhodecode/templates/admin/settings/settings_global.html:140
-#: rhodecode/templates/admin/settings/settings_issuetracker.html:16
-#: rhodecode/templates/admin/settings/settings_labs.html:49
-#: rhodecode/templates/admin/settings/settings_vcs.html:14
-#: rhodecode/templates/admin/settings/settings_visual.html:222
-#: rhodecode/templates/admin/user_groups/user_group_edit_perms.html:121
-#: rhodecode/templates/admin/users/user_edit_auth_tokens.html:23
-#: rhodecode/templates/admin/users/user_edit_auth_tokens.html:81
-#: rhodecode/templates/admin/users/user_edit_emails.html:63
-#: rhodecode/templates/admin/users/user_edit_ips.html:70
-#: rhodecode/templates/admin/users/user_edit_profile.html:135
-#: rhodecode/templates/base/default_perms_box.html:89
+#: rhodecode/forms/__init__.py:32 rhodecode/templates/admin/gists/new.mako:62
+#: rhodecode/templates/admin/my_account/my_account_auth_tokens.mako:31
+#: rhodecode/templates/admin/my_account/my_account_auth_tokens.mako:88
+#: rhodecode/templates/admin/my_account/my_account_emails.mako:65
+#: rhodecode/templates/admin/my_account/my_account_profile_edit.mako:107
+#: rhodecode/templates/admin/permissions/permissions_application.mako:60
+#: rhodecode/templates/admin/permissions/permissions_ips.mako:61
+#: rhodecode/templates/admin/permissions/permissions_objects.mako:57
+#: rhodecode/templates/admin/repo_groups/repo_group_edit_perms.mako:136
+#: rhodecode/templates/admin/repo_groups/repo_group_edit_settings.mako:68
+#: rhodecode/templates/admin/repos/repo_edit_fields.mako:66
+#: rhodecode/templates/admin/repos/repo_edit_issuetracker.mako:80
+#: rhodecode/templates/admin/repos/repo_edit_permissions.mako:111
+#: rhodecode/templates/admin/repos/repo_edit_settings.mako:161
+#: rhodecode/templates/admin/repos/repo_edit_vcs.mako:46
+#: rhodecode/templates/admin/settings/settings_global.mako:140
+#: rhodecode/templates/admin/settings/settings_issuetracker.mako:16
+#: rhodecode/templates/admin/settings/settings_labs.mako:49
+#: rhodecode/templates/admin/settings/settings_vcs.mako:14
+#: rhodecode/templates/admin/settings/settings_visual.mako:222
+#: rhodecode/templates/admin/user_groups/user_group_edit_perms.mako:121
+#: rhodecode/templates/admin/users/user_edit_auth_tokens.mako:27
+#: rhodecode/templates/admin/users/user_edit_auth_tokens.mako:85
+#: rhodecode/templates/admin/users/user_edit_emails.mako:63
+#: rhodecode/templates/admin/users/user_edit_ips.mako:70
+#: rhodecode/templates/admin/users/user_edit_profile.mako:135
+#: rhodecode/templates/base/default_perms_box.mako:89
msgid "Reset"
msgstr ""
-#: rhodecode/forms/__init__.py:33 rhodecode/templates/admin/gists/show.html:49
-#: rhodecode/templates/admin/integrations/list.html:211
-#: rhodecode/templates/admin/my_account/my_account_auth_tokens.html:56
-#: rhodecode/templates/admin/my_account/my_account_emails.html:32
-#: rhodecode/templates/admin/permissions/permissions_ips.html:26
-#: rhodecode/templates/admin/repos/repo_edit_fields.html:25
-#: rhodecode/templates/admin/settings/settings_hooks.html:46
-#: rhodecode/templates/admin/users/user_edit_auth_tokens.html:52
-#: rhodecode/templates/admin/users/user_edit_emails.html:31
-#: rhodecode/templates/admin/users/user_edit_ips.html:34
-#: rhodecode/templates/base/issue_tracker_settings.html:70
-#: rhodecode/templates/base/vcs_settings.html:202
-#: rhodecode/templates/base/vcs_settings.html:227
-#: rhodecode/templates/changeset/changeset_file_comment.html:57
-#: rhodecode/templates/changeset/changeset_file_comment.html:97
-#: rhodecode/templates/data_table/_dt_elements.html:123
-#: rhodecode/templates/data_table/_dt_elements.html:184
-#: rhodecode/templates/data_table/_dt_elements.html:198
-#: rhodecode/templates/data_table/_dt_elements.html:210
+#: rhodecode/forms/__init__.py:33 rhodecode/templates/admin/gists/show.mako:49
+#: rhodecode/templates/admin/integrations/list.mako:211
+#: rhodecode/templates/admin/my_account/my_account_auth_tokens.mako:60
+#: rhodecode/templates/admin/my_account/my_account_emails.mako:32
+#: rhodecode/templates/admin/permissions/permissions_ips.mako:26
+#: rhodecode/templates/admin/repos/repo_edit_fields.mako:25
+#: rhodecode/templates/admin/settings/settings_hooks.mako:46
+#: rhodecode/templates/admin/users/user_edit_auth_tokens.mako:56
+#: rhodecode/templates/admin/users/user_edit_emails.mako:31
+#: rhodecode/templates/admin/users/user_edit_ips.mako:34
+#: rhodecode/templates/base/issue_tracker_settings.mako:70
+#: rhodecode/templates/base/vcs_settings.mako:202
+#: rhodecode/templates/base/vcs_settings.mako:227
+#: rhodecode/templates/changeset/changeset_file_comment.mako:137
+#: rhodecode/templates/changeset/changeset_file_comment.mako:139
+#: rhodecode/templates/changeset/changeset_file_comment.mako:142
+#: rhodecode/templates/data_table/_dt_elements.mako:123
+#: rhodecode/templates/data_table/_dt_elements.mako:184
+#: rhodecode/templates/data_table/_dt_elements.mako:198
+#: rhodecode/templates/data_table/_dt_elements.mako:210
#: rhodecode/templates/debug_style/buttons.html:132
-#: rhodecode/templates/files/files_source.html:35
-#: rhodecode/templates/files/files_source.html:39
-#: rhodecode/templates/files/files_source.html:42
-#: rhodecode/templates/pullrequests/pullrequest_show.html:53
-#: rhodecode/templates/pullrequests/pullrequest_show.html:57
+#: rhodecode/templates/files/files_source.mako:35
+#: rhodecode/templates/files/files_source.mako:39
+#: rhodecode/templates/files/files_source.mako:42
+#: rhodecode/templates/pullrequests/pullrequest_show.mako:56
+#: rhodecode/templates/pullrequests/pullrequest_show.mako:60
msgid "Delete"
msgstr ""
@@ -1583,27 +1575,27 @@ msgstr ""
msgid "Root repositories only"
msgstr ""
-#: rhodecode/integrations/views.py:162
+#: rhodecode/integrations/views.py:161
msgid "{repo_name} repository"
msgstr ""
-#: rhodecode/integrations/views.py:165
+#: rhodecode/integrations/views.py:164
msgid "{repo_group_name} repo group"
msgstr ""
-#: rhodecode/integrations/views.py:172
+#: rhodecode/integrations/views.py:171
msgid "{name} integration"
msgstr ""
-#: rhodecode/integrations/views.py:186
+#: rhodecode/integrations/views.py:185
msgid "Integration {integration_name} deleted successfully."
msgstr ""
-#: rhodecode/integrations/views.py:266
+#: rhodecode/integrations/views.py:265
msgid "Errors exist when saving integration settings. Please check the form inputs."
msgstr ""
-#: rhodecode/integrations/views.py:292
+#: rhodecode/integrations/views.py:290
msgid "Integration {integration_name} updated successfully."
msgstr ""
@@ -1684,20 +1676,20 @@ msgstr ""
msgid "This can be setup at the slack app manager"
msgstr ""
-#: rhodecode/integrations/types/slack.py:58 rhodecode/templates/login.html:42
-#: rhodecode/templates/register.html:40
-#: rhodecode/templates/admin/admin_log.html:7
-#: rhodecode/templates/admin/my_account/my_account_profile.html:24
-#: rhodecode/templates/admin/my_account/my_account_profile_edit.html:21
-#: rhodecode/templates/admin/my_account/my_account_profile_edit.html:66
-#: rhodecode/templates/admin/user_groups/user_group_edit_settings.html:70
-#: rhodecode/templates/admin/users/user_add.html:35
-#: rhodecode/templates/admin/users/user_edit_profile.html:39
-#: rhodecode/templates/admin/users/users.html:90
-#: rhodecode/templates/base/base.html:301
+#: rhodecode/integrations/types/slack.py:58 rhodecode/templates/login.mako:42
+#: rhodecode/templates/register.mako:40
+#: rhodecode/templates/admin/admin_log.mako:7
+#: rhodecode/templates/admin/my_account/my_account_profile.mako:24
+#: rhodecode/templates/admin/my_account/my_account_profile_edit.mako:24
+#: rhodecode/templates/admin/my_account/my_account_profile_edit.mako:69
+#: rhodecode/templates/admin/user_groups/user_group_edit_settings.mako:70
+#: rhodecode/templates/admin/users/user_add.mako:35
+#: rhodecode/templates/admin/users/user_edit_profile.mako:39
+#: rhodecode/templates/admin/users/users.mako:90
+#: rhodecode/templates/base/base.mako:301
#: rhodecode/templates/debug_style/login.html:36
#: rhodecode/templates/email_templates/user_registration.mako:23
-#: rhodecode/templates/users/user_profile.html:27
+#: rhodecode/templates/users/user_profile.mako:27
msgid "Username"
msgstr ""
@@ -1745,11 +1737,19 @@ msgstr ""
msgid "String used to validate received payloads."
msgstr ""
-#: rhodecode/integrations/types/webhook.py:180
+#: rhodecode/integrations/types/webhook.py:178
+msgid "Call Method"
+msgstr ""
+
+#: rhodecode/integrations/types/webhook.py:179
+msgid "Select if the webhook call should be made with POST or GET."
+msgstr ""
+
+#: rhodecode/integrations/types/webhook.py:192
msgid "Webhook"
msgstr ""
-#: rhodecode/integrations/types/webhook.py:181
+#: rhodecode/integrations/types/webhook.py:193
msgid "Post json events to a webhook endpoint"
msgstr ""
@@ -1843,7 +1843,7 @@ msgid "fork name %s"
msgstr ""
#: rhodecode/lib/action_parser.py:183
-#: rhodecode/templates/pullrequests/pullrequest_show.html:48
+#: rhodecode/templates/pullrequests/pullrequest_show.mako:51
#, python-format
msgid "Pull request #%s"
msgstr ""
@@ -1876,25 +1876,25 @@ msgstr ""
msgid "Commit not found"
msgstr ""
-#: rhodecode/lib/auth.py:1188
+#: rhodecode/lib/auth.py:1189
#, python-format
msgid "IP %s not allowed"
msgstr ""
-#: rhodecode/lib/auth.py:1262
+#: rhodecode/lib/auth.py:1263
msgid "You need to be a registered user to perform this action"
msgstr ""
-#: rhodecode/lib/auth.py:1310
+#: rhodecode/lib/auth.py:1311
#, python-format
msgid "Action not supported for %s."
msgstr ""
-#: rhodecode/lib/auth.py:1347
+#: rhodecode/lib/auth.py:1348
msgid "You need to be signed in to view this page"
msgstr ""
-#: rhodecode/lib/base.py:564
+#: rhodecode/lib/base.py:557
#, python-format
msgid "The repository at %(repo_name)s cannot be located."
msgstr ""
@@ -1915,7 +1915,7 @@ msgstr ""
msgid "No changes detected"
msgstr ""
-#: rhodecode/lib/diffs.py:918
+#: rhodecode/lib/diffs.py:921
msgid "Click to select line"
msgstr ""
@@ -1972,87 +1972,42 @@ msgstr ""
msgid "%s repository is not mapped to db perhaps it was created or renamed from the filesystem please run the application again in order to rescan repositories"
msgstr ""
-#: rhodecode/lib/utils2.py:463
-#, python-format
-msgid "%d year"
-msgid_plural "%d years"
-msgstr[0] ""
-msgstr[1] ""
-
-#: rhodecode/lib/utils2.py:464
-#, python-format
-msgid "%d month"
-msgid_plural "%d months"
-msgstr[0] ""
-msgstr[1] ""
-
-#: rhodecode/lib/utils2.py:465
-#, python-format
-msgid "%d day"
-msgid_plural "%d days"
-msgstr[0] ""
-msgstr[1] ""
-
-#: rhodecode/lib/utils2.py:466
-#, python-format
-msgid "%d hour"
-msgid_plural "%d hours"
-msgstr[0] ""
-msgstr[1] ""
-
-#: rhodecode/lib/utils2.py:467
-#, python-format
-msgid "%d minute"
-msgid_plural "%d minutes"
-msgstr[0] ""
-msgstr[1] ""
-
-#: rhodecode/lib/utils2.py:468
-#, python-format
-msgid "%d second"
-msgid_plural "%d seconds"
-msgstr[0] ""
-msgstr[1] ""
-
#: rhodecode/lib/utils2.py:486
-#, python-format
-msgid "in %s"
+msgid "in ${ago}"
msgstr ""
#: rhodecode/lib/utils2.py:492
-#, python-format
-msgid "%s ago"
-msgstr ""
-
-#: rhodecode/lib/utils2.py:502
-#, python-format
-msgid "%s, %s ago"
-msgstr ""
-
-#: rhodecode/lib/utils2.py:504
-#, python-format
-msgid "in %s, %s"
-msgstr ""
-
-#: rhodecode/lib/utils2.py:506
-#, python-format
-msgid "%s and %s"
-msgstr ""
-
-#: rhodecode/lib/utils2.py:508
-#, python-format
-msgid "%s and %s ago"
-msgstr ""
-
-#: rhodecode/lib/utils2.py:510
-#, python-format
-msgid "in %s and %s"
-msgstr ""
-
-#: rhodecode/lib/utils2.py:514
+msgid "${ago} ago"
+msgstr ""
+
+#: rhodecode/lib/utils2.py:501
+msgid "${val}, ${detail}"
+msgstr ""
+
+#: rhodecode/lib/utils2.py:503
+msgid "${val}, ${detail} ago"
+msgstr ""
+
+#: rhodecode/lib/utils2.py:505
+msgid "in ${val}, ${detail}"
+msgstr ""
+
+#: rhodecode/lib/utils2.py:507
+msgid "${val} and ${detail}"
+msgstr ""
+
+#: rhodecode/lib/utils2.py:509
+msgid "${val} and ${detail} ago"
+msgstr ""
+
+#: rhodecode/lib/utils2.py:511
+msgid "in ${val} and ${detail}"
+msgstr ""
+
+#: rhodecode/lib/utils2.py:515
#: rhodecode/public/js/rhodecode-components.js:33194
#: rhodecode/public/js/scripts.js:25042
-#: rhodecode/public/js/rhodecode/i18n/js_translations.js:58
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:65
#: rhodecode/public/js/src/plugins/jquery.timeago-extension.js:174
msgid "just now"
msgstr ""
@@ -2084,7 +2039,7 @@ msgstr ""
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_0.py:2285
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_1.py:2285
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_2.py:2289
-#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2289 rhodecode/model/db.py:2292
+#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2289 rhodecode/model/db.py:2298
msgid "Repository no access"
msgstr ""
@@ -2115,7 +2070,7 @@ msgstr ""
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_0.py:2286
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_1.py:2286
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_2.py:2290
-#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2290 rhodecode/model/db.py:2293
+#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2290 rhodecode/model/db.py:2299
msgid "Repository read access"
msgstr ""
@@ -2146,7 +2101,7 @@ msgstr ""
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_0.py:2287
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_1.py:2287
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_2.py:2291
-#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2291 rhodecode/model/db.py:2294
+#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2291 rhodecode/model/db.py:2300
msgid "Repository write access"
msgstr ""
@@ -2177,7 +2132,7 @@ msgstr ""
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_0.py:2288
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_1.py:2288
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_2.py:2292
-#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2292 rhodecode/model/db.py:2295
+#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2292 rhodecode/model/db.py:2301
msgid "Repository admin access"
msgstr ""
@@ -2248,7 +2203,7 @@ msgstr ""
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_0.py:2306
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_1.py:2306
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_2.py:2310
-#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2310 rhodecode/model/db.py:2313
+#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2310 rhodecode/model/db.py:2319
msgid "Repository creation disabled"
msgstr ""
@@ -2279,7 +2234,7 @@ msgstr ""
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_0.py:2307
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_1.py:2307
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_2.py:2311
-#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2311 rhodecode/model/db.py:2314
+#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2311 rhodecode/model/db.py:2320
msgid "Repository creation enabled"
msgstr ""
@@ -2310,7 +2265,7 @@ msgstr ""
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_0.py:2311
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_1.py:2311
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_2.py:2315
-#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2315 rhodecode/model/db.py:2318
+#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2315 rhodecode/model/db.py:2324
msgid "Repository forking disabled"
msgstr ""
@@ -2341,7 +2296,7 @@ msgstr ""
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_0.py:2312
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_1.py:2312
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_2.py:2316
-#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2316 rhodecode/model/db.py:2319
+#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2316 rhodecode/model/db.py:2325
msgid "Repository forking enabled"
msgstr ""
@@ -2393,7 +2348,7 @@ msgstr ""
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_0.py:2946
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_1.py:2946
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_2.py:2950
-#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2950 rhodecode/model/db.py:2962
+#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2950 rhodecode/model/db.py:3009
msgid "Not Reviewed"
msgstr ""
@@ -2424,7 +2379,7 @@ msgstr ""
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_0.py:2947
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_1.py:2947
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_2.py:2951
-#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2951 rhodecode/model/db.py:2963
+#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2951 rhodecode/model/db.py:3010
msgid "Approved"
msgstr ""
@@ -2455,7 +2410,7 @@ msgstr ""
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_0.py:2948
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_1.py:2948
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_2.py:2952
-#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2952 rhodecode/model/db.py:2964
+#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2952 rhodecode/model/db.py:3011
msgid "Rejected"
msgstr ""
@@ -2486,7 +2441,7 @@ msgstr ""
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_0.py:2949
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_1.py:2949
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_2.py:2953
-#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2953 rhodecode/model/db.py:2965
+#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2953 rhodecode/model/db.py:3012
msgid "Under Review"
msgstr ""
@@ -2514,7 +2469,7 @@ msgstr ""
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_0.py:2290
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_1.py:2290
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_2.py:2294
-#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2294 rhodecode/model/db.py:2297
+#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2294 rhodecode/model/db.py:2303
msgid "Repository group no access"
msgstr ""
@@ -2542,7 +2497,7 @@ msgstr ""
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_0.py:2291
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_1.py:2291
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_2.py:2295
-#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2295 rhodecode/model/db.py:2298
+#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2295 rhodecode/model/db.py:2304
msgid "Repository group read access"
msgstr ""
@@ -2570,7 +2525,7 @@ msgstr ""
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_0.py:2292
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_1.py:2292
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_2.py:2296
-#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2296 rhodecode/model/db.py:2299
+#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2296 rhodecode/model/db.py:2305
msgid "Repository group write access"
msgstr ""
@@ -2598,7 +2553,7 @@ msgstr ""
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_0.py:2293
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_1.py:2293
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_2.py:2297
-#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2297 rhodecode/model/db.py:2300
+#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2297 rhodecode/model/db.py:2306
msgid "Repository group admin access"
msgstr ""
@@ -2625,7 +2580,7 @@ msgstr ""
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_0.py:2295
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_1.py:2295
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_2.py:2299
-#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2299 rhodecode/model/db.py:2302
+#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2299 rhodecode/model/db.py:2308
msgid "User group no access"
msgstr ""
@@ -2652,7 +2607,7 @@ msgstr ""
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_0.py:2296
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_1.py:2296
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_2.py:2300
-#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2300 rhodecode/model/db.py:2303
+#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2300 rhodecode/model/db.py:2309
msgid "User group read access"
msgstr ""
@@ -2679,7 +2634,7 @@ msgstr ""
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_0.py:2297
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_1.py:2297
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_2.py:2301
-#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2301 rhodecode/model/db.py:2304
+#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2301 rhodecode/model/db.py:2310
msgid "User group write access"
msgstr ""
@@ -2706,7 +2661,7 @@ msgstr ""
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_0.py:2298
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_1.py:2298
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_2.py:2302
-#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2302 rhodecode/model/db.py:2305
+#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2302 rhodecode/model/db.py:2311
msgid "User group admin access"
msgstr ""
@@ -2733,7 +2688,7 @@ msgstr ""
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_0.py:2300
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_1.py:2300
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_2.py:2304
-#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2304 rhodecode/model/db.py:2307
+#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2304 rhodecode/model/db.py:2313
msgid "Repository Group creation disabled"
msgstr ""
@@ -2760,7 +2715,7 @@ msgstr ""
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_0.py:2301
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_1.py:2301
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_2.py:2305
-#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2305 rhodecode/model/db.py:2308
+#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2305 rhodecode/model/db.py:2314
msgid "Repository Group creation enabled"
msgstr ""
@@ -2787,7 +2742,7 @@ msgstr ""
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_0.py:2303
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_1.py:2303
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_2.py:2307
-#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2307 rhodecode/model/db.py:2310
+#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2307 rhodecode/model/db.py:2316
msgid "User Group creation disabled"
msgstr ""
@@ -2814,7 +2769,7 @@ msgstr ""
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_0.py:2304
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_1.py:2304
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_2.py:2308
-#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2308 rhodecode/model/db.py:2311
+#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2308 rhodecode/model/db.py:2317
msgid "User Group creation enabled"
msgstr ""
@@ -2841,7 +2796,7 @@ msgstr ""
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_0.py:2314
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_1.py:2314
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_2.py:2318
-#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2318 rhodecode/model/db.py:2321
+#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2318 rhodecode/model/db.py:2327
msgid "Registration disabled"
msgstr ""
@@ -2868,7 +2823,7 @@ msgstr ""
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_0.py:2315
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_1.py:2315
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_2.py:2319
-#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2319 rhodecode/model/db.py:2322
+#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2319 rhodecode/model/db.py:2328
msgid "User Registration with manual account activation"
msgstr ""
@@ -2895,7 +2850,7 @@ msgstr ""
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_0.py:2316
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_1.py:2316
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_2.py:2320
-#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2320 rhodecode/model/db.py:2323
+#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2320 rhodecode/model/db.py:2329
msgid "User Registration with automatic account activation"
msgstr ""
@@ -2922,7 +2877,7 @@ msgstr ""
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_0.py:2318
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_1.py:2318
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_2.py:2322
-#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2322 rhodecode/model/db.py:2329
+#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2322 rhodecode/model/db.py:2335
#: rhodecode/model/permission.py:95
msgid "Manual activation of external account"
msgstr ""
@@ -2950,7 +2905,7 @@ msgstr ""
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_0.py:2319
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_1.py:2319
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_2.py:2323
-#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2323 rhodecode/model/db.py:2330
+#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2323 rhodecode/model/db.py:2336
#: rhodecode/model/permission.py:96
msgid "Automatic activation of external account"
msgstr ""
@@ -2972,7 +2927,7 @@ msgstr ""
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_0.py:2308
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_1.py:2308
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_2.py:2312
-#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2312 rhodecode/model/db.py:2315
+#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2312 rhodecode/model/db.py:2321
msgid "Repository creation enabled with write permission to a repository group"
msgstr ""
@@ -2993,7 +2948,7 @@ msgstr ""
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_0.py:2309
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_1.py:2309
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_2.py:2313
-#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2313 rhodecode/model/db.py:2316
+#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2313 rhodecode/model/db.py:2322
msgid "Repository creation disabled with write permission to a repository group"
msgstr ""
@@ -3011,7 +2966,7 @@ msgstr ""
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_0.py:2283
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_1.py:2283
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_2.py:2287
-#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2287 rhodecode/model/db.py:2290
+#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2287 rhodecode/model/db.py:2296
msgid "RhodeCode Super Administrator"
msgstr ""
@@ -3027,7 +2982,7 @@ msgstr ""
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_0.py:2321
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_1.py:2321
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_2.py:2325
-#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2325 rhodecode/model/db.py:2332
+#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2325 rhodecode/model/db.py:2338
msgid "Inherit object permissions from default user disabled"
msgstr ""
@@ -3043,7 +2998,7 @@ msgstr ""
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_0.py:2322
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_1.py:2322
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_2.py:2326
-#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2326 rhodecode/model/db.py:2333
+#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2326 rhodecode/model/db.py:2339
msgid "Inherit object permissions from default user enabled"
msgstr ""
@@ -3051,7 +3006,7 @@ msgstr ""
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_0.py:910
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_1.py:910
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_2.py:912
-#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:912 rhodecode/model/db.py:907
+#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:912 rhodecode/model/db.py:913
msgid "all"
msgstr ""
@@ -3059,7 +3014,7 @@ msgstr ""
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_0.py:911
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_1.py:911
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_2.py:913
-#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:913 rhodecode/model/db.py:908
+#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:913 rhodecode/model/db.py:914
msgid "http/web interface"
msgstr ""
@@ -3067,7 +3022,7 @@ msgstr ""
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_0.py:912
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_1.py:912
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_2.py:914
-#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:914 rhodecode/model/db.py:909
+#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:914 rhodecode/model/db.py:915
msgid "vcs (git/hg/svn protocol)"
msgstr ""
@@ -3075,7 +3030,7 @@ msgstr ""
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_0.py:913
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_1.py:913
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_2.py:915
-#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:915 rhodecode/model/db.py:910
+#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:915 rhodecode/model/db.py:916
msgid "api calls"
msgstr ""
@@ -3083,7 +3038,7 @@ msgstr ""
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_0.py:914
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_1.py:914
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_2.py:916
-#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:916 rhodecode/model/db.py:911
+#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:916 rhodecode/model/db.py:917
msgid "feed access"
msgstr ""
@@ -3091,7 +3046,7 @@ msgstr ""
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_0.py:2061
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_1.py:2061
#: rhodecode/lib/dbmigrate/schema/db_4_4_0_2.py:2065
-#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2065 rhodecode/model/db.py:2061
+#: rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py:2065 rhodecode/model/db.py:2067
msgid "No parent"
msgstr ""
@@ -3127,43 +3082,43 @@ msgstr ""
msgid "Commit index"
msgstr ""
-#: rhodecode/login/views.py:246 rhodecode/login/views.py:308
+#: rhodecode/login/views.py:249 rhodecode/login/views.py:311
msgid "Bad captcha"
msgstr ""
-#: rhodecode/login/views.py:255
+#: rhodecode/login/views.py:258
msgid "You have successfully registered with RhodeCode"
msgstr ""
-#: rhodecode/login/views.py:297
+#: rhodecode/login/views.py:300
msgid "Password reset has been disabled."
msgstr ""
-#: rhodecode/login/views.py:324
+#: rhodecode/login/views.py:327
msgid "Your password reset link was sent"
msgstr ""
-#: rhodecode/login/views.py:348
+#: rhodecode/login/views.py:351
msgid "Your password reset was successful, a new password has been sent to your email"
msgstr ""
-#: rhodecode/model/comment.py:266
+#: rhodecode/model/comment.py:367
msgid "made a comment"
msgstr ""
-#: rhodecode/model/comment.py:267
+#: rhodecode/model/comment.py:368
msgid "Show it now"
msgstr ""
-#: rhodecode/model/db.py:2325
+#: rhodecode/model/db.py:2331
msgid "Password reset enabled"
msgstr ""
-#: rhodecode/model/db.py:2326
+#: rhodecode/model/db.py:2332
msgid "Password reset hidden"
msgstr ""
-#: rhodecode/model/db.py:2327
+#: rhodecode/model/db.py:2333
msgid "Password reset disabled"
msgstr ""
@@ -3247,61 +3202,63 @@ msgstr ""
#: rhodecode/model/permission.py:67 rhodecode/model/permission.py:73
#: rhodecode/model/permission.py:79
-#: rhodecode/templates/admin/repo_groups/repo_group_edit_perms.html:11
-#: rhodecode/templates/admin/repo_groups/repo_group_edit_perms.html:126
-#: rhodecode/templates/admin/repos/repo_edit_permissions.html:12
-#: rhodecode/templates/admin/user_groups/user_group_edit_perms.html:11
+#: rhodecode/templates/admin/repo_groups/repo_group_edit_perms.mako:11
+#: rhodecode/templates/admin/repo_groups/repo_group_edit_perms.mako:126
+#: rhodecode/templates/admin/repos/repo_edit_permissions.mako:12
+#: rhodecode/templates/admin/user_groups/user_group_edit_perms.mako:11
msgid "None"
msgstr ""
#: rhodecode/model/permission.py:68 rhodecode/model/permission.py:74
#: rhodecode/model/permission.py:80
-#: rhodecode/templates/admin/repo_groups/repo_group_edit_perms.html:12
-#: rhodecode/templates/admin/repos/repo_edit_permissions.html:13
-#: rhodecode/templates/admin/user_groups/user_group_edit_perms.html:12
+#: rhodecode/templates/admin/repo_groups/repo_group_edit_perms.mako:12
+#: rhodecode/templates/admin/repos/repo_edit_permissions.mako:13
+#: rhodecode/templates/admin/user_groups/user_group_edit_perms.mako:12
msgid "Read"
msgstr ""
#: rhodecode/model/permission.py:69 rhodecode/model/permission.py:75
#: rhodecode/model/permission.py:81
-#: rhodecode/templates/admin/repo_groups/repo_group_edit_perms.html:13
-#: rhodecode/templates/admin/repos/repo_edit_permissions.html:14
-#: rhodecode/templates/admin/user_groups/user_group_edit_perms.html:13
+#: rhodecode/templates/admin/repo_groups/repo_group_edit_perms.mako:13
+#: rhodecode/templates/admin/repos/repo_edit_permissions.mako:14
+#: rhodecode/templates/admin/user_groups/user_group_edit_perms.mako:13
+#: rhodecode/templates/changeset/changeset_file_comment.mako:266
+#: rhodecode/templates/changeset/changeset_file_comment.mako:316
msgid "Write"
msgstr ""
#: rhodecode/model/permission.py:70 rhodecode/model/permission.py:76
#: rhodecode/model/permission.py:82
-#: rhodecode/templates/admin/auth/auth_settings.html:12
-#: rhodecode/templates/admin/auth/plugin_settings.html:12
-#: rhodecode/templates/admin/defaults/defaults.html:12
-#: rhodecode/templates/admin/integrations/base.html:21
-#: rhodecode/templates/admin/integrations/form.html:15
-#: rhodecode/templates/admin/integrations/form.html:28
-#: rhodecode/templates/admin/integrations/list.html:8
-#: rhodecode/templates/admin/integrations/list.html:14
-#: rhodecode/templates/admin/integrations/new.html:11
-#: rhodecode/templates/admin/integrations/new.html:19
-#: rhodecode/templates/admin/permissions/permissions.html:12
-#: rhodecode/templates/admin/repo_groups/repo_group_add.html:12
-#: rhodecode/templates/admin/repo_groups/repo_group_edit.html:12
-#: rhodecode/templates/admin/repo_groups/repo_group_edit_perms.html:14
-#: rhodecode/templates/admin/repo_groups/repo_groups.html:13
-#: rhodecode/templates/admin/repos/repo_add.html:13
-#: rhodecode/templates/admin/repos/repo_add.html:17
-#: rhodecode/templates/admin/repos/repo_edit_permissions.html:15
-#: rhodecode/templates/admin/repos/repos.html:13
-#: rhodecode/templates/admin/settings/settings.html:12
-#: rhodecode/templates/admin/user_groups/user_group_add.html:11
-#: rhodecode/templates/admin/user_groups/user_group_edit.html:12
-#: rhodecode/templates/admin/user_groups/user_group_edit_perms.html:14
-#: rhodecode/templates/admin/user_groups/user_groups.html:13
-#: rhodecode/templates/admin/users/user_add.html:11
-#: rhodecode/templates/admin/users/user_edit.html:12
-#: rhodecode/templates/admin/users/users.html:13
-#: rhodecode/templates/admin/users/users.html:103
-#: rhodecode/templates/base/base.html:406
-#: rhodecode/templates/base/base.html:413
+#: rhodecode/templates/admin/auth/auth_settings.mako:12
+#: rhodecode/templates/admin/auth/plugin_settings.mako:12
+#: rhodecode/templates/admin/defaults/defaults.mako:12
+#: rhodecode/templates/admin/integrations/base.mako:21
+#: rhodecode/templates/admin/integrations/form.mako:15
+#: rhodecode/templates/admin/integrations/form.mako:28
+#: rhodecode/templates/admin/integrations/list.mako:8
+#: rhodecode/templates/admin/integrations/list.mako:14
+#: rhodecode/templates/admin/integrations/new.mako:11
+#: rhodecode/templates/admin/integrations/new.mako:19
+#: rhodecode/templates/admin/permissions/permissions.mako:12
+#: rhodecode/templates/admin/repo_groups/repo_group_add.mako:12
+#: rhodecode/templates/admin/repo_groups/repo_group_edit.mako:12
+#: rhodecode/templates/admin/repo_groups/repo_group_edit_perms.mako:14
+#: rhodecode/templates/admin/repo_groups/repo_groups.mako:13
+#: rhodecode/templates/admin/repos/repo_add.mako:13
+#: rhodecode/templates/admin/repos/repo_add.mako:17
+#: rhodecode/templates/admin/repos/repo_edit_permissions.mako:15
+#: rhodecode/templates/admin/repos/repos.mako:13
+#: rhodecode/templates/admin/settings/settings.mako:12
+#: rhodecode/templates/admin/user_groups/user_group_add.mako:11
+#: rhodecode/templates/admin/user_groups/user_group_edit.mako:12
+#: rhodecode/templates/admin/user_groups/user_group_edit_perms.mako:14
+#: rhodecode/templates/admin/user_groups/user_groups.mako:13
+#: rhodecode/templates/admin/users/user_add.mako:11
+#: rhodecode/templates/admin/users/user_edit.mako:12
+#: rhodecode/templates/admin/users/users.mako:13
+#: rhodecode/templates/admin/users/users.mako:103
+#: rhodecode/templates/base/base.mako:406
+#: rhodecode/templates/base/base.mako:413
msgid "Admin"
msgstr ""
@@ -3341,7 +3298,7 @@ msgid "This pull request cannot be merge
msgstr ""
#: rhodecode/model/pull_request.py:82
-msgid "This pull request cannot be merged because of conflicts."
+msgid "This pull request cannot be merged because of merge conflicts."
msgstr ""
#: rhodecode/model/pull_request.py:84
@@ -3404,7 +3361,7 @@ msgstr ""
msgid "This pull request cannot be updated because the source reference is missing."
msgstr ""
-#: rhodecode/model/pull_request.py:523
+#: rhodecode/model/pull_request.py:524
#, python-format
msgid ""
"Merge pull request #%(pr_id)s from %(source_repo)s %(source_ref_name)s\n"
@@ -3412,42 +3369,58 @@ msgid ""
" %(pr_title)s"
msgstr ""
-#: rhodecode/model/pull_request.py:555
+#: rhodecode/model/pull_request.py:556
msgid "Pull request merged and closed"
msgstr ""
-#: rhodecode/model/pull_request.py:1029
+#: rhodecode/model/pull_request.py:1041
msgid "Server-side pull request merging is disabled."
msgstr ""
-#: rhodecode/model/pull_request.py:1031
-msgid "This pull request is closed."
-msgstr ""
-
#: rhodecode/model/pull_request.py:1043
+msgid "This pull request is closed."
+msgstr ""
+
+#: rhodecode/model/pull_request.py:1055
msgid "Pull request merging is not supported."
msgstr ""
-#: rhodecode/model/pull_request.py:1061
+#: rhodecode/model/pull_request.py:1073
msgid "Target repository large files support is disabled."
msgstr ""
-#: rhodecode/model/pull_request.py:1064
+#: rhodecode/model/pull_request.py:1076
msgid "Source repository large files support is disabled."
msgstr ""
-#: rhodecode/model/pull_request.py:1221 rhodecode/model/scm.py:790
+#: rhodecode/model/pull_request.py:1233 rhodecode/model/scm.py:790
msgid "Bookmarks"
msgstr ""
-#: rhodecode/model/pull_request.py:1226
+#: rhodecode/model/pull_request.py:1238
msgid "Commit IDs"
msgstr ""
-#: rhodecode/model/pull_request.py:1229
+#: rhodecode/model/pull_request.py:1241
msgid "Closed Branches"
msgstr ""
+#: rhodecode/model/pull_request.py:1364
+msgid "User `{}` not allowed to perform merge."
+msgstr ""
+
+#: rhodecode/model/pull_request.py:1375
+msgid "Pull request reviewer approval is pending."
+msgstr ""
+
+#: rhodecode/model/pull_request.py:1390
+msgid "Cannot merge, {} TODO still not resolved."
+msgstr ""
+
+#: rhodecode/model/pull_request.py:1393
+msgid "Cannot merge, {} TODOs still not resolved."
+msgstr ""
+
#: rhodecode/model/scm.py:768
msgid "latest tip"
msgstr ""
@@ -3692,10 +3665,12 @@ msgstr ""
msgid "Name must start with a letter or number. Got `{}`"
msgstr ""
+#: rhodecode/model/validation_schema/schemas/comment_schema.py:42
#: rhodecode/model/validation_schema/schemas/gist_schema.py:89
msgid "Gist with name {} already exists"
msgstr ""
+#: rhodecode/model/validation_schema/schemas/comment_schema.py:48
#: rhodecode/model/validation_schema/schemas/gist_schema.py:95
msgid "Filename {} cannot be inside a directory"
msgstr ""
@@ -3794,317 +3769,365 @@ msgstr ""
#: rhodecode/public/js/rhodecode-components.js:31198
#: rhodecode/public/js/scripts.js:23046
-#: rhodecode/public/js/rhodecode/i18n/js_translations.js:20
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:23
#: rhodecode/public/js/src/plugins/jquery.autocomplete.js:87
msgid "No results"
msgstr ""
#: rhodecode/public/js/rhodecode-components.js:33129
#: rhodecode/public/js/scripts.js:24977
-#: rhodecode/public/js/rhodecode/i18n/js_translations.js:75
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:85
#: rhodecode/public/js/src/plugins/jquery.timeago-extension.js:109
msgid "{0} year"
msgstr ""
#: rhodecode/public/js/rhodecode-components.js:33130
#: rhodecode/public/js/scripts.js:24978
-#: rhodecode/public/js/rhodecode/i18n/js_translations.js:71
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:81
#: rhodecode/public/js/src/plugins/jquery.timeago-extension.js:110
msgid "{0} month"
msgstr ""
#: rhodecode/public/js/rhodecode-components.js:33131
#: rhodecode/public/js/scripts.js:24979
-#: rhodecode/public/js/rhodecode/i18n/js_translations.js:66
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:76
#: rhodecode/public/js/src/plugins/jquery.timeago-extension.js:111
msgid "{0} day"
msgstr ""
#: rhodecode/public/js/rhodecode-components.js:33132
#: rhodecode/public/js/scripts.js:24980
-#: rhodecode/public/js/rhodecode/i18n/js_translations.js:68
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:78
#: rhodecode/public/js/src/plugins/jquery.timeago-extension.js:112
msgid "{0} hour"
msgstr ""
#: rhodecode/public/js/rhodecode-components.js:33133
#: rhodecode/public/js/scripts.js:24981
-#: rhodecode/public/js/rhodecode/i18n/js_translations.js:70
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:80
#: rhodecode/public/js/src/plugins/jquery.timeago-extension.js:113
msgid "{0} min"
msgstr ""
#: rhodecode/public/js/rhodecode-components.js:33134
#: rhodecode/public/js/scripts.js:24982
-#: rhodecode/public/js/rhodecode/i18n/js_translations.js:74
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:84
#: rhodecode/public/js/src/plugins/jquery.timeago-extension.js:114
msgid "{0} sec"
msgstr ""
#: rhodecode/public/js/rhodecode-components.js:33154
#: rhodecode/public/js/scripts.js:25002
-#: rhodecode/public/js/rhodecode/i18n/js_translations.js:55
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:62
#: rhodecode/public/js/src/plugins/jquery.timeago-extension.js:134
msgid "in {0}"
msgstr ""
#: rhodecode/public/js/rhodecode-components.js:33162
#: rhodecode/public/js/scripts.js:25010
-#: rhodecode/public/js/rhodecode/i18n/js_translations.js:63
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:73
#: rhodecode/public/js/src/plugins/jquery.timeago-extension.js:142
msgid "{0} ago"
msgstr ""
#: rhodecode/public/js/rhodecode-components.js:33174
#: rhodecode/public/js/scripts.js:25022
-#: rhodecode/public/js/rhodecode/i18n/js_translations.js:77
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:87
#: rhodecode/public/js/src/plugins/jquery.timeago-extension.js:154
msgid "{0}, {1} ago"
msgstr ""
#: rhodecode/public/js/rhodecode-components.js:33176
#: rhodecode/public/js/scripts.js:25024
-#: rhodecode/public/js/rhodecode/i18n/js_translations.js:57
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:64
#: rhodecode/public/js/src/plugins/jquery.timeago-extension.js:156
msgid "in {0}, {1}"
msgstr ""
#: rhodecode/public/js/rhodecode-components.js:33180
#: rhodecode/public/js/scripts.js:25028
-#: rhodecode/public/js/rhodecode/i18n/js_translations.js:64
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:74
#: rhodecode/public/js/src/plugins/jquery.timeago-extension.js:160
msgid "{0} and {1}"
msgstr ""
#: rhodecode/public/js/rhodecode-components.js:33182
#: rhodecode/public/js/scripts.js:25030
-#: rhodecode/public/js/rhodecode/i18n/js_translations.js:65
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:75
#: rhodecode/public/js/src/plugins/jquery.timeago-extension.js:162
msgid "{0} and {1} ago"
msgstr ""
#: rhodecode/public/js/rhodecode-components.js:33184
#: rhodecode/public/js/scripts.js:25032
-#: rhodecode/public/js/rhodecode/i18n/js_translations.js:56
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:63
#: rhodecode/public/js/src/plugins/jquery.timeago-extension.js:164
msgid "in {0} and {1}"
msgstr ""
#: rhodecode/public/js/rhodecode-components.js:47027
#: rhodecode/public/js/scripts.js:38875
-#: rhodecode/public/js/rhodecode/i18n/js_translations.js:11
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:14
#: rhodecode/public/js/rhodecode/i18n/select2/translations.js:4
msgid "Loading more results..."
msgstr ""
#: rhodecode/public/js/rhodecode-components.js:47030
#: rhodecode/public/js/scripts.js:38878
-#: rhodecode/public/js/rhodecode/i18n/js_translations.js:31
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:35
#: rhodecode/public/js/rhodecode/i18n/select2/translations.js:7
msgid "Searching..."
msgstr ""
#: rhodecode/public/js/rhodecode-components.js:47033
#: rhodecode/public/js/scripts.js:38881
-#: rhodecode/public/js/rhodecode/i18n/js_translations.js:15
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:18
#: rhodecode/public/js/rhodecode/i18n/select2/translations.js:10
msgid "No matches found"
msgstr ""
#: rhodecode/public/js/rhodecode-components.js:47036
#: rhodecode/public/js/scripts.js:38884
-#: rhodecode/public/js/rhodecode/i18n/js_translations.js:10
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:13
#: rhodecode/public/js/rhodecode/i18n/select2/translations.js:13
msgid "Loading failed"
msgstr ""
#: rhodecode/public/js/rhodecode-components.js:47040
#: rhodecode/public/js/scripts.js:38888
-#: rhodecode/public/js/rhodecode/i18n/js_translations.js:24
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:28
#: rhodecode/public/js/rhodecode/i18n/select2/translations.js:17
msgid "One result is available, press enter to select it."
msgstr ""
#: rhodecode/public/js/rhodecode-components.js:47042
#: rhodecode/public/js/scripts.js:38890
-#: rhodecode/public/js/rhodecode/i18n/js_translations.js:73
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:83
#: rhodecode/public/js/rhodecode/i18n/select2/translations.js:19
msgid "{0} results are available, use up and down arrow keys to navigate."
msgstr ""
#: rhodecode/public/js/rhodecode-components.js:47047
#: rhodecode/public/js/scripts.js:38895
-#: rhodecode/public/js/rhodecode/i18n/js_translations.js:29
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:33
#: rhodecode/public/js/rhodecode/i18n/select2/translations.js:24
msgid "Please enter {0} or more character"
msgstr ""
#: rhodecode/public/js/rhodecode-components.js:47049
#: rhodecode/public/js/scripts.js:38897
-#: rhodecode/public/js/rhodecode/i18n/js_translations.js:30
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:34
#: rhodecode/public/js/rhodecode/i18n/select2/translations.js:26
msgid "Please enter {0} or more characters"
msgstr ""
#: rhodecode/public/js/rhodecode-components.js:47054
#: rhodecode/public/js/scripts.js:38902
-#: rhodecode/public/js/rhodecode/i18n/js_translations.js:27
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:31
#: rhodecode/public/js/rhodecode/i18n/select2/translations.js:31
msgid "Please delete {0} character"
msgstr ""
#: rhodecode/public/js/rhodecode-components.js:47056
#: rhodecode/public/js/scripts.js:38904
-#: rhodecode/public/js/rhodecode/i18n/js_translations.js:28
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:32
#: rhodecode/public/js/rhodecode/i18n/select2/translations.js:33
msgid "Please delete {0} characters"
msgstr ""
#: rhodecode/public/js/rhodecode-components.js:47060
#: rhodecode/public/js/scripts.js:38908
-#: rhodecode/public/js/rhodecode/i18n/js_translations.js:48
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:55
#: rhodecode/public/js/rhodecode/i18n/select2/translations.js:37
msgid "You can only select {0} item"
msgstr ""
#: rhodecode/public/js/rhodecode-components.js:47062
#: rhodecode/public/js/scripts.js:38910
-#: rhodecode/public/js/rhodecode/i18n/js_translations.js:49
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:56
#: rhodecode/public/js/rhodecode/i18n/select2/translations.js:39
msgid "You can only select {0} items"
msgstr ""
-#: rhodecode/public/js/rhodecode-components.js:48315
-#: rhodecode/public/js/scripts.js:40163
-#: rhodecode/public/js/rhodecode/i18n/js_translations.js:34
-#: rhodecode/public/js/src/rhodecode/codemirror.js:369
+#: rhodecode/public/js/rhodecode-components.js:47991
+#: rhodecode/public/js/scripts.js:39839
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:67
+#: rhodecode/public/js/src/rhodecode/changelog.js:35
+msgid "showing {0} out of {1} commit"
+msgstr ""
+
+#: rhodecode/public/js/rhodecode-components.js:47993
+#: rhodecode/public/js/scripts.js:39841
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:68
+#: rhodecode/public/js/src/rhodecode/changelog.js:37
+msgid "showing {0} out of {1} commits"
+msgstr ""
+
+#: rhodecode/public/js/rhodecode-components.js:48426
+#: rhodecode/public/js/scripts.js:40274
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:38
+#: rhodecode/public/js/src/rhodecode/codemirror.js:296
msgid "Set status to Approved"
msgstr ""
-#: rhodecode/public/js/rhodecode-components.js:48333
-#: rhodecode/public/js/scripts.js:40181
-#: rhodecode/public/js/rhodecode/i18n/js_translations.js:35
-#: rhodecode/public/js/src/rhodecode/codemirror.js:387
+#: rhodecode/public/js/rhodecode-components.js:48445
+#: rhodecode/public/js/scripts.js:40293
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:39
+#: rhodecode/public/js/src/rhodecode/codemirror.js:315
msgid "Set status to Rejected"
msgstr ""
-#: rhodecode/public/js/rhodecode-components.js:48713
-#: rhodecode/public/js/scripts.js:40561
-#: rhodecode/public/js/rhodecode/i18n/js_translations.js:3
-#: rhodecode/public/js/src/rhodecode/comments.js:236
-#: rhodecode/templates/codeblocks/diffs.html:399
-msgid "Add another comment"
-msgstr ""
-
-#: rhodecode/public/js/rhodecode-components.js:48947
-#: rhodecode/public/js/scripts.js:40795
-#: rhodecode/public/js/rhodecode/i18n/js_translations.js:40
-#: rhodecode/public/js/src/rhodecode/comments.js:470
+#: rhodecode/public/js/rhodecode-components.js:48464
+#: rhodecode/public/js/scripts.js:40312
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:50
+#: rhodecode/public/js/src/rhodecode/codemirror.js:334
+msgid "TODO comment"
+msgstr ""
+
+#: rhodecode/public/js/rhodecode-components.js:48484
+#: rhodecode/public/js/scripts.js:40332
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:27
+#: rhodecode/public/js/src/rhodecode/codemirror.js:354
+msgid "Note Comment"
+msgstr ""
+
+#: rhodecode/public/js/rhodecode-components.js:48848
+#: rhodecode/public/js/scripts.js:40696
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:66
+#: rhodecode/public/js/src/rhodecode/comments.js:123
+msgid "resolve comment"
+msgstr ""
+
+#: rhodecode/public/js/rhodecode-components.js:48927
+#: rhodecode/public/js/scripts.js:40775
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:45
+#: rhodecode/public/js/src/rhodecode/comments.js:202
msgid "Status Review"
msgstr ""
-#: rhodecode/public/js/rhodecode-components.js:48961
-#: rhodecode/public/js/scripts.js:40809
+#: rhodecode/public/js/rhodecode-components.js:48941
+#: rhodecode/public/js/scripts.js:40789
#: rhodecode/public/js/rhodecode/i18n/js_translations.js:5
-#: rhodecode/public/js/src/rhodecode/comments.js:484
+#: rhodecode/public/js/src/rhodecode/comments.js:216
msgid "Comment text will be set automatically based on currently selected status ({0}) ..."
msgstr ""
-#: rhodecode/public/js/rhodecode-components.js:49074
-#: rhodecode/public/js/scripts.js:40922
-#: rhodecode/public/js/rhodecode/i18n/js_translations.js:42
-#: rhodecode/public/js/src/rhodecode/comments.js:597
+#: rhodecode/public/js/rhodecode-components.js:49089
+#: rhodecode/public/js/scripts.js:40937
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:47
+#: rhodecode/public/js/src/rhodecode/comments.js:364
msgid "Submitting..."
msgstr ""
-#: rhodecode/public/js/rhodecode-components.js:49124
-#: rhodecode/public/js/scripts.js:40972
-#: rhodecode/public/js/rhodecode/i18n/js_translations.js:9
-#: rhodecode/public/js/src/rhodecode/comments.js:647
-#: rhodecode/templates/files/files_browser_tree.html:51
+#: rhodecode/public/js/rhodecode-components.js:49140
+#: rhodecode/public/js/scripts.js:40988
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:12
+#: rhodecode/public/js/src/rhodecode/comments.js:415
+#: rhodecode/templates/files/files_browser_tree.mako:51
msgid "Loading ..."
msgstr ""
-#: rhodecode/public/js/rhodecode-components.js:49197
-#: rhodecode/public/js/scripts.js:41045
+#: rhodecode/public/js/rhodecode-components.js:49245
+#: rhodecode/public/js/scripts.js:41093
#: rhodecode/public/js/rhodecode/i18n/js_translations.js:6
-#: rhodecode/public/js/src/rhodecode/comments.js:720
+#: rhodecode/public/js/src/rhodecode/comments.js:520
msgid "Delete this comment?"
msgstr ""
-#: rhodecode/public/js/rhodecode-components.js:49546
-#: rhodecode/public/js/scripts.js:41394
-#: rhodecode/public/js/rhodecode/i18n/js_translations.js:60
+#: rhodecode/public/js/rhodecode-components.js:49316
+#: rhodecode/public/js/scripts.js:41164
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:11
+#: rhodecode/public/js/src/rhodecode/comments.js:591
+msgid "Leave a comment, or click resolve button to resolve TODO comment #{0}"
+msgstr ""
+
+#: rhodecode/public/js/rhodecode-components.js:49393
+#: rhodecode/public/js/scripts.js:41241
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:10
+#: rhodecode/public/js/src/rhodecode/comments.js:668
+msgid "Leave a comment on line {0}."
+msgstr ""
+
+#: rhodecode/public/js/rhodecode-components.js:49507
+#: rhodecode/public/js/scripts.js:41355
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:51
+#: rhodecode/public/js/src/rhodecode/comments.js:782
+msgid "TODO from comment {0} was fixed."
+msgstr ""
+
+#: rhodecode/public/js/rhodecode-components.js:49713
+#: rhodecode/public/js/scripts.js:41561
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:70
#: rhodecode/public/js/src/rhodecode/files.js:150
msgid "truncated result"
msgstr ""
-#: rhodecode/public/js/rhodecode-components.js:49548
-#: rhodecode/public/js/scripts.js:41396
-#: rhodecode/public/js/rhodecode/i18n/js_translations.js:61
+#: rhodecode/public/js/rhodecode-components.js:49715
+#: rhodecode/public/js/scripts.js:41563
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:71
#: rhodecode/public/js/src/rhodecode/files.js:152
msgid "truncated results"
msgstr ""
-#: rhodecode/public/js/rhodecode-components.js:49557
-#: rhodecode/public/js/scripts.js:41405
-#: rhodecode/public/js/rhodecode/i18n/js_translations.js:16
+#: rhodecode/public/js/rhodecode-components.js:49724
+#: rhodecode/public/js/scripts.js:41572
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:19
#: rhodecode/public/js/src/rhodecode/files.js:161
msgid "No matching files"
msgstr ""
-#: rhodecode/public/js/rhodecode-components.js:49692
-#: rhodecode/public/js/scripts.js:41540
-#: rhodecode/public/js/rhodecode/i18n/js_translations.js:32
+#: rhodecode/public/js/rhodecode-components.js:49859
+#: rhodecode/public/js/scripts.js:41707
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:36
#: rhodecode/public/js/src/rhodecode/files.js:296
msgid "Selection link"
msgstr ""
-#: rhodecode/public/js/rhodecode-components.js:49732
-#: rhodecode/public/js/scripts.js:41580
-#: rhodecode/public/js/rhodecode/i18n/js_translations.js:41
+#: rhodecode/public/js/rhodecode-components.js:49899
+#: rhodecode/public/js/scripts.js:41747
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:46
#: rhodecode/public/js/src/rhodecode/followers.js:26
msgid "Stop following this repository"
msgstr ""
-#: rhodecode/public/js/rhodecode-components.js:49733
-#: rhodecode/public/js/scripts.js:41581
-#: rhodecode/public/js/rhodecode/i18n/js_translations.js:46
+#: rhodecode/public/js/rhodecode-components.js:49900
+#: rhodecode/public/js/scripts.js:41748
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:53
#: rhodecode/public/js/src/rhodecode/followers.js:27
msgid "Unfollow"
msgstr ""
-#: rhodecode/public/js/rhodecode-components.js:49742
-#: rhodecode/public/js/scripts.js:41590
-#: rhodecode/public/js/rhodecode/i18n/js_translations.js:39
+#: rhodecode/public/js/rhodecode-components.js:49909
+#: rhodecode/public/js/scripts.js:41757
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:44
#: rhodecode/public/js/src/rhodecode/followers.js:36
msgid "Start following this repository"
msgstr ""
-#: rhodecode/public/js/rhodecode-components.js:49743
-#: rhodecode/public/js/scripts.js:41591
-#: rhodecode/public/js/rhodecode/i18n/js_translations.js:7
+#: rhodecode/public/js/rhodecode-components.js:49910
+#: rhodecode/public/js/scripts.js:41758
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:8
#: rhodecode/public/js/src/rhodecode/followers.js:37
msgid "Follow"
msgstr ""
-#: rhodecode/public/js/rhodecode-components.js:50199
-#: rhodecode/public/js/scripts.js:42047
-#: rhodecode/public/js/rhodecode/i18n/js_translations.js:50
+#: rhodecode/public/js/rhodecode-components.js:50366
+#: rhodecode/public/js/scripts.js:42214
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:57
#: rhodecode/public/js/src/rhodecode/pullrequests.js:212
msgid "added manually by \"{0}\""
msgstr ""
-#: rhodecode/public/js/rhodecode-components.js:50648
-#: rhodecode/public/js/scripts.js:42496
-#: rhodecode/public/js/rhodecode/i18n/js_translations.js:53
+#: rhodecode/public/js/rhodecode-components.js:50937
+#: rhodecode/public/js/scripts.js:42785
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:60
#: rhodecode/public/js/src/rhodecode.js:142
msgid "file"
msgstr ""
-#: rhodecode/public/js/rhodecode-components.js:50668
-#: rhodecode/public/js/scripts.js:42516
-#: rhodecode/public/js/rhodecode/i18n/js_translations.js:36
+#: rhodecode/public/js/rhodecode-components.js:50957
+#: rhodecode/public/js/scripts.js:42805
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:41
#: rhodecode/public/js/src/rhodecode.js:162
msgid "Show more"
msgstr ""
@@ -4113,129 +4136,143 @@ msgstr ""
msgid "(from usergroup {0})"
msgstr ""
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:3
+#: rhodecode/templates/codeblocks/diffs.mako:479
+#: rhodecode/templates/codeblocks/diffs.mako:484
+msgid "Add another comment"
+msgstr ""
+
#: rhodecode/public/js/rhodecode/i18n/js_translations.js:4
#: rhodecode/public/js/src/i18n_messages.js:5
-#: rhodecode/templates/pullrequests/pullrequest_show.html:214
+#: rhodecode/templates/pullrequests/pullrequest_show.mako:320
msgid "Close"
msgstr ""
-#: rhodecode/public/js/rhodecode/i18n/js_translations.js:8
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:7
+msgid "Diff to Commit "
+msgstr ""
+
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:9
#: rhodecode/public/js/src/i18n_messages.js:4
msgid "Invite reviewers to this discussion"
msgstr ""
-#: rhodecode/public/js/rhodecode/i18n/js_translations.js:12
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:15
msgid "No bookmarks available yet."
msgstr ""
-#: rhodecode/public/js/rhodecode/i18n/js_translations.js:13
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:16
msgid "No branches available yet."
msgstr ""
-#: rhodecode/public/js/rhodecode/i18n/js_translations.js:14
-msgid "No gists available yet."
-msgstr ""
-
#: rhodecode/public/js/rhodecode/i18n/js_translations.js:17
+msgid "No gists available yet."
+msgstr ""
+
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:20
msgid "No pull requests available yet."
msgstr ""
-#: rhodecode/public/js/rhodecode/i18n/js_translations.js:18
-msgid "No repositories available yet."
-msgstr ""
-
-#: rhodecode/public/js/rhodecode/i18n/js_translations.js:19
-msgid "No repository groups available yet."
-msgstr ""
-
#: rhodecode/public/js/rhodecode/i18n/js_translations.js:21
-msgid "No tags available yet."
+msgid "No repositories available yet."
msgstr ""
#: rhodecode/public/js/rhodecode/i18n/js_translations.js:22
-msgid "No user groups available yet."
-msgstr ""
-
-#: rhodecode/public/js/rhodecode/i18n/js_translations.js:23
-msgid "No users available yet."
+msgid "No repository groups available yet."
+msgstr ""
+
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:24
+msgid "No tags available yet."
msgstr ""
#: rhodecode/public/js/rhodecode/i18n/js_translations.js:25
-#: rhodecode/templates/changelog/changelog.html:62
-msgid "Open new pull request"
+msgid "No user groups available yet."
msgstr ""
#: rhodecode/public/js/rhodecode/i18n/js_translations.js:26
+msgid "No users available yet."
+msgstr ""
+
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:29
+#: rhodecode/templates/changelog/changelog.mako:61
+msgid "Open new pull request"
+msgstr ""
+
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:30
msgid "Open new pull request for selected commit"
msgstr ""
-#: rhodecode/public/js/rhodecode/i18n/js_translations.js:33
-#: rhodecode/public/js/src/i18n_messages.js:6
-#: rhodecode/templates/admin/settings/settings_email.html:48
-msgid "Send"
-msgstr ""
-
#: rhodecode/public/js/rhodecode/i18n/js_translations.js:37
+#: rhodecode/public/js/src/i18n_messages.js:6
+#: rhodecode/templates/admin/settings/settings_email.mako:48
+msgid "Send"
+msgstr ""
+
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:40
+msgid "Show at Commit "
+msgstr ""
+
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:42
msgid "Show selected commit __S"
msgstr ""
-#: rhodecode/public/js/rhodecode/i18n/js_translations.js:38
-msgid "Show selected commits __S ... __E"
-msgstr ""
-
#: rhodecode/public/js/rhodecode/i18n/js_translations.js:43
+msgid "Show selected commits __S ... __E"
+msgstr ""
+
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:48
#: rhodecode/public/js/src/i18n_messages.js:7
msgid "Switch to chat"
msgstr ""
-#: rhodecode/public/js/rhodecode/i18n/js_translations.js:44
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:49
#: rhodecode/public/js/src/i18n_messages.js:8
msgid "Switch to comment"
msgstr ""
-#: rhodecode/public/js/rhodecode/i18n/js_translations.js:45
-msgid "There are currently no open pull requests requiring your participation."
-msgstr ""
-
-#: rhodecode/public/js/rhodecode/i18n/js_translations.js:47
-msgid "Updating..."
-msgstr ""
-
-#: rhodecode/public/js/rhodecode/i18n/js_translations.js:51
-#: rhodecode/templates/admin/auth/auth_settings.html:71
-msgid "disabled"
-msgstr ""
-
#: rhodecode/public/js/rhodecode/i18n/js_translations.js:52
-#: rhodecode/templates/admin/auth/auth_settings.html:71
-msgid "enabled"
+msgid "There are currently no open pull requests requiring your participation."
msgstr ""
#: rhodecode/public/js/rhodecode/i18n/js_translations.js:54
-msgid "files"
+msgid "Updating..."
+msgstr ""
+
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:58
+#: rhodecode/templates/admin/auth/auth_settings.mako:71
+msgid "disabled"
msgstr ""
#: rhodecode/public/js/rhodecode/i18n/js_translations.js:59
-msgid "specify commit"
-msgstr ""
-
-#: rhodecode/public/js/rhodecode/i18n/js_translations.js:62
-msgid "{0} active out of {1} users"
-msgstr ""
-
-#: rhodecode/public/js/rhodecode/i18n/js_translations.js:67
-msgid "{0} days"
+#: rhodecode/templates/admin/auth/auth_settings.mako:71
+msgid "enabled"
+msgstr ""
+
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:61
+msgid "files"
msgstr ""
#: rhodecode/public/js/rhodecode/i18n/js_translations.js:69
-msgid "{0} hours"
+msgid "specify commit"
msgstr ""
#: rhodecode/public/js/rhodecode/i18n/js_translations.js:72
+msgid "{0} active out of {1} users"
+msgstr ""
+
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:77
+msgid "{0} days"
+msgstr ""
+
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:79
+msgid "{0} hours"
+msgstr ""
+
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:82
msgid "{0} months"
msgstr ""
-#: rhodecode/public/js/rhodecode/i18n/js_translations.js:76
+#: rhodecode/public/js/rhodecode/i18n/js_translations.js:86
msgid "{0} years"
msgstr ""
@@ -4259,1936 +4296,1947 @@ msgstr ""
msgid "Configuration for Apaache mad_dav_svn changed."
msgstr ""
-#: rhodecode/templates/index.html:5
+#: rhodecode/templates/index.mako:5
msgid "Dashboard"
msgstr ""
-#: rhodecode/templates/index_base.html:8
-#: rhodecode/templates/admin/gists/index.html:18
-#: rhodecode/templates/admin/my_account/my_account_repos.html:7
-#: rhodecode/templates/admin/my_account/my_account_watched.html:7
-#: rhodecode/templates/admin/repo_groups/repo_groups.html:12
-#: rhodecode/templates/admin/repos/repos.html:12
-#: rhodecode/templates/admin/user_groups/user_groups.html:12
-#: rhodecode/templates/admin/users/users.html:12
-#: rhodecode/templates/bookmarks/bookmarks.html:12
-#: rhodecode/templates/branches/branches.html:12
-#: rhodecode/templates/journal/journal.html:12
-#: rhodecode/templates/tags/tags.html:12
+#: rhodecode/templates/index_base.mako:8
+#: rhodecode/templates/admin/gists/index.mako:18
+#: rhodecode/templates/admin/my_account/my_account_repos.mako:7
+#: rhodecode/templates/admin/my_account/my_account_watched.mako:7
+#: rhodecode/templates/admin/repo_groups/repo_groups.mako:12
+#: rhodecode/templates/admin/repos/repos.mako:12
+#: rhodecode/templates/admin/user_groups/user_groups.mako:12
+#: rhodecode/templates/admin/users/users.mako:12
+#: rhodecode/templates/bookmarks/bookmarks.mako:12
+#: rhodecode/templates/branches/branches.mako:12
+#: rhodecode/templates/journal/journal.mako:12
+#: rhodecode/templates/tags/tags.mako:12
msgid "quick filter..."
msgstr ""
-#: rhodecode/templates/index_base.html:10
+#: rhodecode/templates/index_base.mako:10
msgid "matches"
msgstr ""
-#: rhodecode/templates/index_base.html:30
-#: rhodecode/templates/index_base.html:39
-#: rhodecode/templates/admin/repos/repo_add.html:22
-#: rhodecode/templates/admin/repos/repos.html:27
+#: rhodecode/templates/index_base.mako:30
+#: rhodecode/templates/index_base.mako:39
+#: rhodecode/templates/admin/repos/repo_add.mako:22
+#: rhodecode/templates/admin/repos/repos.mako:27
msgid "Add Repository"
msgstr ""
-#: rhodecode/templates/index_base.html:34
-#: rhodecode/templates/index_base.html:42
-#: rhodecode/templates/admin/repo_groups/repo_group_add.html:16
-#: rhodecode/templates/admin/repo_groups/repo_groups.html:27
+#: rhodecode/templates/index_base.mako:34
+#: rhodecode/templates/index_base.mako:42
+#: rhodecode/templates/admin/repo_groups/repo_group_add.mako:16
+#: rhodecode/templates/admin/repo_groups/repo_groups.mako:27
msgid "Add Repository Group"
msgstr ""
-#: rhodecode/templates/index_base.html:45
+#: rhodecode/templates/index_base.mako:45
msgid "You have admin right to this group, and can edit it"
msgstr ""
-#: rhodecode/templates/index_base.html:45
+#: rhodecode/templates/index_base.mako:45
msgid "Edit Repository Group"
msgstr ""
-#: rhodecode/templates/index_base.html:97
-#: rhodecode/templates/index_base.html:122
-#: rhodecode/templates/admin/gists/index.html:112
-#: rhodecode/templates/admin/integrations/list.html:102
-#: rhodecode/templates/admin/my_account/my_account_pullrequests.html:39
-#: rhodecode/templates/admin/my_account/my_account_repos.html:31
-#: rhodecode/templates/admin/my_account/my_account_watched.html:31
-#: rhodecode/templates/admin/repo_groups/repo_groups.html:53
-#: rhodecode/templates/admin/repos/repo_add_base.html:9
-#: rhodecode/templates/admin/repos/repo_edit_settings.html:15
-#: rhodecode/templates/admin/repos/repos.html:54
-#: rhodecode/templates/admin/user_groups/user_groups.html:55
-#: rhodecode/templates/base/perms_summary.html:102
-#: rhodecode/templates/bookmarks/bookmarks.html:59
-#: rhodecode/templates/branches/branches.html:58
-#: rhodecode/templates/files/files_browser_tree.html:5
-#: rhodecode/templates/pullrequests/pullrequests.html:100
-#: rhodecode/templates/tags/tags.html:59
+#: rhodecode/templates/index_base.mako:97
+#: rhodecode/templates/index_base.mako:122
+#: rhodecode/templates/admin/gists/index.mako:112
+#: rhodecode/templates/admin/integrations/list.mako:102
+#: rhodecode/templates/admin/my_account/my_account_pullrequests.mako:39
+#: rhodecode/templates/admin/my_account/my_account_repos.mako:31
+#: rhodecode/templates/admin/my_account/my_account_watched.mako:31
+#: rhodecode/templates/admin/repo_groups/repo_groups.mako:53
+#: rhodecode/templates/admin/repos/repo_add_base.mako:9
+#: rhodecode/templates/admin/repos/repo_edit_settings.mako:15
+#: rhodecode/templates/admin/repos/repos.mako:54
+#: rhodecode/templates/admin/user_groups/user_groups.mako:55
+#: rhodecode/templates/base/perms_summary.mako:102
+#: rhodecode/templates/bookmarks/bookmarks.mako:59
+#: rhodecode/templates/branches/branches.mako:58
+#: rhodecode/templates/files/files_browser_tree.mako:5
+#: rhodecode/templates/pullrequests/pullrequests.mako:100
+#: rhodecode/templates/tags/tags.mako:59
msgid "Name"
msgstr ""
-#: rhodecode/templates/index_base.html:100
-#: rhodecode/templates/index_base.html:125
-#: rhodecode/templates/admin/gists/index.html:114
-#: rhodecode/templates/admin/my_account/my_account_auth_tokens.html:77
-#: rhodecode/templates/admin/repo_groups/repo_group_add.html:45
-#: rhodecode/templates/admin/repo_groups/repo_group_edit_settings.html:42
-#: rhodecode/templates/admin/repo_groups/repo_groups.html:56
-#: rhodecode/templates/admin/repos/repo_add_base.html:32
-#: rhodecode/templates/admin/repos/repo_edit_issuetracker.html:29
-#: rhodecode/templates/admin/repos/repo_edit_settings.html:98
-#: rhodecode/templates/admin/repos/repos.html:57
-#: rhodecode/templates/admin/user_groups/user_group_add.html:43
-#: rhodecode/templates/admin/user_groups/user_group_edit_settings.html:42
-#: rhodecode/templates/admin/user_groups/user_groups.html:57
-#: rhodecode/templates/admin/users/user_edit_auth_tokens.html:74
-#: rhodecode/templates/base/issue_tracker_settings.html:10
-#: rhodecode/templates/changeset/changeset.html:53
-#: rhodecode/templates/compare/compare_commits.html:25
+#: rhodecode/templates/index_base.mako:100
+#: rhodecode/templates/index_base.mako:125
+#: rhodecode/templates/admin/gists/index.mako:114
+#: rhodecode/templates/admin/my_account/my_account_auth_tokens.mako:81
+#: rhodecode/templates/admin/repo_groups/repo_group_add.mako:45
+#: rhodecode/templates/admin/repo_groups/repo_group_edit_settings.mako:42
+#: rhodecode/templates/admin/repo_groups/repo_groups.mako:56
+#: rhodecode/templates/admin/repos/repo_add_base.mako:32
+#: rhodecode/templates/admin/repos/repo_edit_issuetracker.mako:29
+#: rhodecode/templates/admin/repos/repo_edit_settings.mako:98
+#: rhodecode/templates/admin/repos/repos.mako:57
+#: rhodecode/templates/admin/user_groups/user_group_add.mako:43
+#: rhodecode/templates/admin/user_groups/user_group_edit_settings.mako:42
+#: rhodecode/templates/admin/user_groups/user_groups.mako:57
+#: rhodecode/templates/admin/users/user_edit_auth_tokens.mako:78
+#: rhodecode/templates/base/issue_tracker_settings.mako:10
+#: rhodecode/templates/changeset/changeset.mako:53
+#: rhodecode/templates/compare/compare_commits.mako:20
#: rhodecode/templates/email_templates/commit_comment.mako:82
#: rhodecode/templates/email_templates/pull_request_review.mako:41
#: rhodecode/templates/email_templates/pull_request_review.mako:75
-#: rhodecode/templates/files/file_tree_detail.html:5
-#: rhodecode/templates/files/file_tree_detail.html:12
-#: rhodecode/templates/forks/fork.html:48
-#: rhodecode/templates/forks/forks_data.html:9
-#: rhodecode/templates/pullrequests/pullrequest.html:47
-#: rhodecode/templates/pullrequests/pullrequest_show.html:151
-#: rhodecode/templates/summary/components.html:73
+#: rhodecode/templates/files/file_tree_detail.mako:5
+#: rhodecode/templates/files/file_tree_detail.mako:12
+#: rhodecode/templates/forks/fork.mako:48
+#: rhodecode/templates/forks/forks_data.mako:9
+#: rhodecode/templates/pullrequests/pullrequest.mako:47
+#: rhodecode/templates/pullrequests/pullrequest_show.mako:158
+#: rhodecode/templates/pullrequests/pullrequest_show.mako:455
+#: rhodecode/templates/summary/components.mako:73
msgid "Description"
msgstr ""
-#: rhodecode/templates/index_base.html:102
-#: rhodecode/templates/index_base.html:133
-#: rhodecode/templates/admin/repo_groups/repo_group_edit_advanced.html:5
-#: rhodecode/templates/admin/repo_groups/repo_group_edit_settings.html:24
-#: rhodecode/templates/admin/repo_groups/repo_groups.html:60
-#: rhodecode/templates/admin/repos/repo_edit_advanced.html:5
-#: rhodecode/templates/admin/repos/repo_edit_settings.html:80
-#: rhodecode/templates/admin/repos/repos.html:65
-#: rhodecode/templates/admin/user_groups/user_group_edit_advanced.html:5
-#: rhodecode/templates/admin/user_groups/user_group_edit_settings.html:24
-#: rhodecode/templates/admin/user_groups/user_groups.html:64
-#: rhodecode/templates/forks/forks_data.html:7
-#: rhodecode/templates/summary/components.html:195
+#: rhodecode/templates/index_base.mako:102
+#: rhodecode/templates/index_base.mako:133
+#: rhodecode/templates/admin/repo_groups/repo_group_edit_advanced.mako:5
+#: rhodecode/templates/admin/repo_groups/repo_group_edit_settings.mako:24
+#: rhodecode/templates/admin/repo_groups/repo_groups.mako:60
+#: rhodecode/templates/admin/repos/repo_edit_advanced.mako:5
+#: rhodecode/templates/admin/repos/repo_edit_settings.mako:80
+#: rhodecode/templates/admin/repos/repos.mako:65
+#: rhodecode/templates/admin/user_groups/user_group_edit_advanced.mako:5
+#: rhodecode/templates/admin/user_groups/user_group_edit_settings.mako:24
+#: rhodecode/templates/admin/user_groups/user_groups.mako:64
+#: rhodecode/templates/forks/forks_data.mako:7
+#: rhodecode/templates/summary/components.mako:195
msgid "Owner"
msgstr ""
-#: rhodecode/templates/index_base.html:128
-#: rhodecode/templates/admin/repos/repos.html:60
+#: rhodecode/templates/index_base.mako:128
+#: rhodecode/templates/admin/repos/repos.mako:60
msgid "Last Change"
msgstr ""
-#: rhodecode/templates/index_base.html:131
-#: rhodecode/templates/admin/my_account/my_account_repos.html:35
-#: rhodecode/templates/admin/my_account/my_account_watched.html:35
-#: rhodecode/templates/admin/repos/repos.html:63
-#: rhodecode/templates/bookmarks/bookmarks.html:66
-#: rhodecode/templates/branches/branches.html:65
-#: rhodecode/templates/changelog/changelog.html:104
-#: rhodecode/templates/changelog/changelog_summary_data.html:8
-#: rhodecode/templates/changeset/changeset.html:36
-#: rhodecode/templates/compare/compare_commits.html:23
+#: rhodecode/templates/index_base.mako:131
+#: rhodecode/templates/admin/my_account/my_account_repos.mako:35
+#: rhodecode/templates/admin/my_account/my_account_watched.mako:35
+#: rhodecode/templates/admin/repos/repos.mako:63
+#: rhodecode/templates/bookmarks/bookmarks.mako:66
+#: rhodecode/templates/branches/branches.mako:65
+#: rhodecode/templates/changelog/changelog.mako:107
+#: rhodecode/templates/changelog/changelog_summary_data.mako:8
+#: rhodecode/templates/changeset/changeset.mako:36
+#: rhodecode/templates/compare/compare_commits.mako:18
#: rhodecode/templates/email_templates/commit_comment.mako:45
#: rhodecode/templates/email_templates/commit_comment.mako:81
-#: rhodecode/templates/search/search_commit.html:6
-#: rhodecode/templates/tags/tags.html:66
+#: rhodecode/templates/pullrequests/pullrequest_show.mako:453
+#: rhodecode/templates/search/search_commit.mako:6
+#: rhodecode/templates/tags/tags.mako:66
msgid "Commit"
msgstr ""
-#: rhodecode/templates/index_repo_group.html:5
+#: rhodecode/templates/index_repo_group.mako:5
#, python-format
msgid "%s Repository group dashboard"
msgstr ""
-#: rhodecode/templates/index_repo_group.html:13
+#: rhodecode/templates/index_repo_group.mako:13
msgid "Home"
msgstr ""
-#: rhodecode/templates/login.html:5 rhodecode/templates/login.html:34
-#: rhodecode/templates/login.html:75 rhodecode/templates/base/base.html:326
+#: rhodecode/templates/login.mako:5 rhodecode/templates/login.mako:34
+#: rhodecode/templates/login.mako:75 rhodecode/templates/base/base.mako:326
#: rhodecode/templates/debug_style/login.html:60
msgid "Sign In"
msgstr ""
-#: rhodecode/templates/login.html:36
+#: rhodecode/templates/login.mako:36
msgid "Go to the registration page to create a new account."
msgstr ""
-#: rhodecode/templates/login.html:57
+#: rhodecode/templates/login.mako:57
msgid "Remember me"
msgstr ""
-#: rhodecode/templates/login.html:61
+#: rhodecode/templates/login.mako:61
msgid "Forgot your password?"
msgstr ""
-#: rhodecode/templates/login.html:65 rhodecode/templates/password_reset.html:34
+#: rhodecode/templates/login.mako:65 rhodecode/templates/password_reset.mako:34
msgid "Password reset is disabled. Please contact "
msgstr ""
-#: rhodecode/templates/login.html:67 rhodecode/templates/password_reset.html:36
-#: rhodecode/templates/base/base.html:43
-#: rhodecode/templates/errors/error_document.html:62
+#: rhodecode/templates/login.mako:67 rhodecode/templates/password_reset.mako:36
+#: rhodecode/templates/base/base.mako:43
+#: rhodecode/templates/errors/error_document.mako:64
msgid "Support"
msgstr ""
-#: rhodecode/templates/login.html:68 rhodecode/templates/password_reset.html:37
-#: rhodecode/templates/files/files_add.html:54
-#: rhodecode/templates/files/files_add.html:65
+#: rhodecode/templates/login.mako:68 rhodecode/templates/password_reset.mako:37
+#: rhodecode/templates/files/files_add.mako:54
+#: rhodecode/templates/files/files_add.mako:65
msgid "or"
msgstr ""
-#: rhodecode/templates/login.html:70 rhodecode/templates/password_reset.html:39
+#: rhodecode/templates/login.mako:70 rhodecode/templates/password_reset.mako:39
msgid "an administrator if you need help."
msgstr ""
-#: rhodecode/templates/password_reset.html:5
+#: rhodecode/templates/password_reset.mako:5
msgid "Reset Password"
msgstr ""
-#: rhodecode/templates/password_reset.html:46
+#: rhodecode/templates/password_reset.mako:46
msgid "Reset your Password"
msgstr ""
-#: rhodecode/templates/password_reset.html:47
+#: rhodecode/templates/password_reset.mako:47
msgid "Go to the login page to sign in."
msgstr ""
-#: rhodecode/templates/password_reset.html:51
+#: rhodecode/templates/password_reset.mako:51
msgid "Email Address"
msgstr ""
-#: rhodecode/templates/password_reset.html:60
-#: rhodecode/templates/register.html:84
+#: rhodecode/templates/password_reset.mako:60
+#: rhodecode/templates/register.mako:84
msgid "Captcha"
msgstr ""
-#: rhodecode/templates/password_reset.html:70
+#: rhodecode/templates/password_reset.mako:70
msgid "Send password reset email"
msgstr ""
-#: rhodecode/templates/password_reset.html:71
+#: rhodecode/templates/password_reset.mako:71
msgid "Password reset link will be sent to matching email address"
msgstr ""
-#: rhodecode/templates/register.html:5
+#: rhodecode/templates/register.mako:5
msgid "Create an Account"
msgstr ""
-#: rhodecode/templates/register.html:34
+#: rhodecode/templates/register.mako:34
msgid "Create an account"
msgstr ""
-#: rhodecode/templates/register.html:35
+#: rhodecode/templates/register.mako:35
msgid "Go to the login page to sign in with an existing account."
msgstr ""
-#: rhodecode/templates/register.html:54
+#: rhodecode/templates/register.mako:54
msgid "Re-enter password"
msgstr ""
-#: rhodecode/templates/register.html:61
-#: rhodecode/templates/admin/my_account/my_account_profile.html:32
-#: rhodecode/templates/admin/my_account/my_account_profile_edit.html:30
-#: rhodecode/templates/admin/my_account/my_account_profile_edit.html:76
-#: rhodecode/templates/admin/users/user_add.html:68
-#: rhodecode/templates/admin/users/user_edit_profile.html:47
-#: rhodecode/templates/admin/users/users.html:94
+#: rhodecode/templates/register.mako:61
+#: rhodecode/templates/admin/my_account/my_account_profile.mako:32
+#: rhodecode/templates/admin/my_account/my_account_profile_edit.mako:33
+#: rhodecode/templates/admin/my_account/my_account_profile_edit.mako:79
+#: rhodecode/templates/admin/users/user_add.mako:68
+#: rhodecode/templates/admin/users/user_edit_profile.mako:47
+#: rhodecode/templates/admin/users/users.mako:94
msgid "First Name"
msgstr ""
-#: rhodecode/templates/register.html:68
-#: rhodecode/templates/admin/my_account/my_account_profile.html:40
-#: rhodecode/templates/admin/my_account/my_account_profile_edit.html:39
-#: rhodecode/templates/admin/my_account/my_account_profile_edit.html:85
-#: rhodecode/templates/admin/users/user_add.html:77
-#: rhodecode/templates/admin/users/user_edit_profile.html:56
-#: rhodecode/templates/admin/users/users.html:96
+#: rhodecode/templates/register.mako:68
+#: rhodecode/templates/admin/my_account/my_account_profile.mako:40
+#: rhodecode/templates/admin/my_account/my_account_profile_edit.mako:42
+#: rhodecode/templates/admin/my_account/my_account_profile_edit.mako:88
+#: rhodecode/templates/admin/users/user_add.mako:77
+#: rhodecode/templates/admin/users/user_edit_profile.mako:56
+#: rhodecode/templates/admin/users/users.mako:96
msgid "Last Name"
msgstr ""
-#: rhodecode/templates/register.html:96
+#: rhodecode/templates/register.mako:96
msgid "Account activation requires admin approval."
msgstr ""
-#: rhodecode/templates/register.html:103
+#: rhodecode/templates/register.mako:103
msgid "Create Account"
msgstr ""
-#: rhodecode/templates/admin/admin.html:5
-#: rhodecode/templates/admin/admin.html:15
-#: rhodecode/templates/base/base.html:72
+#: rhodecode/templates/admin/admin.mako:5
+#: rhodecode/templates/admin/admin.mako:15
+#: rhodecode/templates/base/base.mako:72
msgid "Admin journal"
msgstr ""
-#: rhodecode/templates/admin/admin.html:13
+#: rhodecode/templates/admin/admin.mako:13
msgid "journal filter..."
msgstr ""
-#: rhodecode/templates/admin/admin.html:14
+#: rhodecode/templates/admin/admin.mako:14
msgid "filter"
msgstr ""
-#: rhodecode/templates/admin/admin.html:15
-#: rhodecode/templates/journal/journal.html:14
+#: rhodecode/templates/admin/admin.mako:15
+#: rhodecode/templates/journal/journal.mako:14
#, python-format
msgid "%s entry"
msgid_plural "%s entries"
msgstr[0] ""
msgstr[1] ""
-#: rhodecode/templates/admin/admin.html:17
-#: rhodecode/templates/journal/journal.html:17
+#: rhodecode/templates/admin/admin.mako:17
+#: rhodecode/templates/journal/journal.mako:17
msgid "Example Queries"
msgstr ""
-#: rhodecode/templates/admin/admin_log.html:8
-#: rhodecode/templates/admin/my_account/my_account_repos.html:37
-#: rhodecode/templates/admin/repo_groups/repo_groups.html:62
-#: rhodecode/templates/admin/repos/repo_edit_fields.html:13
-#: rhodecode/templates/admin/repos/repos.html:69
-#: rhodecode/templates/admin/user_groups/user_group_edit_settings.html:71
-#: rhodecode/templates/admin/user_groups/user_groups.html:66
-#: rhodecode/templates/admin/users/users.html:107
+#: rhodecode/templates/admin/admin_log.mako:8
+#: rhodecode/templates/admin/my_account/my_account_repos.mako:37
+#: rhodecode/templates/admin/repo_groups/repo_groups.mako:62
+#: rhodecode/templates/admin/repos/repo_edit_fields.mako:13
+#: rhodecode/templates/admin/repos/repos.mako:69
+#: rhodecode/templates/admin/user_groups/user_group_edit_settings.mako:71
+#: rhodecode/templates/admin/user_groups/user_groups.mako:66
+#: rhodecode/templates/admin/users/users.mako:107
+#: rhodecode/templates/files/files_detail.mako:63
msgid "Action"
msgstr ""
-#: rhodecode/templates/admin/admin_log.html:9
-#: rhodecode/templates/admin/defaults/defaults.html:31
-#: rhodecode/templates/admin/permissions/permissions_objects.html:13
-#: rhodecode/templates/search/search_commit.html:5
-#: rhodecode/templates/search/search_path.html:3
+#: rhodecode/templates/admin/admin_log.mako:9
+#: rhodecode/templates/admin/defaults/defaults.mako:31
+#: rhodecode/templates/admin/permissions/permissions_objects.mako:13
+#: rhodecode/templates/search/search_commit.mako:5
+#: rhodecode/templates/search/search_path.mako:3
msgid "Repository"
msgstr ""
-#: rhodecode/templates/admin/admin_log.html:10
-#: rhodecode/templates/bookmarks/bookmarks.html:61
-#: rhodecode/templates/branches/branches.html:60
-#: rhodecode/templates/tags/tags.html:61
+#: rhodecode/templates/admin/admin_log.mako:10
+#: rhodecode/templates/bookmarks/bookmarks.mako:61
+#: rhodecode/templates/branches/branches.mako:60
+#: rhodecode/templates/tags/tags.mako:61
msgid "Date"
msgstr ""
-#: rhodecode/templates/admin/admin_log.html:11
+#: rhodecode/templates/admin/admin_log.mako:11
msgid "From IP"
msgstr ""
-#: rhodecode/templates/admin/admin_log.html:46
+#: rhodecode/templates/admin/admin_log.mako:46
msgid "No actions yet"
msgstr ""
-#: rhodecode/templates/admin/auth/auth_settings.html:5
-#: rhodecode/templates/admin/auth/plugin_settings.html:5
+#: rhodecode/templates/admin/auth/auth_settings.mako:5
+#: rhodecode/templates/admin/auth/plugin_settings.mako:5
msgid "Authentication Settings"
msgstr ""
-#: rhodecode/templates/admin/auth/auth_settings.html:14
-#: rhodecode/templates/admin/auth/plugin_settings.html:14
+#: rhodecode/templates/admin/auth/auth_settings.mako:14
+#: rhodecode/templates/admin/auth/plugin_settings.mako:14
msgid "Authentication Plugins"
msgstr ""
-#: rhodecode/templates/admin/auth/auth_settings.html:47
+#: rhodecode/templates/admin/auth/auth_settings.mako:47
msgid "Enabled and Available Plugins"
msgstr ""
-#: rhodecode/templates/admin/auth/auth_settings.html:53
+#: rhodecode/templates/admin/auth/auth_settings.mako:53
msgid "Enabled Plugins"
msgstr ""
-#: rhodecode/templates/admin/auth/auth_settings.html:58
+#: rhodecode/templates/admin/auth/auth_settings.mako:58
msgid "Add a list of plugins, separated by commas. The order of the plugins is also the order in which RhodeCode Enterprise will try to authenticate a user."
msgstr ""
-#: rhodecode/templates/admin/auth/auth_settings.html:65
+#: rhodecode/templates/admin/auth/auth_settings.mako:65
msgid "Available Built-in Plugins"
msgstr ""
-#: rhodecode/templates/admin/auth/auth_settings.html:81
-#: rhodecode/templates/admin/auth/plugin_settings.html:87
-#: rhodecode/templates/admin/defaults/defaults_repositories.html:63
-#: rhodecode/templates/admin/my_account/my_account_profile_edit.html:103
-#: rhodecode/templates/admin/permissions/permissions_application.html:59
-#: rhodecode/templates/admin/permissions/permissions_objects.html:56
-#: rhodecode/templates/admin/repo_groups/repo_group_add.html:72
-#: rhodecode/templates/admin/repo_groups/repo_group_edit_perms.html:135
-#: rhodecode/templates/admin/repo_groups/repo_group_edit_settings.html:67
-#: rhodecode/templates/admin/repos/repo_add_base.html:90
-#: rhodecode/templates/admin/repos/repo_edit_issuetracker.html:79
-#: rhodecode/templates/admin/repos/repo_edit_permissions.html:110
-#: rhodecode/templates/admin/repos/repo_edit_settings.html:160
-#: rhodecode/templates/admin/settings/settings_hooks.html:63
-#: rhodecode/templates/admin/settings/settings_issuetracker.html:15
-#: rhodecode/templates/admin/user_groups/user_group_add.html:60
-#: rhodecode/templates/admin/user_groups/user_group_edit_perms.html:120
-#: rhodecode/templates/admin/user_groups/user_group_edit_settings.html:102
-#: rhodecode/templates/admin/users/user_add.html:128
-#: rhodecode/templates/admin/users/user_edit_profile.html:134
-#: rhodecode/templates/base/default_perms_box.html:88
+#: rhodecode/templates/admin/auth/auth_settings.mako:81
+#: rhodecode/templates/admin/auth/plugin_settings.mako:87
+#: rhodecode/templates/admin/defaults/defaults_repositories.mako:63
+#: rhodecode/templates/admin/my_account/my_account_profile_edit.mako:106
+#: rhodecode/templates/admin/permissions/permissions_application.mako:59
+#: rhodecode/templates/admin/permissions/permissions_objects.mako:56
+#: rhodecode/templates/admin/repo_groups/repo_group_add.mako:72
+#: rhodecode/templates/admin/repo_groups/repo_group_edit_perms.mako:135
+#: rhodecode/templates/admin/repo_groups/repo_group_edit_settings.mako:67
+#: rhodecode/templates/admin/repos/repo_add_base.mako:90
+#: rhodecode/templates/admin/repos/repo_edit_issuetracker.mako:79
+#: rhodecode/templates/admin/repos/repo_edit_permissions.mako:110
+#: rhodecode/templates/admin/repos/repo_edit_settings.mako:160
+#: rhodecode/templates/admin/settings/settings_hooks.mako:63
+#: rhodecode/templates/admin/settings/settings_issuetracker.mako:15
+#: rhodecode/templates/admin/user_groups/user_group_add.mako:60
+#: rhodecode/templates/admin/user_groups/user_group_edit_perms.mako:120
+#: rhodecode/templates/admin/user_groups/user_group_edit_settings.mako:102
+#: rhodecode/templates/admin/users/user_add.mako:128
+#: rhodecode/templates/admin/users/user_edit_profile.mako:134
+#: rhodecode/templates/base/default_perms_box.mako:88
msgid "Save"
msgstr ""
-#: rhodecode/templates/admin/auth/plugin_settings.html:45
+#: rhodecode/templates/admin/auth/plugin_settings.mako:45
msgid "Plugin"
msgstr ""
-#: rhodecode/templates/admin/defaults/defaults.html:5
-#: rhodecode/templates/admin/defaults/defaults.html:14
+#: rhodecode/templates/admin/defaults/defaults.mako:5
+#: rhodecode/templates/admin/defaults/defaults.mako:14
msgid "Repositories defaults"
msgstr ""
-#: rhodecode/templates/admin/defaults/defaults_repositories.html:3
+#: rhodecode/templates/admin/defaults/defaults_repositories.mako:3
msgid "Default Settings For New Repositories"
msgstr ""
-#: rhodecode/templates/admin/defaults/defaults_repositories.html:14
-#: rhodecode/templates/admin/gists/index.html:110
-#: rhodecode/templates/admin/integrations/list.html:103
-#: rhodecode/templates/admin/repos/repo_add_base.html:64
-#: rhodecode/templates/admin/repos/repo_edit_fields.html:12
+#: rhodecode/templates/admin/defaults/defaults_repositories.mako:14
+#: rhodecode/templates/admin/gists/index.mako:110
+#: rhodecode/templates/admin/integrations/list.mako:103
+#: rhodecode/templates/admin/repos/repo_add_base.mako:64
+#: rhodecode/templates/admin/repos/repo_edit_fields.mako:12
msgid "Type"
msgstr ""
-#: rhodecode/templates/admin/defaults/defaults_repositories.html:23
-#: rhodecode/templates/admin/repos/repo_add_base.html:82
+#: rhodecode/templates/admin/defaults/defaults_repositories.mako:23
+#: rhodecode/templates/admin/repos/repo_add_base.mako:82
msgid "Private Repository"
msgstr ""
-#: rhodecode/templates/admin/defaults/defaults_repositories.html:27
-#: rhodecode/templates/admin/repos/repo_add_base.html:86
-#: rhodecode/templates/admin/repos/repo_edit_settings.html:112
-#: rhodecode/templates/forks/fork.html:87
+#: rhodecode/templates/admin/defaults/defaults_repositories.mako:27
+#: rhodecode/templates/admin/repos/repo_add_base.mako:86
+#: rhodecode/templates/admin/repos/repo_edit_settings.mako:112
+#: rhodecode/templates/forks/fork.mako:87
msgid "Private repositories are only visible to people explicitly added as collaborators."
msgstr ""
-#: rhodecode/templates/admin/defaults/defaults_repositories.html:34
+#: rhodecode/templates/admin/defaults/defaults_repositories.mako:34
msgid "Enable Statistics"
msgstr ""
-#: rhodecode/templates/admin/defaults/defaults_repositories.html:38
+#: rhodecode/templates/admin/defaults/defaults_repositories.mako:38
msgid "Enable a statistics window on the repository summary page."
msgstr ""
-#: rhodecode/templates/admin/defaults/defaults_repositories.html:44
+#: rhodecode/templates/admin/defaults/defaults_repositories.mako:44
msgid "Enable Downloads"
msgstr ""
-#: rhodecode/templates/admin/defaults/defaults_repositories.html:48
+#: rhodecode/templates/admin/defaults/defaults_repositories.mako:48
msgid "Enable the download option on the repository summary page."
msgstr ""
-#: rhodecode/templates/admin/defaults/defaults_repositories.html:54
+#: rhodecode/templates/admin/defaults/defaults_repositories.mako:54
msgid "Enable Locking"
msgstr ""
-#: rhodecode/templates/admin/defaults/defaults_repositories.html:58
+#: rhodecode/templates/admin/defaults/defaults_repositories.mako:58
msgid "Enable automatic repository locking. Pulling from a repository will lock it, and it is unlocked by pushing back by the same user."
msgstr ""
-#: rhodecode/templates/admin/gists/edit.html:5
-#: rhodecode/templates/admin/gists/edit.html:12
+#: rhodecode/templates/admin/gists/edit.mako:5
+#: rhodecode/templates/admin/gists/edit.mako:12
msgid "Edit Gist"
msgstr ""
-#: rhodecode/templates/admin/gists/edit.html:33
-#: rhodecode/templates/admin/gists/new.html:30
+#: rhodecode/templates/admin/gists/edit.mako:33
+#: rhodecode/templates/admin/gists/new.mako:30
msgid "Gist description ..."
msgstr ""
-#: rhodecode/templates/admin/gists/edit.html:38
-#: rhodecode/templates/admin/gists/new.html:38
+#: rhodecode/templates/admin/gists/edit.mako:38
+#: rhodecode/templates/admin/gists/new.mako:38
msgid "Gist lifetime"
msgstr ""
-#: rhodecode/templates/admin/gists/edit.html:41
-#: rhodecode/templates/admin/gists/new.html:41
+#: rhodecode/templates/admin/gists/edit.mako:41
+#: rhodecode/templates/admin/gists/new.mako:41
msgid "Gist access level"
msgstr ""
-#: rhodecode/templates/admin/gists/edit.html:56
-#: rhodecode/templates/admin/gists/new.html:50
-#: rhodecode/templates/files/files_add.html:74
-#: rhodecode/templates/files/files_edit.html:78
+#: rhodecode/templates/admin/gists/edit.mako:56
+#: rhodecode/templates/admin/gists/new.mako:50
+#: rhodecode/templates/files/files_add.mako:74
+#: rhodecode/templates/files/files_edit.mako:78
msgid "plain"
msgstr ""
-#: rhodecode/templates/admin/gists/edit.html:101
+#: rhodecode/templates/admin/gists/edit.mako:101
msgid "Update Gist"
msgstr ""
-#: rhodecode/templates/admin/gists/edit.html:102
-#: rhodecode/templates/base/issue_tracker_settings.html:74
-#: rhodecode/templates/changeset/changeset_file_comment.html:137
-#: rhodecode/templates/codeblocks/diffs.html:84
-#: rhodecode/templates/codeblocks/diffs.html:98
-#: rhodecode/templates/files/files_add.html:102
-#: rhodecode/templates/files/files_delete.html:69
-#: rhodecode/templates/files/files_edit.html:105
+#: rhodecode/templates/admin/gists/edit.mako:102
+#: rhodecode/templates/base/issue_tracker_settings.mako:74
+#: rhodecode/templates/changeset/changeset_file_comment.mako:385
+#: rhodecode/templates/codeblocks/diffs.mako:76
+#: rhodecode/templates/files/files_add.mako:102
+#: rhodecode/templates/files/files_delete.mako:69
+#: rhodecode/templates/files/files_edit.mako:105
+#: rhodecode/templates/pullrequests/pullrequest_show.mako:64
msgid "Cancel"
msgstr ""
-#: rhodecode/templates/admin/gists/edit.html:122
+#: rhodecode/templates/admin/gists/edit.mako:122
#, python-format
msgid "Gist was updated since you started editing. Copy your changes and click %(here)s to reload the new version."
msgstr ""
-#: rhodecode/templates/admin/gists/index.html:6
-#: rhodecode/templates/admin/gists/index.html:20
+#: rhodecode/templates/admin/gists/index.mako:6
+#: rhodecode/templates/admin/gists/index.mako:20
#, python-format
msgid "Private Gists for user %s"
msgstr ""
-#: rhodecode/templates/admin/gists/index.html:8
-#: rhodecode/templates/admin/gists/index.html:22
+#: rhodecode/templates/admin/gists/index.mako:8
+#: rhodecode/templates/admin/gists/index.mako:22
#, python-format
msgid "Public Gists for user %s"
msgstr ""
-#: rhodecode/templates/admin/gists/index.html:10
+#: rhodecode/templates/admin/gists/index.mako:10
msgid "Public Gists"
msgstr ""
-#: rhodecode/templates/admin/gists/index.html:24
+#: rhodecode/templates/admin/gists/index.mako:24
#, python-format
msgid "All Gists for user %s"
msgstr ""
-#: rhodecode/templates/admin/gists/index.html:26
+#: rhodecode/templates/admin/gists/index.mako:26
msgid "All Public Gists"
msgstr ""
-#: rhodecode/templates/admin/gists/index.html:44
-#: rhodecode/templates/admin/gists/show.html:36
+#: rhodecode/templates/admin/gists/index.mako:44
+#: rhodecode/templates/admin/gists/show.mako:36
msgid "Create New Gist"
msgstr ""
-#: rhodecode/templates/admin/gists/index.html:56
+#: rhodecode/templates/admin/gists/index.mako:56
msgid "All gists"
msgstr ""
-#: rhodecode/templates/admin/gists/index.html:58
+#: rhodecode/templates/admin/gists/index.mako:58
msgid "All public"
msgstr ""
-#: rhodecode/templates/admin/gists/index.html:60
+#: rhodecode/templates/admin/gists/index.mako:60
msgid "My gists"
msgstr ""
-#: rhodecode/templates/admin/gists/index.html:61
+#: rhodecode/templates/admin/gists/index.mako:61
msgid "My private"
msgstr ""
-#: rhodecode/templates/admin/gists/index.html:62
+#: rhodecode/templates/admin/gists/index.mako:62
msgid "My public"
msgstr ""
-#: rhodecode/templates/admin/gists/index.html:108
-#: rhodecode/templates/admin/my_account/my_account_pullrequests.html:41
-#: rhodecode/templates/bookmarks/bookmarks.html:63
-#: rhodecode/templates/branches/branches.html:62
-#: rhodecode/templates/changelog/changelog.html:110
-#: rhodecode/templates/changelog/changelog_summary_data.html:11
-#: rhodecode/templates/changeset/changeset.html:163
-#: rhodecode/templates/compare/compare_commits.html:22
-#: rhodecode/templates/files/files_browser_tree.html:9
-#: rhodecode/templates/pullrequests/pullrequest_show.html:198
-#: rhodecode/templates/pullrequests/pullrequests.html:102
-#: rhodecode/templates/search/search_commit.html:16
-#: rhodecode/templates/tags/tags.html:63
+#: rhodecode/templates/admin/gists/index.mako:108
+#: rhodecode/templates/admin/my_account/my_account_pullrequests.mako:41
+#: rhodecode/templates/bookmarks/bookmarks.mako:63
+#: rhodecode/templates/branches/branches.mako:62
+#: rhodecode/templates/changelog/changelog.mako:113
+#: rhodecode/templates/changelog/changelog_summary_data.mako:11
+#: rhodecode/templates/changeset/changeset.mako:180
+#: rhodecode/templates/compare/compare_commits.mako:17
+#: rhodecode/templates/files/files_browser_tree.mako:9
+#: rhodecode/templates/pullrequests/pullrequest_show.mako:304
+#: rhodecode/templates/pullrequests/pullrequest_show.mako:452
+#: rhodecode/templates/pullrequests/pullrequests.mako:102
+#: rhodecode/templates/search/search_commit.mako:16
+#: rhodecode/templates/tags/tags.mako:63
msgid "Author"
msgstr ""
-#: rhodecode/templates/admin/gists/index.html:116
-#: rhodecode/templates/admin/repo_groups/repo_group_edit_advanced.html:6
-#: rhodecode/templates/admin/repos/repo_edit_advanced.html:6
-#: rhodecode/templates/admin/user_groups/user_group_edit_advanced.html:6
-#: rhodecode/templates/admin/users/user_edit_advanced.html:5
+#: rhodecode/templates/admin/gists/index.mako:116
+#: rhodecode/templates/admin/repo_groups/repo_group_edit_advanced.mako:6
+#: rhodecode/templates/admin/repos/repo_edit_advanced.mako:6
+#: rhodecode/templates/admin/user_groups/user_group_edit_advanced.mako:6
+#: rhodecode/templates/admin/users/user_edit_advanced.mako:5
msgid "Created on"
msgstr ""
-#: rhodecode/templates/admin/gists/index.html:118
-#: rhodecode/templates/admin/gists/show.html:65
+#: rhodecode/templates/admin/gists/index.mako:118
+#: rhodecode/templates/admin/gists/show.mako:65
msgid "Expires"
msgstr ""
-#: rhodecode/templates/admin/gists/new.html:5
-#: rhodecode/templates/admin/gists/new.html:12
+#: rhodecode/templates/admin/gists/new.mako:5
+#: rhodecode/templates/admin/gists/new.mako:12
msgid "New Gist"
msgstr ""
-#: rhodecode/templates/admin/gists/new.html:35
+#: rhodecode/templates/admin/gists/new.mako:35
msgid "Gist id"
msgstr ""
-#: rhodecode/templates/admin/gists/new.html:36
+#: rhodecode/templates/admin/gists/new.mako:36
msgid "Auto generated"
msgstr ""
-#: rhodecode/templates/admin/gists/new.html:49
+#: rhodecode/templates/admin/gists/new.mako:49
msgid "name this file..."
msgstr ""
-#: rhodecode/templates/admin/gists/new.html:60
+#: rhodecode/templates/admin/gists/new.mako:60
msgid "Create Private Gist"
msgstr ""
-#: rhodecode/templates/admin/gists/new.html:61
+#: rhodecode/templates/admin/gists/new.mako:61
msgid "Create Public Gist"
msgstr ""
-#: rhodecode/templates/admin/gists/show.html:13
-#: rhodecode/templates/admin/gists/show.html:20
+#: rhodecode/templates/admin/gists/show.mako:13
+#: rhodecode/templates/admin/gists/show.mako:20
msgid "Gist"
msgstr ""
-#: rhodecode/templates/admin/gists/show.html:49
+#: rhodecode/templates/admin/gists/show.mako:49
msgid "Confirm to delete this Gist"
msgstr ""
-#: rhodecode/templates/admin/gists/show.html:56
-#: rhodecode/templates/admin/integrations/list.html:204
-#: rhodecode/templates/admin/my_account/my_account_profile.html:5
-#: rhodecode/templates/base/issue_tracker_settings.html:61
-#: rhodecode/templates/changeset/changeset_file_comment.html:143
-#: rhodecode/templates/changeset/changeset_file_comment.html:267
-#: rhodecode/templates/codeblocks/diffs.html:79
-#: rhodecode/templates/data_table/_dt_elements.html:118
-#: rhodecode/templates/data_table/_dt_elements.html:180
-#: rhodecode/templates/data_table/_dt_elements.html:193
-#: rhodecode/templates/data_table/_dt_elements.html:206
+#: rhodecode/templates/admin/gists/show.mako:56
+#: rhodecode/templates/admin/integrations/list.mako:204
+#: rhodecode/templates/admin/my_account/my_account_profile.mako:5
+#: rhodecode/templates/base/issue_tracker_settings.mako:61
+#: rhodecode/templates/data_table/_dt_elements.mako:118
+#: rhodecode/templates/data_table/_dt_elements.mako:180
+#: rhodecode/templates/data_table/_dt_elements.mako:193
+#: rhodecode/templates/data_table/_dt_elements.mako:206
#: rhodecode/templates/debug_style/buttons.html:128
-#: rhodecode/templates/files/files_add.html:204
-#: rhodecode/templates/files/files_edit.html:165
-#: rhodecode/templates/files/files_source.html:38
-#: rhodecode/templates/files/files_source.html:41
-#: rhodecode/templates/pullrequests/pullrequest_show.html:60
-#: rhodecode/templates/pullrequests/pullrequest_show.html:213
-#: rhodecode/templates/users/user_profile.html:7
+#: rhodecode/templates/files/files_add.mako:204
+#: rhodecode/templates/files/files_edit.mako:165
+#: rhodecode/templates/files/files_source.mako:38
+#: rhodecode/templates/files/files_source.mako:41
+#: rhodecode/templates/pullrequests/pullrequest_show.mako:63
+#: rhodecode/templates/pullrequests/pullrequest_show.mako:319
+#: rhodecode/templates/users/user_profile.mako:7
msgid "Edit"
msgstr ""
-#: rhodecode/templates/admin/gists/show.html:58
+#: rhodecode/templates/admin/gists/show.mako:58
msgid "Show as Raw"
msgstr ""
-#: rhodecode/templates/admin/gists/show.html:62
+#: rhodecode/templates/admin/gists/show.mako:62
msgid "Private Gist"
msgstr ""
-#: rhodecode/templates/admin/gists/show.html:77
+#: rhodecode/templates/admin/gists/show.mako:77
msgid "created"
msgstr ""
-#: rhodecode/templates/admin/gists/show.html:91
-#: rhodecode/templates/files/files_delete.html:50
-#: rhodecode/templates/files/files_source.html:73
+#: rhodecode/templates/admin/gists/show.mako:91
+#: rhodecode/templates/files/files_delete.mako:50
+#: rhodecode/templates/files/files_source.mako:73
msgid "Show as raw"
msgstr ""
-#: rhodecode/templates/admin/integrations/base.html:14
+#: rhodecode/templates/admin/integrations/base.mako:14
msgid "Integrations Settings"
msgstr ""
-#: rhodecode/templates/admin/integrations/form.html:17
-#: rhodecode/templates/admin/integrations/list.html:10
-#: rhodecode/templates/admin/integrations/new.html:13
-#: rhodecode/templates/admin/permissions/permissions_objects.html:28
-#: rhodecode/templates/admin/repo_groups/repo_group_edit.html:14
-#: rhodecode/templates/admin/repo_groups/repo_group_edit_perms.html:127
+#: rhodecode/templates/admin/integrations/form.mako:17
+#: rhodecode/templates/admin/integrations/list.mako:10
+#: rhodecode/templates/admin/integrations/new.mako:13
+#: rhodecode/templates/admin/permissions/permissions_objects.mako:28
+#: rhodecode/templates/admin/repo_groups/repo_group_edit.mako:14
+#: rhodecode/templates/admin/repo_groups/repo_group_edit_perms.mako:127
msgid "Repository Groups"
msgstr ""
-#: rhodecode/templates/admin/integrations/form.html:30
-#: rhodecode/templates/admin/integrations/list.html:16
-#: rhodecode/templates/admin/integrations/new.html:21
-#: rhodecode/templates/admin/repo_groups/repo_group_edit.html:48
-#: rhodecode/templates/admin/repos/repo_edit.html:15
-#: rhodecode/templates/admin/repos/repo_edit.html:43
-#: rhodecode/templates/admin/settings/settings.html:14
-#: rhodecode/templates/admin/user_groups/user_group_edit.html:33
-#: rhodecode/templates/base/base.html:81 rhodecode/templates/base/base.html:246
+#: rhodecode/templates/admin/integrations/form.mako:30
+#: rhodecode/templates/admin/integrations/list.mako:16
+#: rhodecode/templates/admin/integrations/new.mako:21
+#: rhodecode/templates/admin/repo_groups/repo_group_edit.mako:48
+#: rhodecode/templates/admin/repos/repo_edit.mako:15
+#: rhodecode/templates/admin/repos/repo_edit.mako:43
+#: rhodecode/templates/admin/settings/settings.mako:14
+#: rhodecode/templates/admin/user_groups/user_group_edit.mako:33
+#: rhodecode/templates/base/base.mako:81 rhodecode/templates/base/base.mako:246
msgid "Settings"
msgstr ""
-#: rhodecode/templates/admin/integrations/form.html:60
+#: rhodecode/templates/admin/integrations/form.mako:60
#, python-format
msgid "Create New %(integration_type)s Integration"
msgstr ""
-#: rhodecode/templates/admin/integrations/list.html:44
+#: rhodecode/templates/admin/integrations/list.mako:44
msgid "Current Integrations for Repository: {repo_name}"
msgstr ""
-#: rhodecode/templates/admin/integrations/list.html:46
+#: rhodecode/templates/admin/integrations/list.mako:46
msgid "Current Integrations for repository group: {repo_group_name}"
msgstr ""
-#: rhodecode/templates/admin/integrations/list.html:48
+#: rhodecode/templates/admin/integrations/list.mako:48
msgid "Current Integrations"
msgstr ""
-#: rhodecode/templates/admin/integrations/list.html:64
-#: rhodecode/templates/admin/notifications/notifications.html:31
+#: rhodecode/templates/admin/integrations/list.mako:64
+#: rhodecode/templates/admin/notifications/notifications.mako:31
msgid "All"
msgstr ""
-#: rhodecode/templates/admin/integrations/list.html:95
-#: rhodecode/templates/admin/integrations/new.html:26
+#: rhodecode/templates/admin/integrations/list.mako:95
+#: rhodecode/templates/admin/integrations/new.mako:26
msgid "Create new integration"
msgstr ""
-#: rhodecode/templates/admin/integrations/list.html:104
+#: rhodecode/templates/admin/integrations/list.mako:104
msgid "Scope"
msgstr ""
-#: rhodecode/templates/admin/integrations/list.html:105
+#: rhodecode/templates/admin/integrations/list.mako:105
+#: rhodecode/templates/compare/compare_diff.mako:92
msgid "Actions"
msgstr ""
-#: rhodecode/templates/admin/integrations/list.html:115
+#: rhodecode/templates/admin/integrations/list.mako:115
msgid "No {type} integrations for repo {repo} exist yet."
msgstr ""
-#: rhodecode/templates/admin/integrations/list.html:117
+#: rhodecode/templates/admin/integrations/list.mako:117
msgid "No {type} integrations for repogroup {repogroup} exist yet."
msgstr ""
-#: rhodecode/templates/admin/integrations/list.html:119
+#: rhodecode/templates/admin/integrations/list.mako:119
msgid "No {type} integrations exist yet."
msgstr ""
-#: rhodecode/templates/admin/integrations/list.html:133
+#: rhodecode/templates/admin/integrations/list.mako:133
msgid "Create one"
msgstr ""
-#: rhodecode/templates/admin/integrations/list.html:164
+#: rhodecode/templates/admin/integrations/list.mako:164
msgid "repo"
msgstr ""
-#: rhodecode/templates/admin/integrations/list.html:168
+#: rhodecode/templates/admin/integrations/list.mako:168
msgid "repogroup"
msgstr ""
-#: rhodecode/templates/admin/integrations/list.html:170
+#: rhodecode/templates/admin/integrations/list.mako:170
msgid "child repos only"
msgstr ""
-#: rhodecode/templates/admin/integrations/list.html:172
+#: rhodecode/templates/admin/integrations/list.mako:172
msgid "cascade to all"
msgstr ""
-#: rhodecode/templates/admin/integrations/list.html:177
+#: rhodecode/templates/admin/integrations/list.mako:177
msgid "top level repos only"
msgstr ""
-#: rhodecode/templates/admin/integrations/list.html:179
+#: rhodecode/templates/admin/integrations/list.mako:179
msgid "global"
msgstr ""
-#: rhodecode/templates/admin/integrations/list.html:185
+#: rhodecode/templates/admin/integrations/list.mako:185
msgid "unknown integration"
msgstr ""
-#: rhodecode/templates/admin/integrations/new.html:31
+#: rhodecode/templates/admin/integrations/new.mako:31
msgid "Create New Integration for repository: {repo_name}"
msgstr ""
-#: rhodecode/templates/admin/integrations/new.html:33
+#: rhodecode/templates/admin/integrations/new.mako:33
msgid "Create New Integration for repository group: {repo_group_name}"
msgstr ""
-#: rhodecode/templates/admin/integrations/new.html:35
+#: rhodecode/templates/admin/integrations/new.mako:35
msgid "Create New Global Integration"
msgstr ""
-#: rhodecode/templates/admin/integrations/new.html:61
+#: rhodecode/templates/admin/integrations/new.mako:61
msgid "No description available"
msgstr ""
-#: rhodecode/templates/admin/my_account/my_account.html:5
-#: rhodecode/templates/base/base.html:340
+#: rhodecode/templates/admin/my_account/my_account.mako:5
+#: rhodecode/templates/base/base.mako:340
msgid "My account"
msgstr ""
-#: rhodecode/templates/admin/my_account/my_account.html:12
+#: rhodecode/templates/admin/my_account/my_account.mako:12
msgid "My Account"
msgstr ""
-#: rhodecode/templates/admin/my_account/my_account.html:29
-#: rhodecode/templates/admin/my_account/my_account_profile.html:4
-#: rhodecode/templates/admin/my_account/my_account_profile_edit.html:4
+#: rhodecode/templates/admin/my_account/my_account.mako:29
+#: rhodecode/templates/admin/my_account/my_account_profile.mako:4
+#: rhodecode/templates/admin/my_account/my_account_profile_edit.mako:4
msgid "My Profile"
msgstr ""
-#: rhodecode/templates/admin/my_account/my_account.html:31
+#: rhodecode/templates/admin/my_account/my_account.mako:31
msgid "Auth Tokens"
msgstr ""
-#: rhodecode/templates/admin/my_account/my_account.html:35
+#: rhodecode/templates/admin/my_account/my_account.mako:35
msgid "OAuth Identities"
msgstr ""
-#: rhodecode/templates/admin/my_account/my_account.html:37
+#: rhodecode/templates/admin/my_account/my_account.mako:37
msgid "My Emails"
msgstr ""
-#: rhodecode/templates/admin/my_account/my_account.html:38
+#: rhodecode/templates/admin/my_account/my_account.mako:38
msgid "My Repositories"
msgstr ""
-#: rhodecode/templates/admin/my_account/my_account.html:39
+#: rhodecode/templates/admin/my_account/my_account.mako:39
msgid "Watched"
msgstr ""
-#: rhodecode/templates/admin/my_account/my_account.html:40
-#: rhodecode/templates/admin/notifications/notifications.html:33
-#: rhodecode/templates/base/base.html:238
+#: rhodecode/templates/admin/my_account/my_account.mako:40
+#: rhodecode/templates/admin/notifications/notifications.mako:33
+#: rhodecode/templates/base/base.mako:238
msgid "Pull Requests"
msgstr ""
-#: rhodecode/templates/admin/my_account/my_account.html:41
+#: rhodecode/templates/admin/my_account/my_account.mako:41
msgid "My Permissions"
msgstr ""
-#: rhodecode/templates/admin/my_account/my_account.html:42
+#: rhodecode/templates/admin/my_account/my_account.mako:42
msgid "My Live Notifications"
msgstr ""
-#: rhodecode/templates/admin/my_account/my_account_auth_tokens.html:3
+#: rhodecode/templates/admin/my_account/my_account_auth_tokens.mako:3
msgid "Authentication Tokens"
msgstr ""
-#: rhodecode/templates/admin/my_account/my_account_auth_tokens.html:7
+#: rhodecode/templates/admin/my_account/my_account_auth_tokens.mako:7
msgid "Built-in tokens can be used to authenticate with all possible options."
msgstr ""
-#: rhodecode/templates/admin/my_account/my_account_auth_tokens.html:8
+#: rhodecode/templates/admin/my_account/my_account_auth_tokens.mako:8
msgid "Each token can have a role. VCS tokens can be used together with the authtoken auth plugin for git/hg/svn operations."
msgstr ""
-#: rhodecode/templates/admin/my_account/my_account_auth_tokens.html:14
-#: rhodecode/templates/admin/users/user_edit_auth_tokens.html:11
+#: rhodecode/templates/admin/my_account/my_account_auth_tokens.mako:14
+#: rhodecode/templates/admin/users/user_edit_auth_tokens.mako:11
msgid "Built-in"
msgstr ""
-#: rhodecode/templates/admin/my_account/my_account_auth_tokens.html:19
-#: rhodecode/templates/admin/my_account/my_account_auth_tokens.html:42
-#: rhodecode/templates/admin/my_account/my_account_auth_tokens.html:47
-#: rhodecode/templates/admin/users/user_edit_auth_tokens.html:16
-#: rhodecode/templates/admin/users/user_edit_auth_tokens.html:38
-#: rhodecode/templates/admin/users/user_edit_auth_tokens.html:43
+#: rhodecode/templates/admin/my_account/my_account_auth_tokens.mako:23
+#: rhodecode/templates/admin/my_account/my_account_auth_tokens.mako:46
+#: rhodecode/templates/admin/my_account/my_account_auth_tokens.mako:51
+#: rhodecode/templates/admin/users/user_edit_auth_tokens.mako:20
+#: rhodecode/templates/admin/users/user_edit_auth_tokens.mako:42
+#: rhodecode/templates/admin/users/user_edit_auth_tokens.mako:47
msgid "expires"
msgstr ""
-#: rhodecode/templates/admin/my_account/my_account_auth_tokens.html:25
-#: rhodecode/templates/admin/users/user_edit_auth_tokens.html:22
+#: rhodecode/templates/admin/my_account/my_account_auth_tokens.mako:29
+#: rhodecode/templates/admin/users/user_edit_auth_tokens.mako:26
#, python-format
msgid "Confirm to reset this auth token: %s"
msgstr ""
-#: rhodecode/templates/admin/my_account/my_account_auth_tokens.html:45
-#: rhodecode/templates/admin/users/user_edit_auth_tokens.html:41
+#: rhodecode/templates/admin/my_account/my_account_auth_tokens.mako:49
+#: rhodecode/templates/admin/users/user_edit_auth_tokens.mako:45
msgid "expired"
msgstr ""
-#: rhodecode/templates/admin/my_account/my_account_auth_tokens.html:55
-#: rhodecode/templates/admin/users/user_edit_auth_tokens.html:51
+#: rhodecode/templates/admin/my_account/my_account_auth_tokens.mako:59
+#: rhodecode/templates/admin/users/user_edit_auth_tokens.mako:55
#, python-format
msgid "Confirm to remove this auth token: %s"
msgstr ""
-#: rhodecode/templates/admin/my_account/my_account_auth_tokens.html:63
+#: rhodecode/templates/admin/my_account/my_account_auth_tokens.mako:67
msgid "No additional auth token specified"
msgstr ""
-#: rhodecode/templates/admin/my_account/my_account_auth_tokens.html:74
+#: rhodecode/templates/admin/my_account/my_account_auth_tokens.mako:78
msgid "New authentication token"
msgstr ""
-#: rhodecode/templates/admin/my_account/my_account_auth_tokens.html:83
-#: rhodecode/templates/admin/my_account/my_account_emails.html:64
-#: rhodecode/templates/admin/permissions/permissions_ips.html:60
-#: rhodecode/templates/admin/repos/repo_edit_fields.html:65
-#: rhodecode/templates/admin/users/user_edit_auth_tokens.html:80
-#: rhodecode/templates/admin/users/user_edit_emails.html:62
-#: rhodecode/templates/admin/users/user_edit_ips.html:69
+#: rhodecode/templates/admin/my_account/my_account_auth_tokens.mako:87
+#: rhodecode/templates/admin/my_account/my_account_emails.mako:64
+#: rhodecode/templates/admin/permissions/permissions_ips.mako:60
+#: rhodecode/templates/admin/repos/repo_edit_fields.mako:65
+#: rhodecode/templates/admin/users/user_edit_auth_tokens.mako:84
+#: rhodecode/templates/admin/users/user_edit_emails.mako:62
+#: rhodecode/templates/admin/users/user_edit_ips.mako:69
msgid "Add"
msgstr ""
-#: rhodecode/templates/admin/my_account/my_account_emails.html:5
+#: rhodecode/templates/admin/my_account/my_account_emails.mako:5
msgid "Account Emails"
msgstr ""
-#: rhodecode/templates/admin/my_account/my_account_emails.html:17
-#: rhodecode/templates/admin/users/user_edit_emails.html:16
+#: rhodecode/templates/admin/my_account/my_account_emails.mako:17
+#: rhodecode/templates/admin/users/user_edit_emails.mako:16
msgid "Primary"
msgstr ""
-#: rhodecode/templates/admin/my_account/my_account_emails.html:31
-#: rhodecode/templates/admin/users/user_edit_emails.html:30
+#: rhodecode/templates/admin/my_account/my_account_emails.mako:31
+#: rhodecode/templates/admin/users/user_edit_emails.mako:30
#, python-format
msgid "Confirm to delete this email: %s"
msgstr ""
-#: rhodecode/templates/admin/my_account/my_account_emails.html:42
-#: rhodecode/templates/admin/users/user_edit_emails.html:41
+#: rhodecode/templates/admin/my_account/my_account_emails.mako:42
+#: rhodecode/templates/admin/users/user_edit_emails.mako:41
msgid "No additional emails specified"
msgstr ""
-#: rhodecode/templates/admin/my_account/my_account_emails.html:57
-#: rhodecode/templates/admin/users/user_edit_emails.html:55
+#: rhodecode/templates/admin/my_account/my_account_emails.mako:57
+#: rhodecode/templates/admin/users/user_edit_emails.mako:55
msgid "New email address"
msgstr ""
-#: rhodecode/templates/admin/my_account/my_account_notifications.html:12
+#: rhodecode/templates/admin/my_account/my_account_notifications.mako:21
msgid "Your Live Notification Settings"
msgstr ""
-#: rhodecode/templates/admin/my_account/my_account_notifications.html:24
+#: rhodecode/templates/admin/my_account/my_account_notifications.mako:33
msgid "Notifications Status"
msgstr ""
-#: rhodecode/templates/admin/my_account/my_account_password.html:3
+#: rhodecode/templates/admin/my_account/my_account_notifications.mako:46
+msgid "Test Notifications"
+msgstr ""
+
+#: rhodecode/templates/admin/my_account/my_account_password.mako:3
msgid "Change Your Account Password"
msgstr ""
-#: rhodecode/templates/admin/my_account/my_account_profile.html:11
-#: rhodecode/templates/admin/my_account/my_account_profile_edit.html:52
-#: rhodecode/templates/admin/users/user_edit_profile.html:25
-#: rhodecode/templates/users/user_profile.html:14
+#: rhodecode/templates/admin/my_account/my_account_password.mako:6
+#: rhodecode/templates/admin/my_account/my_account_profile_edit.mako:18
+msgid "Your user account details are managed by an external source. Details cannot be managed here."
+msgstr ""
+
+#: rhodecode/templates/admin/my_account/my_account_password.mako:7
+#: rhodecode/templates/admin/my_account/my_account_profile_edit.mako:19
+msgid "Source type"
+msgstr ""
+
+#: rhodecode/templates/admin/my_account/my_account_profile.mako:11
+#: rhodecode/templates/admin/my_account/my_account_profile_edit.mako:55
+#: rhodecode/templates/admin/users/user_edit_profile.mako:25
+#: rhodecode/templates/users/user_profile.mako:14
msgid "Photo"
msgstr ""
-#: rhodecode/templates/admin/my_account/my_account_profile.html:18
-#: rhodecode/templates/admin/my_account/my_account_profile_edit.html:60
-#: rhodecode/templates/admin/users/user_edit_profile.html:33
-#: rhodecode/templates/users/user_profile.html:21
+#: rhodecode/templates/admin/my_account/my_account_profile.mako:18
+#: rhodecode/templates/admin/my_account/my_account_profile_edit.mako:63
+#: rhodecode/templates/admin/users/user_edit_profile.mako:33
+#: rhodecode/templates/users/user_profile.mako:21
msgid "Avatars are disabled"
msgstr ""
-#: rhodecode/templates/admin/my_account/my_account_profile.html:51
-#: rhodecode/templates/users/user_profile.html:54
+#: rhodecode/templates/admin/my_account/my_account_profile.mako:51
+#: rhodecode/templates/users/user_profile.mako:54
msgid "Missing email, please update your user email address."
msgstr ""
-#: rhodecode/templates/admin/my_account/my_account_profile_edit.html:18
-msgid "Your user account details are managed by an external source, i.e. LDAP. Details cannot be managed here."
-msgstr ""
-
-#: rhodecode/templates/admin/my_account/my_account_profile_edit.html:57
+#: rhodecode/templates/admin/my_account/my_account_profile_edit.mako:60
msgid "Change your avatar at"
msgstr ""
-#: rhodecode/templates/admin/my_account/my_account_pullrequests.html:6
-#: rhodecode/templates/admin/my_account/my_account_pullrequests.html:8
+#: rhodecode/templates/admin/my_account/my_account_pullrequests.mako:6
+#: rhodecode/templates/admin/my_account/my_account_pullrequests.mako:8
msgid "Show Closed Pull Requests"
msgstr ""
-#: rhodecode/templates/admin/my_account/my_account_pullrequests.html:15
+#: rhodecode/templates/admin/my_account/my_account_pullrequests.mako:15
msgid "Pull Requests You Participate In"
msgstr ""
-#: rhodecode/templates/admin/my_account/my_account_pullrequests.html:37
+#: rhodecode/templates/admin/my_account/my_account_pullrequests.mako:37
msgid "Target Repo"
msgstr ""
-#: rhodecode/templates/admin/my_account/my_account_pullrequests.html:43
-#: rhodecode/templates/admin/settings/settings_global.html:9
+#: rhodecode/templates/admin/my_account/my_account_pullrequests.mako:43
+#: rhodecode/templates/admin/settings/settings_global.mako:9
#: rhodecode/templates/email_templates/pull_request_review.mako:39
#: rhodecode/templates/email_templates/pull_request_review.mako:72
-#: rhodecode/templates/pullrequests/pullrequest.html:38
-#: rhodecode/templates/pullrequests/pullrequests.html:104
+#: rhodecode/templates/pullrequests/pullrequest.mako:38
+#: rhodecode/templates/pullrequests/pullrequests.mako:104
msgid "Title"
msgstr ""
-#: rhodecode/templates/admin/my_account/my_account_pullrequests.html:47
-#: rhodecode/templates/pullrequests/pullrequests.html:108
+#: rhodecode/templates/admin/my_account/my_account_pullrequests.mako:47
+#: rhodecode/templates/pullrequests/pullrequests.mako:108
msgid "Last Update"
msgstr ""
-#: rhodecode/templates/admin/my_account/my_account_repos.html:3
+#: rhodecode/templates/admin/my_account/my_account_repos.mako:3
msgid "Repositories You Own"
msgstr ""
-#: rhodecode/templates/admin/my_account/my_account_watched.html:3
+#: rhodecode/templates/admin/my_account/my_account_watched.mako:3
msgid "Your Watched Repositories"
msgstr ""
-#: rhodecode/templates/admin/notifications/notifications.html:5
-#: rhodecode/templates/admin/notifications/notifications.html:12
+#: rhodecode/templates/admin/notifications/notifications.mako:5
+#: rhodecode/templates/admin/notifications/notifications.mako:12
msgid "My Notifications"
msgstr ""
-#: rhodecode/templates/admin/notifications/notifications.html:32
-#: rhodecode/templates/changeset/changeset.html:140
-#: rhodecode/templates/pullrequests/pullrequest_show.html:162
+#: rhodecode/templates/admin/notifications/notifications.mako:32
+#: rhodecode/templates/changeset/changeset.mako:140
msgid "Comments"
msgstr ""
-#: rhodecode/templates/admin/notifications/notifications.html:37
+#: rhodecode/templates/admin/notifications/notifications.mako:37
msgid "Mark all as read"
msgstr ""
-#: rhodecode/templates/admin/notifications/notifications_data.html:39
+#: rhodecode/templates/admin/notifications/notifications_data.mako:39
msgid "No notifications here yet"
msgstr ""
-#: rhodecode/templates/admin/notifications/show_notification.html:5
-#: rhodecode/templates/admin/notifications/show_notification.html:14
+#: rhodecode/templates/admin/notifications/show_notification.mako:5
+#: rhodecode/templates/admin/notifications/show_notification.mako:14
msgid "Show notification"
msgstr ""
-#: rhodecode/templates/admin/notifications/show_notification.html:12
+#: rhodecode/templates/admin/notifications/show_notification.mako:12
msgid "Notifications"
msgstr ""
-#: rhodecode/templates/admin/permissions/permissions.html:5
+#: rhodecode/templates/admin/permissions/permissions.mako:5
msgid "Permissions Administration"
msgstr ""
-#: rhodecode/templates/admin/permissions/permissions.html:14
-#: rhodecode/templates/admin/repo_groups/repo_group_edit.html:49
-#: rhodecode/templates/admin/repos/repo_edit.html:46
-#: rhodecode/templates/admin/user_groups/user_group_edit.html:34
-#: rhodecode/templates/base/base.html:77
+#: rhodecode/templates/admin/permissions/permissions.mako:14
+#: rhodecode/templates/admin/repo_groups/repo_group_edit.mako:49
+#: rhodecode/templates/admin/repos/repo_edit.mako:46
+#: rhodecode/templates/admin/user_groups/user_group_edit.mako:34
+#: rhodecode/templates/base/base.mako:77
msgid "Permissions"
msgstr ""
-#: rhodecode/templates/admin/permissions/permissions.html:33
+#: rhodecode/templates/admin/permissions/permissions.mako:33
msgid "Application"
msgstr ""
-#: rhodecode/templates/admin/permissions/permissions.html:39
+#: rhodecode/templates/admin/permissions/permissions.mako:39
msgid "Object"
msgstr ""
-#: rhodecode/templates/admin/permissions/permissions.html:42
+#: rhodecode/templates/admin/permissions/permissions.mako:42
msgid "IP Whitelist"
msgstr ""
-#: rhodecode/templates/admin/permissions/permissions.html:45
+#: rhodecode/templates/admin/permissions/permissions.mako:45
msgid "Overview"
msgstr ""
-#: rhodecode/templates/admin/permissions/permissions_application.html:3
+#: rhodecode/templates/admin/permissions/permissions_application.mako:3
msgid "System Wide Application Permissions"
msgstr ""
-#: rhodecode/templates/admin/permissions/permissions_application.html:12
+#: rhodecode/templates/admin/permissions/permissions_application.mako:12
msgid "Anonymous Access"
msgstr ""
-#: rhodecode/templates/admin/permissions/permissions_application.html:18
+#: rhodecode/templates/admin/permissions/permissions_application.mako:18
#, python-format
msgid "Allow access to RhodeCode Enterprise without requiring users to login. Anonymous users get the %s permission settings."
msgstr ""
-#: rhodecode/templates/admin/permissions/permissions_application.html:24
+#: rhodecode/templates/admin/permissions/permissions_application.mako:24
msgid "Registration"
msgstr ""
-#: rhodecode/templates/admin/permissions/permissions_application.html:33
+#: rhodecode/templates/admin/permissions/permissions_application.mako:33
msgid "Password Reset"
msgstr ""
-#: rhodecode/templates/admin/permissions/permissions_application.html:42
+#: rhodecode/templates/admin/permissions/permissions_application.mako:42
msgid "Registration Page Message"
msgstr ""
-#: rhodecode/templates/admin/permissions/permissions_application.html:46
+#: rhodecode/templates/admin/permissions/permissions_application.mako:46
msgid "Custom message to be displayed on the registration page. HTML syntax is supported."
msgstr ""
-#: rhodecode/templates/admin/permissions/permissions_application.html:52
+#: rhodecode/templates/admin/permissions/permissions_application.mako:52
msgid "External Authentication Account Activation"
msgstr ""
-#: rhodecode/templates/admin/permissions/permissions_ips.html:5
+#: rhodecode/templates/admin/permissions/permissions_ips.mako:5
msgid "Default IP Whitelist For All Users"
msgstr ""
-#: rhodecode/templates/admin/permissions/permissions_ips.html:27
-#: rhodecode/templates/admin/users/user_edit_ips.html:35
+#: rhodecode/templates/admin/permissions/permissions_ips.mako:27
+#: rhodecode/templates/admin/users/user_edit_ips.mako:35
#, python-format
msgid "Confirm to delete this ip: %s"
msgstr ""
-#: rhodecode/templates/admin/permissions/permissions_ips.html:34
-#: rhodecode/templates/admin/users/user_edit_ips.html:43
+#: rhodecode/templates/admin/permissions/permissions_ips.mako:34
+#: rhodecode/templates/admin/users/user_edit_ips.mako:43
msgid "All IP addresses are allowed"
msgstr ""
-#: rhodecode/templates/admin/permissions/permissions_ips.html:49
-#: rhodecode/templates/admin/users/user_edit_ips.html:59
+#: rhodecode/templates/admin/permissions/permissions_ips.mako:49
+#: rhodecode/templates/admin/users/user_edit_ips.mako:59
msgid "New IP Address"
msgstr ""
-#: rhodecode/templates/admin/permissions/permissions_ips.html:53
-#: rhodecode/templates/admin/users/user_edit_ips.html:62
+#: rhodecode/templates/admin/permissions/permissions_ips.mako:53
+#: rhodecode/templates/admin/users/user_edit_ips.mako:62
msgid "Description..."
msgstr ""
-#: rhodecode/templates/admin/permissions/permissions_ips.html:54
+#: rhodecode/templates/admin/permissions/permissions_ips.mako:54
msgid ""
"Enter a comma separated list of IP Addresses like 127.0.0.1,\n"
"or use an IP Address with a mask 127.0.0.1/24, to create a network range.\n"
"To specify multiple addresses in a range, use the 127.0.0.1-127.0.0.10 syntax"
msgstr ""
-#: rhodecode/templates/admin/permissions/permissions_objects.html:3
+#: rhodecode/templates/admin/permissions/permissions_objects.mako:3
msgid "Default Permissions for Repositories, User Groups and Repository Groups."
msgstr ""
-#: rhodecode/templates/admin/permissions/permissions_objects.html:6
+#: rhodecode/templates/admin/permissions/permissions_objects.mako:6
msgid "Default system permissions. Each permissions management entity will be created with the following default settings. Check the overwrite checkbox to force any permission changes on already existing settings."
msgstr ""
-#: rhodecode/templates/admin/permissions/permissions_objects.html:20
+#: rhodecode/templates/admin/permissions/permissions_objects.mako:20
msgid "All default permissions on each repository will be reset to chosen permission, note that all custom default permission on repositories will be lost"
msgstr ""
-#: rhodecode/templates/admin/permissions/permissions_objects.html:21
-#: rhodecode/templates/admin/permissions/permissions_objects.html:35
-#: rhodecode/templates/admin/permissions/permissions_objects.html:49
+#: rhodecode/templates/admin/permissions/permissions_objects.mako:21
+#: rhodecode/templates/admin/permissions/permissions_objects.mako:35
+#: rhodecode/templates/admin/permissions/permissions_objects.mako:49
msgid "Overwrite Existing Settings"
msgstr ""
-#: rhodecode/templates/admin/permissions/permissions_objects.html:34
+#: rhodecode/templates/admin/permissions/permissions_objects.mako:34
msgid "All default permissions on each repository group will be reset to chosen permission, note that all custom default permission on repository groups will be lost"
msgstr ""
-#: rhodecode/templates/admin/permissions/permissions_objects.html:42
-#: rhodecode/templates/admin/user_groups/user_group_edit.html:14
+#: rhodecode/templates/admin/permissions/permissions_objects.mako:42
+#: rhodecode/templates/admin/user_groups/user_group_edit.mako:14
msgid "User Groups"
msgstr ""
-#: rhodecode/templates/admin/permissions/permissions_objects.html:48
+#: rhodecode/templates/admin/permissions/permissions_objects.mako:48
msgid "All default permissions on each user group will be reset to chosen permission, note that all custom default permission on repository groups will be lost"
msgstr ""
-#: rhodecode/templates/admin/permissions/permissions_perms.html:1
+#: rhodecode/templates/admin/permissions/permissions_perms.mako:1
msgid "Default User Permissions Overview"
msgstr ""
-#: rhodecode/templates/admin/repo_groups/repo_group_add.html:5
+#: rhodecode/templates/admin/repo_groups/repo_group_add.mako:5
msgid "Add repository group"
msgstr ""
-#: rhodecode/templates/admin/repo_groups/repo_group_add.html:14
-#: rhodecode/templates/admin/users/user_edit_advanced.html:12
-#: rhodecode/templates/base/base.html:74 rhodecode/templates/base/base.html:148
+#: rhodecode/templates/admin/repo_groups/repo_group_add.mako:14
+#: rhodecode/templates/admin/users/user_edit_advanced.mako:12
+#: rhodecode/templates/base/base.mako:74 rhodecode/templates/base/base.mako:148
msgid "Repository groups"
msgstr ""
-#: rhodecode/templates/admin/repo_groups/repo_group_add.html:36
-#: rhodecode/templates/admin/repo_groups/repo_group_edit_settings.html:15
+#: rhodecode/templates/admin/repo_groups/repo_group_add.mako:36
+#: rhodecode/templates/admin/repo_groups/repo_group_edit_settings.mako:15
msgid "Group Name"
msgstr ""
-#: rhodecode/templates/admin/repo_groups/repo_group_add.html:54
+#: rhodecode/templates/admin/repo_groups/repo_group_add.mako:54
msgid "Group Parent"
msgstr ""
-#: rhodecode/templates/admin/repo_groups/repo_group_add.html:63
-#: rhodecode/templates/admin/repos/repo_add_base.html:55
+#: rhodecode/templates/admin/repo_groups/repo_group_add.mako:63
+#: rhodecode/templates/admin/repos/repo_add_base.mako:55
msgid "Copy Parent Group Permissions"
msgstr ""
-#: rhodecode/templates/admin/repo_groups/repo_group_add.html:67
+#: rhodecode/templates/admin/repo_groups/repo_group_add.mako:67
msgid "Copy permission settings from parent repository group."
msgstr ""
-#: rhodecode/templates/admin/repo_groups/repo_group_edit.html:5
+#: rhodecode/templates/admin/repo_groups/repo_group_edit.mako:5
#, python-format
msgid "%s repository group settings"
msgstr ""
-#: rhodecode/templates/admin/repo_groups/repo_group_edit.html:24
+#: rhodecode/templates/admin/repo_groups/repo_group_edit.mako:24
msgid "Add Child Group"
msgstr ""
-#: rhodecode/templates/admin/repo_groups/repo_group_edit.html:50
-#: rhodecode/templates/admin/repos/repo_edit.html:49
-#: rhodecode/templates/admin/user_groups/user_group_edit.html:35
-#: rhodecode/templates/admin/users/user_edit.html:35
+#: rhodecode/templates/admin/repo_groups/repo_group_edit.mako:50
+#: rhodecode/templates/admin/repos/repo_edit.mako:49
+#: rhodecode/templates/admin/user_groups/user_group_edit.mako:35
+#: rhodecode/templates/admin/users/user_edit.mako:35
msgid "Advanced"
msgstr ""
-#: rhodecode/templates/admin/repo_groups/repo_group_edit_advanced.html:7
+#: rhodecode/templates/admin/repo_groups/repo_group_edit_advanced.mako:7
msgid "Is Personal Group"
msgstr ""
-#: rhodecode/templates/admin/repo_groups/repo_group_edit_advanced.html:9
+#: rhodecode/templates/admin/repo_groups/repo_group_edit_advanced.mako:9
msgid "Total repositories"
msgstr ""
-#: rhodecode/templates/admin/repo_groups/repo_group_edit_advanced.html:10
+#: rhodecode/templates/admin/repo_groups/repo_group_edit_advanced.mako:10
msgid "Top level repositories"
msgstr ""
-#: rhodecode/templates/admin/repo_groups/repo_group_edit_advanced.html:12
+#: rhodecode/templates/admin/repo_groups/repo_group_edit_advanced.mako:12
msgid "Children groups"
msgstr ""
-#: rhodecode/templates/admin/repo_groups/repo_group_edit_advanced.html:18
+#: rhodecode/templates/admin/repo_groups/repo_group_edit_advanced.mako:18
#, python-format
msgid "Repository Group: %s"
msgstr ""
-#: rhodecode/templates/admin/repo_groups/repo_group_edit_advanced.html:28
+#: rhodecode/templates/admin/repo_groups/repo_group_edit_advanced.mako:28
msgid "Delete repository group"
msgstr ""
-#: rhodecode/templates/admin/repo_groups/repo_group_edit_advanced.html:36
+#: rhodecode/templates/admin/repo_groups/repo_group_edit_advanced.mako:36
#, python-format
msgid "This repository group includes %s children repository group."
msgid_plural "This repository group includes %s children repository groups."
msgstr[0] ""
msgstr[1] ""
-#: rhodecode/templates/admin/repo_groups/repo_group_edit_advanced.html:45
+#: rhodecode/templates/admin/repo_groups/repo_group_edit_advanced.mako:45
#, python-format
msgid "This repository group includes %s repository."
msgid_plural "This repository group includes %s repositories."
msgstr[0] ""
msgstr[1] ""
-#: rhodecode/templates/admin/repo_groups/repo_group_edit_advanced.html:57
+#: rhodecode/templates/admin/repo_groups/repo_group_edit_advanced.mako:57
#, python-format
msgid "Confirm to delete this group: %s"
msgstr ""
-#: rhodecode/templates/admin/repo_groups/repo_group_edit_advanced.html:58
+#: rhodecode/templates/admin/repo_groups/repo_group_edit_advanced.mako:58
msgid "Delete this repository group"
msgstr ""
-#: rhodecode/templates/admin/repo_groups/repo_group_edit_perms.html:5
+#: rhodecode/templates/admin/repo_groups/repo_group_edit_perms.mako:5
msgid "Repository Group Permissions"
msgstr ""
-#: rhodecode/templates/admin/repo_groups/repo_group_edit_perms.html:15
-#: rhodecode/templates/admin/repos/repo_edit_permissions.html:16
-#: rhodecode/templates/admin/user_groups/user_group_edit_perms.html:15
+#: rhodecode/templates/admin/repo_groups/repo_group_edit_perms.mako:15
+#: rhodecode/templates/admin/repos/repo_edit_permissions.mako:16
+#: rhodecode/templates/admin/user_groups/user_group_edit_perms.mako:15
msgid "User/User Group"
msgstr ""
-#: rhodecode/templates/admin/repo_groups/repo_group_edit_perms.html:31
-#: rhodecode/templates/admin/repos/repo_edit_permissions.html:31
-#: rhodecode/templates/admin/user_groups/user_group_edit_perms.html:31
+#: rhodecode/templates/admin/repo_groups/repo_group_edit_perms.mako:31
+#: rhodecode/templates/admin/repos/repo_edit_permissions.mako:31
+#: rhodecode/templates/admin/user_groups/user_group_edit_perms.mako:31
msgid "super admin"
msgstr ""
-#: rhodecode/templates/admin/repo_groups/repo_group_edit_perms.html:34
-#: rhodecode/templates/admin/repos/repo_edit_permissions.html:34
-#: rhodecode/templates/admin/user_groups/user_group_edit_perms.html:34
+#: rhodecode/templates/admin/repo_groups/repo_group_edit_perms.mako:34
+#: rhodecode/templates/admin/repos/repo_edit_permissions.mako:34
+#: rhodecode/templates/admin/user_groups/user_group_edit_perms.mako:34
msgid "owner"
msgstr ""
-#: rhodecode/templates/admin/repo_groups/repo_group_edit_perms.html:52
-#: rhodecode/templates/admin/repo_groups/repo_group_edit_perms.html:76
-#: rhodecode/templates/admin/repos/repo_edit_permissions.html:61
-#: rhodecode/templates/admin/user_groups/user_group_edit_perms.html:52
-#: rhodecode/templates/admin/user_groups/user_group_edit_perms.html:76
+#: rhodecode/templates/admin/repo_groups/repo_group_edit_perms.mako:52
+#: rhodecode/templates/admin/repo_groups/repo_group_edit_perms.mako:76
+#: rhodecode/templates/admin/repos/repo_edit_permissions.mako:61
+#: rhodecode/templates/admin/user_groups/user_group_edit_perms.mako:52
+#: rhodecode/templates/admin/user_groups/user_group_edit_perms.mako:76
msgid "permission for all other users"
msgstr ""
-#: rhodecode/templates/admin/repo_groups/repo_group_edit_perms.html:62
-#: rhodecode/templates/admin/repo_groups/repo_group_edit_perms.html:109
-#: rhodecode/templates/admin/repos/repo_edit_permissions.html:71
-#: rhodecode/templates/admin/repos/repo_edit_permissions.html:99
+#: rhodecode/templates/admin/repo_groups/repo_group_edit_perms.mako:62
+#: rhodecode/templates/admin/repo_groups/repo_group_edit_perms.mako:109
+#: rhodecode/templates/admin/repos/repo_edit_permissions.mako:71
+#: rhodecode/templates/admin/repos/repo_edit_permissions.mako:99
msgid "Revoke"
msgstr ""
-#: rhodecode/templates/admin/repo_groups/repo_group_edit_perms.html:80
-#: rhodecode/templates/admin/user_groups/user_group_edit_perms.html:80
+#: rhodecode/templates/admin/repo_groups/repo_group_edit_perms.mako:80
+#: rhodecode/templates/admin/user_groups/user_group_edit_perms.mako:80
msgid "delegated admin"
msgstr ""
-#: rhodecode/templates/admin/repo_groups/repo_group_edit_perms.html:118
-#: rhodecode/templates/admin/repos/repo_edit_permissions.html:107
-#: rhodecode/templates/admin/user_groups/user_group_edit_perms.html:117
-#: rhodecode/templates/base/issue_tracker_settings.html:84
+#: rhodecode/templates/admin/repo_groups/repo_group_edit_perms.mako:118
+#: rhodecode/templates/admin/repos/repo_edit_permissions.mako:107
+#: rhodecode/templates/admin/user_groups/user_group_edit_perms.mako:117
+#: rhodecode/templates/base/issue_tracker_settings.mako:84
msgid "Add new"
msgstr ""
-#: rhodecode/templates/admin/repo_groups/repo_group_edit_perms.html:123
+#: rhodecode/templates/admin/repo_groups/repo_group_edit_perms.mako:123
msgid "Apply to children"
msgstr ""
-#: rhodecode/templates/admin/repo_groups/repo_group_edit_perms.html:129
+#: rhodecode/templates/admin/repo_groups/repo_group_edit_perms.mako:129
msgid "Both"
msgstr ""
-#: rhodecode/templates/admin/repo_groups/repo_group_edit_perms.html:130
+#: rhodecode/templates/admin/repo_groups/repo_group_edit_perms.mako:130
msgid "Set or revoke permissions to selected types of children of this group, including non-private repositories and other groups if chosen."
msgstr ""
-#: rhodecode/templates/admin/repo_groups/repo_group_edit_settings.html:6
+#: rhodecode/templates/admin/repo_groups/repo_group_edit_settings.mako:6
#, python-format
msgid "Settings for Repository Group: %s"
msgstr ""
-#: rhodecode/templates/admin/repo_groups/repo_group_edit_settings.html:36
+#: rhodecode/templates/admin/repo_groups/repo_group_edit_settings.mako:36
msgid "Change owner of this repository group."
msgstr ""
-#: rhodecode/templates/admin/repo_groups/repo_group_edit_settings.html:51
+#: rhodecode/templates/admin/repo_groups/repo_group_edit_settings.mako:51
msgid "Group parent"
msgstr ""
-#: rhodecode/templates/admin/repo_groups/repo_group_edit_settings.html:59
+#: rhodecode/templates/admin/repo_groups/repo_group_edit_settings.mako:59
msgid "Enable Repository Locking"
msgstr ""
-#: rhodecode/templates/admin/repo_groups/repo_group_edit_settings.html:63
+#: rhodecode/templates/admin/repo_groups/repo_group_edit_settings.mako:63
msgid "Repository locking will be enabled on all subgroups and repositories inside this repository group. Pulling from a repository locks it, and it is unlocked by pushing back by the same user."
msgstr ""
-#: rhodecode/templates/admin/repo_groups/repo_groups.html:5
+#: rhodecode/templates/admin/repo_groups/repo_groups.mako:5
msgid "Repository groups administration"
msgstr ""
-#: rhodecode/templates/admin/repo_groups/repo_groups.html:13
+#: rhodecode/templates/admin/repo_groups/repo_groups.mako:13
msgid "repository groups"
msgstr ""
-#: rhodecode/templates/admin/repo_groups/repo_groups.html:58
+#: rhodecode/templates/admin/repo_groups/repo_groups.mako:58
msgid "Number of top level repositories"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_add.html:5
+#: rhodecode/templates/admin/repos/repo_add.mako:5
msgid "Add repository"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_add_base.html:14
+#: rhodecode/templates/admin/repos/repo_add_base.mako:14
msgid "Import Existing Repository ?"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_add_base.html:23
-#: rhodecode/templates/base/base.html:193
+#: rhodecode/templates/admin/repos/repo_add_base.mako:23
+#: rhodecode/templates/base/base.mako:193
msgid "Clone from"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_add_base.html:27
+#: rhodecode/templates/admin/repos/repo_add_base.mako:27
msgid "Optional http[s] URL from which to clone a repository."
msgstr ""
-#: rhodecode/templates/admin/repos/repo_add_base.html:36
-#: rhodecode/templates/admin/repos/repo_edit_settings.html:102
-#: rhodecode/templates/forks/fork.html:52
+#: rhodecode/templates/admin/repos/repo_add_base.mako:36
+#: rhodecode/templates/admin/repos/repo_edit_settings.mako:102
+#: rhodecode/templates/forks/fork.mako:52
msgid "Keep it short and to the point. Use a README file for longer descriptions."
msgstr ""
-#: rhodecode/templates/admin/repos/repo_add_base.html:41
+#: rhodecode/templates/admin/repos/repo_add_base.mako:41
msgid "Repository Group"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_add_base.html:47
-#: rhodecode/templates/admin/repos/repo_edit_settings.html:62
-#: rhodecode/templates/forks/fork.html:64
+#: rhodecode/templates/admin/repos/repo_add_base.mako:47
+#: rhodecode/templates/admin/repos/repo_edit_settings.mako:62
+#: rhodecode/templates/forks/fork.mako:64
#, python-format
msgid "Select my personal group (%(repo_group_name)s)"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_add_base.html:50
-#: rhodecode/templates/forks/fork.html:67
+#: rhodecode/templates/admin/repos/repo_add_base.mako:50
+#: rhodecode/templates/forks/fork.mako:67
msgid "Optionally select a group to put this repository into."
msgstr ""
-#: rhodecode/templates/admin/repos/repo_add_base.html:59
+#: rhodecode/templates/admin/repos/repo_add_base.mako:59
msgid "Copy permission set from the parent repository group."
msgstr ""
-#: rhodecode/templates/admin/repos/repo_add_base.html:68
+#: rhodecode/templates/admin/repos/repo_add_base.mako:68
msgid "Set the type of repository to create."
msgstr ""
-#: rhodecode/templates/admin/repos/repo_add_base.html:73
-#: rhodecode/templates/admin/repos/repo_edit_settings.html:70
-#: rhodecode/templates/forks/fork.html:73
+#: rhodecode/templates/admin/repos/repo_add_base.mako:73
+#: rhodecode/templates/admin/repos/repo_edit_settings.mako:70
+#: rhodecode/templates/forks/fork.mako:73
msgid "Landing commit"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_add_base.html:77
+#: rhodecode/templates/admin/repos/repo_add_base.mako:77
msgid "The default commit for file pages, downloads, full text search index, and README generation."
msgstr ""
-#: rhodecode/templates/admin/repos/repo_creating.html:5
+#: rhodecode/templates/admin/repos/repo_creating.mako:5
#, python-format
msgid "%s Creating repository"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_creating.html:12
+#: rhodecode/templates/admin/repos/repo_creating.mako:12
msgid "Creating repository"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_creating.html:26
+#: rhodecode/templates/admin/repos/repo_creating.mako:26
#, python-format
msgid "Repository \"%(repo_name)s\" is being created, you will be redirected when this process is finished.repo_name"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit.html:8
+#: rhodecode/templates/admin/repos/repo_edit.mako:8
#, python-format
msgid "%s repository settings"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit.html:55
+#: rhodecode/templates/admin/repos/repo_edit.mako:55
msgid "Extra Fields"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit.html:61
+#: rhodecode/templates/admin/repos/repo_edit.mako:61
msgid "Caches"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit.html:65
+#: rhodecode/templates/admin/repos/repo_edit.mako:65
msgid "Remote"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit.html:69
-#: rhodecode/templates/summary/components.html:135
+#: rhodecode/templates/admin/repos/repo_edit.mako:69
+#: rhodecode/templates/summary/components.mako:135
msgid "Statistics"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit.html:87
+#: rhodecode/templates/admin/repos/repo_edit.mako:87
msgid "Reviewers"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_advanced.html:7
+#: rhodecode/templates/admin/repos/repo_edit_advanced.mako:7
msgid "Updated on"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_advanced.html:8
+#: rhodecode/templates/admin/repos/repo_edit_advanced.mako:8
msgid "Cached Commit id"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_advanced.html:14
+#: rhodecode/templates/admin/repos/repo_edit_advanced.mako:14
#, python-format
msgid "Repository: %s"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_advanced.html:24
+#: rhodecode/templates/admin/repos/repo_edit_advanced.mako:24
msgid "Fork Reference"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_advanced.html:30
+#: rhodecode/templates/admin/repos/repo_edit_advanced.mako:30
#, python-format
msgid "This repository is a fork of %(repo_link)s"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_advanced.html:36
-#: rhodecode/templates/admin/repos/repo_edit_fork.html:5
+#: rhodecode/templates/admin/repos/repo_edit_advanced.mako:36
+#: rhodecode/templates/admin/repos/repo_edit_fork.mako:5
msgid "Set"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_advanced.html:39
-#: rhodecode/templates/admin/repos/repo_edit_fork.html:9
+#: rhodecode/templates/admin/repos/repo_edit_advanced.mako:39
+#: rhodecode/templates/admin/repos/repo_edit_fork.mako:9
msgid "Manually set this repository as a fork of another from the list"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_advanced.html:48
+#: rhodecode/templates/admin/repos/repo_edit_advanced.mako:48
msgid "Public Journal Visibility"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_advanced.html:56
+#: rhodecode/templates/admin/repos/repo_edit_advanced.mako:56
msgid "Remove from Public Journal"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_advanced.html:60
+#: rhodecode/templates/admin/repos/repo_edit_advanced.mako:60
msgid "Add to Public Journal"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_advanced.html:65
+#: rhodecode/templates/admin/repos/repo_edit_advanced.mako:65
msgid "All actions made on this repository will be visible to everyone following the public journal."
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_advanced.html:74
+#: rhodecode/templates/admin/repos/repo_edit_advanced.mako:74
msgid "Locking state"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_advanced.html:83
+#: rhodecode/templates/admin/repos/repo_edit_advanced.mako:83
msgid "This Repository is not currently locked."
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_advanced.html:90
+#: rhodecode/templates/admin/repos/repo_edit_advanced.mako:90
msgid "Confirm to unlock repository."
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_advanced.html:92
+#: rhodecode/templates/admin/repos/repo_edit_advanced.mako:92
msgid "Unlock repository"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_advanced.html:97
+#: rhodecode/templates/admin/repos/repo_edit_advanced.mako:97
msgid "Confirm to lock repository."
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_advanced.html:99
+#: rhodecode/templates/admin/repos/repo_edit_advanced.mako:99
msgid "Lock Repository"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_advanced.html:105
+#: rhodecode/templates/admin/repos/repo_edit_advanced.mako:105
msgid "Force repository locking. This only works when anonymous access is disabled. Pulling from the repository locks the repository to that user until the same user pushes to that repository again."
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_advanced.html:114
+#: rhodecode/templates/admin/repos/repo_edit_advanced.mako:114
msgid "Delete repository"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_advanced.html:121
+#: rhodecode/templates/admin/repos/repo_edit_advanced.mako:121
#, python-format
msgid "This repository has %s fork."
msgid_plural "This repository has %s forks."
msgstr[0] ""
msgstr[1] ""
-#: rhodecode/templates/admin/repos/repo_edit_advanced.html:125
+#: rhodecode/templates/admin/repos/repo_edit_advanced.mako:125
msgid "Detach forks"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_advanced.html:130
+#: rhodecode/templates/admin/repos/repo_edit_advanced.mako:130
msgid "Delete forks"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_advanced.html:139
-#: rhodecode/templates/data_table/_dt_elements.html:124
+#: rhodecode/templates/admin/repos/repo_edit_advanced.mako:139
+#: rhodecode/templates/data_table/_dt_elements.mako:124
#, python-format
msgid "Confirm to delete this repository: %s"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_advanced.html:141
+#: rhodecode/templates/admin/repos/repo_edit_advanced.mako:141
msgid "Delete This Repository"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_advanced.html:146
+#: rhodecode/templates/admin/repos/repo_edit_advanced.mako:146
msgid "This repository will be renamed in a special way in order to make it inaccessible to RhodeCode Enterprise and its VCS systems. If you need to fully delete it from the file system, please do it manually, or with rhodecode-cleanup-repos command."
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_advanced.html:180
+#: rhodecode/templates/admin/repos/repo_edit_advanced.mako:180
msgid "Change repository"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_advanced.html:180
+#: rhodecode/templates/admin/repos/repo_edit_advanced.mako:180
msgid "Pick repository"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_caches.html:3
+#: rhodecode/templates/admin/repos/repo_edit_caches.mako:3
msgid "Invalidate Cache for Repository"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_caches.html:10
+#: rhodecode/templates/admin/repos/repo_edit_caches.mako:10
msgid "Invalidate repository cache"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_caches.html:10
+#: rhodecode/templates/admin/repos/repo_edit_caches.mako:10
msgid "Confirm to invalidate repository cache"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_caches.html:14
+#: rhodecode/templates/admin/repos/repo_edit_caches.mako:14
msgid "Manually invalidate the repository cache. On the next access a repository cache will be recreated."
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_caches.html:28
+#: rhodecode/templates/admin/repos/repo_edit_caches.mako:28
#, python-format
msgid "List of repository caches (%(count)s entry)"
msgid_plural "List of repository caches (%(count)s entries)"
msgstr[0] ""
msgstr[1] ""
-#: rhodecode/templates/admin/repos/repo_edit_caches.html:35
-#: rhodecode/templates/admin/repos/repo_edit_issuetracker.html:32
-#: rhodecode/templates/base/issue_tracker_settings.html:13
+#: rhodecode/templates/admin/repos/repo_edit_caches.mako:35
+#: rhodecode/templates/admin/repos/repo_edit_issuetracker.mako:32
+#: rhodecode/templates/base/issue_tracker_settings.mako:13
msgid "Prefix"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_caches.html:36
-#: rhodecode/templates/admin/repos/repo_edit_fields.html:11
+#: rhodecode/templates/admin/repos/repo_edit_caches.mako:36
+#: rhodecode/templates/admin/repos/repo_edit_fields.mako:11
msgid "Key"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_caches.html:37
-#: rhodecode/templates/admin/user_groups/user_group_add.html:52
-#: rhodecode/templates/admin/user_groups/user_group_edit_settings.html:51
-#: rhodecode/templates/admin/user_groups/user_groups.html:62
-#: rhodecode/templates/admin/users/user_add.html:97
-#: rhodecode/templates/admin/users/user_edit_profile.html:90
-#: rhodecode/templates/admin/users/users.html:101
+#: rhodecode/templates/admin/repos/repo_edit_caches.mako:37
+#: rhodecode/templates/admin/user_groups/user_group_add.mako:52
+#: rhodecode/templates/admin/user_groups/user_group_edit_settings.mako:51
+#: rhodecode/templates/admin/user_groups/user_groups.mako:62
+#: rhodecode/templates/admin/users/user_add.mako:97
+#: rhodecode/templates/admin/users/user_edit_profile.mako:90
+#: rhodecode/templates/admin/users/users.mako:101
msgid "Active"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_fields.html:3
+#: rhodecode/templates/admin/repos/repo_edit_fields.mako:3
msgid "Custom extra fields for this repository"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_fields.html:10
+#: rhodecode/templates/admin/repos/repo_edit_fields.mako:10
msgid "Label"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_fields.html:24
+#: rhodecode/templates/admin/repos/repo_edit_fields.mako:24
#, python-format
msgid "Confirm to delete this field: %s"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_fields.html:40
+#: rhodecode/templates/admin/repos/repo_edit_fields.mako:40
msgid "New Field Key"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_fields.html:48
+#: rhodecode/templates/admin/repos/repo_edit_fields.mako:48
msgid "New Field Label"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_fields.html:51
+#: rhodecode/templates/admin/repos/repo_edit_fields.mako:51
msgid "Enter short label"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_fields.html:57
+#: rhodecode/templates/admin/repos/repo_edit_fields.mako:57
msgid "New Field Description"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_fields.html:60
+#: rhodecode/templates/admin/repos/repo_edit_fields.mako:60
msgid "Enter a full description for the field"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_fields.html:73
+#: rhodecode/templates/admin/repos/repo_edit_fields.mako:73
msgid "Extra fields are disabled. You can enable them from the Admin/Settings/Visual page."
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_issuetracker.html:9
-#: rhodecode/templates/admin/repos/repo_edit_vcs.html:9
+#: rhodecode/templates/admin/repos/repo_edit_issuetracker.mako:9
+#: rhodecode/templates/admin/repos/repo_edit_vcs.mako:9
msgid "Inherit from global settings"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_issuetracker.html:14
+#: rhodecode/templates/admin/repos/repo_edit_issuetracker.mako:14
msgid "Select to inherit global patterns for issue tracker."
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_issuetracker.html:24
+#: rhodecode/templates/admin/repos/repo_edit_issuetracker.mako:24
msgid "Inherited Issue Tracker Patterns"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_issuetracker.html:30
-#: rhodecode/templates/base/issue_tracker_settings.html:11
+#: rhodecode/templates/admin/repos/repo_edit_issuetracker.mako:30
+#: rhodecode/templates/base/issue_tracker_settings.mako:11
msgid "Pattern"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_issuetracker.html:31
-#: rhodecode/templates/base/issue_tracker_settings.html:12
+#: rhodecode/templates/admin/repos/repo_edit_issuetracker.mako:31
+#: rhodecode/templates/base/issue_tracker_settings.mako:12
msgid "Url"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_issuetracker.html:70
-#: rhodecode/templates/admin/settings/settings_issuetracker.html:5
+#: rhodecode/templates/admin/repos/repo_edit_issuetracker.mako:70
+#: rhodecode/templates/admin/settings/settings_issuetracker.mako:5
msgid "Issue Tracker / Wiki Patterns"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_issuetracker.html:91
-#: rhodecode/templates/admin/settings/settings_issuetracker.html:24
+#: rhodecode/templates/admin/repos/repo_edit_issuetracker.mako:91
+#: rhodecode/templates/admin/settings/settings_issuetracker.mako:24
msgid "Test Patterns"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_permissions.html:5
+#: rhodecode/templates/admin/repos/repo_edit_permissions.mako:5
msgid "Repository Permissions"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_permissions.html:43
+#: rhodecode/templates/admin/repos/repo_edit_permissions.mako:43
msgid "private repository"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_permissions.html:48
+#: rhodecode/templates/admin/repos/repo_edit_permissions.mako:48
msgid "only users/user groups explicitly added here will have access"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_remote.html:3
+#: rhodecode/templates/admin/repos/repo_edit_remote.mako:3
msgid "Remote url"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_remote.html:9
+#: rhodecode/templates/admin/repos/repo_edit_remote.mako:9
msgid "Remote mirror url"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_remote.html:14
-#: rhodecode/templates/admin/repos/repo_edit_remote.html:22
+#: rhodecode/templates/admin/repos/repo_edit_remote.mako:14
+#: rhodecode/templates/admin/repos/repo_edit_remote.mako:22
msgid "Pull changes from remote location"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_remote.html:14
+#: rhodecode/templates/admin/repos/repo_edit_remote.mako:14
msgid "Confirm to pull changes from remote side"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_remote.html:19
+#: rhodecode/templates/admin/repos/repo_edit_remote.mako:19
msgid "This repository does not have any remote mirror url set."
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_settings.html:6
+#: rhodecode/templates/admin/repos/repo_edit_settings.mako:6
#, python-format
msgid "Settings for Repository: %s"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_settings.html:19
+#: rhodecode/templates/admin/repos/repo_edit_settings.mako:19
msgid "Non-changeable id"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_settings.html:19
+#: rhodecode/templates/admin/repos/repo_edit_settings.mako:19
msgid "what is that ?"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_settings.html:21
+#: rhodecode/templates/admin/repos/repo_edit_settings.mako:21
msgid "URL by id"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_settings.html:22
+#: rhodecode/templates/admin/repos/repo_edit_settings.mako:22
msgid ""
"In case this repository is renamed or moved into another group the repository url changes.\n"
" Using above url guarantees that this repository will always be accessible under such url.\n"
" Useful for CI systems, or any other cases that you need to hardcode the url into 3rd party service."
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_settings.html:30
+#: rhodecode/templates/admin/repos/repo_edit_settings.mako:30
msgid "Remote uri"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_settings.html:36
-#: rhodecode/templates/base/perms_summary.html:79
-#: rhodecode/templates/base/perms_summary.html:149
-#: rhodecode/templates/base/perms_summary.html:151
+#: rhodecode/templates/admin/repos/repo_edit_settings.mako:36
+#: rhodecode/templates/base/perms_summary.mako:79
+#: rhodecode/templates/base/perms_summary.mako:149
+#: rhodecode/templates/base/perms_summary.mako:151
#: rhodecode/templates/debug_style/form-elements.html:45
msgid "edit"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_settings.html:39
+#: rhodecode/templates/admin/repos/repo_edit_settings.mako:39
msgid "new value, leave empty to remove"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_settings.html:41
+#: rhodecode/templates/admin/repos/repo_edit_settings.mako:41
msgid "cancel"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_settings.html:48
+#: rhodecode/templates/admin/repos/repo_edit_settings.mako:48
msgid "http[s] url where from repository was imported, also used for doing remote pulls."
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_settings.html:56
-#: rhodecode/templates/data_table/_dt_elements.html:164
-#: rhodecode/templates/forks/fork.html:58
+#: rhodecode/templates/admin/repos/repo_edit_settings.mako:56
+#: rhodecode/templates/data_table/_dt_elements.mako:164
+#: rhodecode/templates/forks/fork.mako:58
msgid "Repository group"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_settings.html:65
+#: rhodecode/templates/admin/repos/repo_edit_settings.mako:65
msgid "Optional select a group to put this repository into."
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_settings.html:74
-#: rhodecode/templates/forks/fork.html:77
+#: rhodecode/templates/admin/repos/repo_edit_settings.mako:74
+#: rhodecode/templates/forks/fork.mako:77
msgid "Default commit for files page, downloads, whoosh and readme"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_settings.html:92
+#: rhodecode/templates/admin/repos/repo_edit_settings.mako:92
msgid "Change owner of this repository."
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_settings.html:108
-#: rhodecode/templates/data_table/_dt_elements.html:58
+#: rhodecode/templates/admin/repos/repo_edit_settings.mako:108
+#: rhodecode/templates/data_table/_dt_elements.mako:58
msgid "Private repository"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_settings.html:117
+#: rhodecode/templates/admin/repos/repo_edit_settings.mako:117
msgid "Enable statistics"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_settings.html:121
+#: rhodecode/templates/admin/repos/repo_edit_settings.mako:121
msgid "Enable statistics window on summary page."
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_settings.html:126
+#: rhodecode/templates/admin/repos/repo_edit_settings.mako:126
msgid "Enable downloads"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_settings.html:130
+#: rhodecode/templates/admin/repos/repo_edit_settings.mako:130
msgid "Enable download menu on summary page."
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_settings.html:135
+#: rhodecode/templates/admin/repos/repo_edit_settings.mako:135
msgid "Enable automatic locking"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_settings.html:139
+#: rhodecode/templates/admin/repos/repo_edit_settings.mako:139
msgid "Enable automatic locking on repository. Pulling from this repository creates a lock that can be released by pushing back by the same user"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_statistics.html:3
+#: rhodecode/templates/admin/repos/repo_edit_statistics.mako:3
msgid "Repository statistics"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_statistics.html:11
+#: rhodecode/templates/admin/repos/repo_edit_statistics.mako:11
msgid "Processed commits"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_statistics.html:12
+#: rhodecode/templates/admin/repos/repo_edit_statistics.mako:12
msgid "Processed progress"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_statistics.html:15
+#: rhodecode/templates/admin/repos/repo_edit_statistics.mako:15
msgid "Reset statistics"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_statistics.html:15
+#: rhodecode/templates/admin/repos/repo_edit_statistics.mako:15
msgid "Confirm to remove current statistics"
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_vcs.html:14
+#: rhodecode/templates/admin/repos/repo_edit_vcs.mako:14
msgid "Select to inherit global vcs settings."
msgstr ""
-#: rhodecode/templates/admin/repos/repo_edit_vcs.html:45
-#: rhodecode/templates/admin/settings/settings_global.html:139
-#: rhodecode/templates/admin/settings/settings_labs.html:48
-#: rhodecode/templates/admin/settings/settings_vcs.html:13
-#: rhodecode/templates/admin/settings/settings_visual.html:221
+#: rhodecode/templates/admin/repos/repo_edit_vcs.mako:45
+#: rhodecode/templates/admin/settings/settings_global.mako:139
+#: rhodecode/templates/admin/settings/settings_labs.mako:48
+#: rhodecode/templates/admin/settings/settings_vcs.mako:13
+#: rhodecode/templates/admin/settings/settings_visual.mako:221
msgid "Save settings"
msgstr ""
-#: rhodecode/templates/admin/repos/repos.html:5
+#: rhodecode/templates/admin/repos/repos.mako:5
msgid "Repositories administration"
msgstr ""
-#: rhodecode/templates/admin/repos/repos.html:13
+#: rhodecode/templates/admin/repos/repos.mako:13
msgid "repositories"
msgstr ""
-#: rhodecode/templates/admin/repos/repos.html:67
+#: rhodecode/templates/admin/repos/repos.mako:67
msgid "State"
msgstr ""
-#: rhodecode/templates/admin/settings/settings.html:5
+#: rhodecode/templates/admin/settings/settings.mako:5
msgid "Settings administration"
msgstr ""
-#: rhodecode/templates/admin/settings/settings_email.html:3
+#: rhodecode/templates/admin/settings/settings_email.mako:3
msgid "Email Configuration"
msgstr ""
-#: rhodecode/templates/admin/settings/settings_email.html:8
+#: rhodecode/templates/admin/settings/settings_email.mako:8
msgid "Email prefix"
msgstr ""
-#: rhodecode/templates/admin/settings/settings_email.html:9
+#: rhodecode/templates/admin/settings/settings_email.mako:9
msgid "RhodeCode email from"
msgstr ""
-#: rhodecode/templates/admin/settings/settings_email.html:10
+#: rhodecode/templates/admin/settings/settings_email.mako:10
msgid "Error email from"
msgstr ""
-#: rhodecode/templates/admin/settings/settings_email.html:11
+#: rhodecode/templates/admin/settings/settings_email.mako:11
msgid "Error email recipients"
msgstr ""
-#: rhodecode/templates/admin/settings/settings_email.html:13
+#: rhodecode/templates/admin/settings/settings_email.mako:13
msgid "SMTP server"
msgstr ""
-#: rhodecode/templates/admin/settings/settings_email.html:14
+#: rhodecode/templates/admin/settings/settings_email.mako:14
msgid "SMTP username"
msgstr ""
-#: rhodecode/templates/admin/settings/settings_email.html:15
+#: rhodecode/templates/admin/settings/settings_email.mako:15
msgid "SMTP password"
msgstr ""
-#: rhodecode/templates/admin/settings/settings_email.html:16
+#: rhodecode/templates/admin/settings/settings_email.mako:16
msgid "SMTP port"
msgstr ""
-#: rhodecode/templates/admin/settings/settings_email.html:18
+#: rhodecode/templates/admin/settings/settings_email.mako:18
msgid "SMTP use TLS"
msgstr ""
-#: rhodecode/templates/admin/settings/settings_email.html:19
+#: rhodecode/templates/admin/settings/settings_email.mako:19
msgid "SMTP use SSL"
msgstr ""
-#: rhodecode/templates/admin/settings/settings_email.html:20
+#: rhodecode/templates/admin/settings/settings_email.mako:20
msgid "SMTP auth"
msgstr ""
-#: rhodecode/templates/admin/settings/settings_email.html:34
+#: rhodecode/templates/admin/settings/settings_email.mako:34
msgid "Test Email"
msgstr ""
-#: rhodecode/templates/admin/settings/settings_email.html:40
+#: rhodecode/templates/admin/settings/settings_email.mako:40
msgid "enter valid email"
msgstr ""
-#: rhodecode/templates/admin/settings/settings_email.html:44
+#: rhodecode/templates/admin/settings/settings_email.mako:44
msgid "Send an auto-generated email from this server to above email..."
msgstr ""
-#: rhodecode/templates/admin/settings/settings_global.html:5
+#: rhodecode/templates/admin/settings/settings_global.mako:5
msgid "Branding"
msgstr ""
-#: rhodecode/templates/admin/settings/settings_global.html:16
+#: rhodecode/templates/admin/settings/settings_global.mako:16
msgid "Set a custom title for your RhodeCode instance (limited to 40 characters)."
msgstr ""
-#: rhodecode/templates/admin/settings/settings_global.html:20
+#: rhodecode/templates/admin/settings/settings_global.mako:20
msgid "HTTP[S] authentication realm"
msgstr ""
-#: rhodecode/templates/admin/settings/settings_global.html:27
+#: rhodecode/templates/admin/settings/settings_global.mako:27
msgid "Set a custom text that is shown as authentication message to clients trying to connect."
msgstr ""
-#: rhodecode/templates/admin/settings/settings_global.html:36
-#: rhodecode/templates/admin/users/user_edit_advanced.html:56
+#: rhodecode/templates/admin/settings/settings_global.mako:36
+#: rhodecode/templates/admin/users/user_edit_advanced.mako:56
msgid "Personal Repository Group"
msgstr ""
-#: rhodecode/templates/admin/settings/settings_global.html:41
+#: rhodecode/templates/admin/settings/settings_global.mako:41
msgid "Create Personal Repository Group"
msgstr ""
-#: rhodecode/templates/admin/settings/settings_global.html:44
+#: rhodecode/templates/admin/settings/settings_global.mako:44
msgid "Always create Personal Repository Groups for new users."
msgstr ""
-#: rhodecode/templates/admin/settings/settings_global.html:45
+#: rhodecode/templates/admin/settings/settings_global.mako:45
msgid "When creating new users from add user form or API you can still turn this off via a checkbox or flag"
msgstr ""
-#: rhodecode/templates/admin/settings/settings_global.html:49
+#: rhodecode/templates/admin/settings/settings_global.mako:49
msgid "Personal Repo Group Pattern"
msgstr ""
-#: rhodecode/templates/admin/settings/settings_global.html:55
+#: rhodecode/templates/admin/settings/settings_global.mako:55
msgid "Pattern used to create Personal Repository Groups. Prefix can be other existing repository group path[s], eg. /u/${username}"
msgstr ""
-#: rhodecode/templates/admin/settings/settings_global.html:56
+#: rhodecode/templates/admin/settings/settings_global.mako:56
msgid "Available variables are currently ${username} and ${user_id}"
msgstr ""
-#: rhodecode/templates/admin/settings/settings_global.html:64
+#: rhodecode/templates/admin/settings/settings_global.mako:64
msgid "Registration Captcha"
msgstr ""
-#: rhodecode/templates/admin/settings/settings_global.html:68
+#: rhodecode/templates/admin/settings/settings_global.mako:68
msgid "Google ReCaptcha public key"
msgstr ""
-#: rhodecode/templates/admin/settings/settings_global.html:75
+#: rhodecode/templates/admin/settings/settings_global.mako:75
msgid "Public key for reCaptcha system."
msgstr ""
-#: rhodecode/templates/admin/settings/settings_global.html:80
+#: rhodecode/templates/admin/settings/settings_global.mako:80
msgid "Google ReCaptcha private key"
msgstr ""
-#: rhodecode/templates/admin/settings/settings_global.html:87
+#: rhodecode/templates/admin/settings/settings_global.mako:87
msgid "Private key for reCaptcha system. Setting this value will enable captcha on registration"
msgstr ""
-#: rhodecode/templates/admin/settings/settings_global.html:95
+#: rhodecode/templates/admin/settings/settings_global.mako:95
msgid "Custom Header Code"
msgstr ""
-#: rhodecode/templates/admin/settings/settings_global.html:100
-#: rhodecode/templates/admin/settings/settings_global.html:123
+#: rhodecode/templates/admin/settings/settings_global.mako:100
+#: rhodecode/templates/admin/settings/settings_global.mako:123
#: rhodecode/templates/debug_style/form-elements-small.html:59
#: rhodecode/templates/debug_style/form-elements.html:57
#: rhodecode/templates/debug_style/form-elements.html:82
@@ -6211,8 +6259,8 @@ msgstr ""
msgid "Templates..."
msgstr ""
-#: rhodecode/templates/admin/settings/settings_global.html:103
-#: rhodecode/templates/admin/settings/settings_global.html:126
+#: rhodecode/templates/admin/settings/settings_global.mako:103
+#: rhodecode/templates/admin/settings/settings_global.mako:126
#: rhodecode/templates/debug_style/form-elements-small.html:62
#: rhodecode/templates/debug_style/form-elements.html:60
#: rhodecode/templates/debug_style/form-elements.html:85
@@ -6235,137 +6283,181 @@ msgstr ""
msgid "Server Announcement"
msgstr ""
-#: rhodecode/templates/admin/settings/settings_global.html:104
+#: rhodecode/templates/admin/settings/settings_global.mako:104
msgid "Flash message filtering"
msgstr ""
-#: rhodecode/templates/admin/settings/settings_global.html:110
+#: rhodecode/templates/admin/settings/settings_global.mako:110
msgid "Custom js/css code added at the end of the tag."
msgstr ""
-#: rhodecode/templates/admin/settings/settings_global.html:111
+#: rhodecode/templates/admin/settings/settings_global.mako:111
msgid "Use or tags to define custom styling or scripting"
msgstr ""
-#: rhodecode/templates/admin/settings/settings_global.html:118
+#: rhodecode/templates/admin/settings/settings_global.mako:118
msgid "Custom Footer Code"
msgstr ""
-#: rhodecode/templates/admin/settings/settings_global.html:132
+#: rhodecode/templates/admin/settings/settings_global.mako:132
msgid "Custom js/css code added at the end of the tag."
msgstr ""
-#: rhodecode/templates/admin/settings/settings_global.html:133
+#: rhodecode/templates/admin/settings/settings_global.mako:133
msgid "Use
+
diff --git a/rhodecode/templates/admin/my_account/my_account_password.html b/rhodecode/templates/admin/my_account/my_account_password.mako
rename from rhodecode/templates/admin/my_account/my_account_password.html
rename to rhodecode/templates/admin/my_account/my_account_password.mako
--- a/rhodecode/templates/admin/my_account/my_account_password.html
+++ b/rhodecode/templates/admin/my_account/my_account_password.mako
@@ -1,5 +1,13 @@
-<%namespace name="widgets" file="/widgets.html"/>
+<%namespace name="widgets" file="/widgets.mako"/>
<%widgets:panel title="${_('Change Your Account Password')}">
-${c.form.render() | n}
+
+% if c.extern_type != 'rhodecode':
+
${_('Your user account details are managed by an external source. Details cannot be managed here.')}
+ ${_('Source type')}: ${c.extern_type}
+
+ % if c.unresolved_comments:
+ % for co in c.unresolved_comments:
+ #${co.comment_id}${'' if loop.last else ','}
+ % endfor
+ % else:
+ ${_('There are no unresolved TODOs')}
+ % endif
+
+ % endif
+ % endif
+
## show delete comment if it's not a PR (regular comments) or it's PR that is not closed
- ## only super-admin, repo admin OR comment owner can delete
- %if not comment.pull_request or (comment.pull_request and not comment.pull_request.is_closed()):
+ ## only super-admin, repo admin OR comment owner can delete, also hide delete if currently viewed comment is outdated
+ %if not outdated_at_ver and (not comment.pull_request or (comment.pull_request and not comment.pull_request.is_closed())):
+ ## permissions to delete
%if h.HasPermissionAny('hg.admin')() or h.HasRepoPermissionAny('repository.admin')(c.repo_name) or comment.author.user_id == c.rhodecode_user.user_id:
## TODO: dan: add edit comment here
- ${_('Delete')} |
- %if not comment.outdated:
- ${_('Prev')} |
- ${_('Next')}
- %endif
+ ${_('Delete')}
+ %else:
+
%endif
+ %else:
+
%endif
+ % if outdated_at_ver:
+ | ${_('Prev')}
+ | ${_('Next')}
+ % else:
+ | ${_('Prev')}
+ | ${_('Next')}
+ % endif
+
- %if comment.status_change:
-
-
-
-
- ${comment.status_change[0].status_lbl}
-
- %endif
- ¶
- ## show delete comment if it's not a PR (regular comments) or it's PR that is not closed
- ## only super-admin, repo admin OR comment owner can delete
- %if not comment.pull_request or (comment.pull_request and not comment.pull_request.is_closed()):
-
- %if h.HasPermissionAny('hg.admin')() or h.HasRepoPermissionAny('repository.admin')(c.repo_name) or comment.author.user_id == c.rhodecode_user.user_id:
-
+ <%
+ if is_pull_request:
+ placeholder = _('Leave a comment on this Pull Request.')
+ elif is_compare:
+ placeholder = _('Leave a comment on {} commits in this range.').format(len(form_extras))
+ else:
+ placeholder = _('Leave a comment on this Commit.')
+ %>
+
+ % if c.rhodecode_user.username != h.DEFAULT_USER:
+
+%def>
+
+
+<%def name="comment_form(form_type, form_id='', lineno_id='{1}', review_statuses=None, form_extras=None)">
+ ## comment injected based on assumption that user is logged in
+
+
- %if is_pull_request:
- ${(_('Create a comment on this Pull Request.'))}
- %elif is_compare:
- ${(_('Create comments on this Commit range.'))}
- %else:
- ${(_('Create a comment on this Commit.'))}
- %endif
-
-
- ${(_('Comments parsed using %s syntax with %s support.') % (
- ('%s' % (h.url('%s_help' % c.visual.default_renderer), c.visual.default_renderer.upper())),
- ('@mention' % _('Use @username inside this text to send notification to this RhodeCode user'))
- )
- )|n
- }
-
-
- ${h.textarea('text', class_="comment-block-ta")}
+
+
-
-%def>
+%def>
\ No newline at end of file
diff --git a/rhodecode/templates/changeset/changeset_range.html b/rhodecode/templates/changeset/changeset_range.mako
rename from rhodecode/templates/changeset/changeset_range.html
rename to rhodecode/templates/changeset/changeset_range.mako
--- a/rhodecode/templates/changeset/changeset_range.html
+++ b/rhodecode/templates/changeset/changeset_range.mako
@@ -1,5 +1,5 @@
## -*- coding: utf-8 -*-
-<%inherit file="/base/base.html"/>
+<%inherit file="/base/base.mako"/>
<%def name="title()">
${_('%s Commits') % c.repo_name} -
@@ -29,34 +29,89 @@
%def>
<%def name="main()">
-
${diff|n}
- % if file["is_limited_diff"]:
- % if file["exceeds_limit"]:
+ % if file_data["is_limited_diff"]:
+ % if file_data["exceeds_limit"]:
${self.file_message()}
% else:
${_('Diff was truncated. File content available only in full diff.')} ${_('Show full diff')}
- %for op,filenode_path,diff,file in change:
+ %for op,filenode_path,diff,file_data in change:
${diff|n}
- % if file["is_limited_diff"]:
- % if file["exceeds_limit"]:
+ % if file_data["is_limited_diff"]:
+ % if file_data["exceeds_limit"]:
${self.file_message()}
% else:
${_('Diff was truncated. File content available only in full diff.')} ${_('Show full diff')}
@@ -52,45 +52,6 @@
%def>
-<%def name="diff_menu(repo_name, f_path, cs1, cs2, change, file=None)">
- <%
- onclick_diff2way = ''
- if (file and file["exceeds_limit"]):
- onclick_diff2way = '''return confirm('%s');''' % _("Showing a big diff might take some time and resources, continue?")
- %>
-
- % if change in ['A', 'M']:
-
- ${_('Show File')}
-
- % else:
-
- ${_('Show File')}
-
- % endif
- |
-
- ${_('Unified Diff')}
-
- |
-
- ${_('Side-by-side Diff')}
-
- |
-
- ${_('Raw Diff')}
-
- |
-
- ${_('Download Diff')}
-
-%def>
<%def name="diff_summary_text(changed_files, lines_added, lines_deleted, limited_diff=False)">
% if limited_diff:
diff --git a/rhodecode/templates/changeset/patch_changeset.html b/rhodecode/templates/changeset/patch_changeset.mako
rename from rhodecode/templates/changeset/patch_changeset.html
rename to rhodecode/templates/changeset/patch_changeset.mako
diff --git a/rhodecode/templates/channelstream/plugin_init.html b/rhodecode/templates/channelstream/plugin_init.mako
rename from rhodecode/templates/channelstream/plugin_init.html
rename to rhodecode/templates/channelstream/plugin_init.mako
diff --git a/rhodecode/templates/codeblocks/diffs.html b/rhodecode/templates/codeblocks/diffs.mako
rename from rhodecode/templates/codeblocks/diffs.html
rename to rhodecode/templates/codeblocks/diffs.mako
--- a/rhodecode/templates/codeblocks/diffs.html
+++ b/rhodecode/templates/codeblocks/diffs.mako
@@ -1,27 +1,35 @@
+<%namespace name="commentblock" file="/changeset/changeset_file_comment.mako"/>
+
<%def name="diff_line_anchor(filename, line, type)"><%
return '%s_%s_%i' % (h.safeid(filename), type, line)
%>%def>
-<%def name="action_class(action)"><%
+<%def name="action_class(action)">
+<%
return {
'-': 'cb-deletion',
'+': 'cb-addition',
' ': 'cb-context',
}.get(action, 'cb-empty')
-%>%def>
+%>
+%def>
-<%def name="op_class(op_id)"><%
+<%def name="op_class(op_id)">
+<%
return {
DEL_FILENODE: 'deletion', # file deleted
BIN_FILENODE: 'warning' # binary diff hidden
}.get(op_id, 'addition')
-%>%def>
+%>
+%def>
-<%def name="link_for(**kw)"><%
+<%def name="link_for(**kw)">
+<%
new_args = request.GET.mixed()
new_args.update(kw)
return h.url('', **new_args)
-%>%def>
+%>
+%def>
<%def name="render_diffset(diffset, commit=None,
@@ -40,6 +48,10 @@ return h.url('', **new_args)
# disable new comments
disable_new_comments=False,
+ # special file-comments that were deleted in previous versions
+ # it's used for showing outdated comments for deleted files in a PR
+ deleted_files_comments=None
+
)">
%if use_comments:
@@ -48,49 +60,15 @@ return h.url('', **new_args)
%endif
%endfor
+
+ ## outdated comments that do not fit into currently displayed lines
+ % for lineno, comments in filediff.left_comments.items():
+
+ %if c.diffmode == 'unified':
+
+
+
+
+
+ ${inline_comments_container(comments)}
+
+
+ %elif c.diffmode == 'sideside':
+
+
+
+
+
+
+
+
+ ${inline_comments_container(comments)}
+
+
+ %endif
+
+ % endfor
+
%endfor
-
+
+ ## outdated comments that are made for a file that has been deleted
+ % for filename, comments_dict in (deleted_files_comments or {}).items():
+
+
+
+
+
+
+
+
+ % if c.diffmode == 'unified':
+
+ %endif
+
+
+
+ ${_('File was deleted in this version, and outdated comments were made on it')}
+
+ ## The hidden elements are replaced with a select2 widget
+ ${h.hidden('compare_source')}
- %endif
+
+
+
+
+
+
+
+ ${_('Source')}:
+
+
+
+
+
+ ## The hidden elements are replaced with a select2 widget
+ ${h.hidden('compare_target')}
+
+
-
- ## use JS script to load it quickly before potentially large diffs render long time
- ## this prevents from situation when large diffs block rendering of select2 fields
-
+
- ## changeset status form
- <%namespace name="comment" file="/changeset/changeset_file_comment.html"/>
- ## main comment form and it status
- <%
- def revs(_revs):
- form_inputs = []
- for cs in _revs:
- tmpl = '' % {'cid': cs.raw_id}
- form_inputs.append(tmpl)
- return form_inputs
- %>
-
+ ${_('Commits and changes between v{ver_from} and {ver_to} of this pull request, commenting is disabled').format(ver_from=c.from_version_pos, ver_to=c.at_version_pos if c.at_version_pos else 'latest')}:
+
diff --git a/rhodecode/templates/widgets.html b/rhodecode/templates/widgets.mako
rename from rhodecode/templates/widgets.html
rename to rhodecode/templates/widgets.mako
diff --git a/rhodecode/tests/__init__.py b/rhodecode/tests/__init__.py
--- a/rhodecode/tests/__init__.py
+++ b/rhodecode/tests/__init__.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -38,7 +38,6 @@ from pylons.i18n.translation import _get
from pylons.util import ContextObj
from routes.util import URLGenerator
-from webtest import TestApp
from nose.plugins.skip import SkipTest
import pytest
@@ -51,10 +50,6 @@ from rhodecode.lib.helpers import flash,
from rhodecode.lib.utils2 import safe_unicode, safe_str
from rhodecode.tests.utils import get_session_from_response
-# TODO: johbo: Solve time zone related issues and remove this tweak
-os.environ['TZ'] = 'UTC'
-if not is_windows:
- time.tzset()
log = logging.getLogger(__name__)
@@ -232,9 +227,11 @@ def assert_session_flash(response=None,
message_text = _eval_if_lazy(message.message)
if msg not in message_text:
- msg = u'msg `%s` not found in session flash: got `%s` instead' % (
- msg, message_text)
- pytest.fail(safe_str(msg))
+ fail_msg = u'msg `%s` not found in session ' \
+ u'flash: got `%s` (type:%s) instead' % (
+ msg, message_text, type(message_text))
+
+ pytest.fail(safe_str(fail_msg))
if category:
assert category == message.category
diff --git a/rhodecode/tests/auth_external_test.py b/rhodecode/tests/auth_external_test.py
--- a/rhodecode/tests/auth_external_test.py
+++ b/rhodecode/tests/auth_external_test.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/config/__init__.py b/rhodecode/tests/config/__init__.py
--- a/rhodecode/tests/config/__init__.py
+++ b/rhodecode/tests/config/__init__.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/config/test_environment.py b/rhodecode/tests/config/test_environment.py
--- a/rhodecode/tests/config/test_environment.py
+++ b/rhodecode/tests/config/test_environment.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/config/test_routing_links.py b/rhodecode/tests/config/test_routing_links.py
--- a/rhodecode/tests/config/test_routing_links.py
+++ b/rhodecode/tests/config/test_routing_links.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/config/test_sanitize_settings.py b/rhodecode/tests/config/test_sanitize_settings.py
--- a/rhodecode/tests/config/test_sanitize_settings.py
+++ b/rhodecode/tests/config/test_sanitize_settings.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2016-2016 RhodeCode GmbH
+# Copyright (C) 2016-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/config/test_utils.py b/rhodecode/tests/config/test_utils.py
--- a/rhodecode/tests/config/test_utils.py
+++ b/rhodecode/tests/config/test_utils.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2012-2016 RhodeCode GmbH
+# Copyright (C) 2012-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/controllers/test_compare.py b/rhodecode/tests/controllers/test_compare.py
--- a/rhodecode/tests/controllers/test_compare.py
+++ b/rhodecode/tests/controllers/test_compare.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/controllers/test_pullrequests.py b/rhodecode/tests/controllers/test_pullrequests.py
--- a/rhodecode/tests/controllers/test_pullrequests.py
+++ b/rhodecode/tests/controllers/test_pullrequests.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2016-2016 RhodeCode GmbH
+# Copyright (C) 2016-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/controllers/test_repo_groups.py b/rhodecode/tests/controllers/test_repo_groups.py
--- a/rhodecode/tests/controllers/test_repo_groups.py
+++ b/rhodecode/tests/controllers/test_repo_groups.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/controllers/test_search.py b/rhodecode/tests/controllers/test_search.py
--- a/rhodecode/tests/controllers/test_search.py
+++ b/rhodecode/tests/controllers/test_search.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/controllers/test_utils.py b/rhodecode/tests/controllers/test_utils.py
--- a/rhodecode/tests/controllers/test_utils.py
+++ b/rhodecode/tests/controllers/test_utils.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/database/conftest.py b/rhodecode/tests/database/conftest.py
--- a/rhodecode/tests/database/conftest.py
+++ b/rhodecode/tests/database/conftest.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -141,7 +141,9 @@ class DBBackend(object):
return self.stdout, self.stderr
def assert_returncode_success(self):
- assert self.p.returncode == 0, self.stderr
+ if not self.p.returncode == 0:
+ print(self.stderr)
+ raise AssertionError('non 0 retcode:{}'.format(self.p.returncode))
def setup_rhodecode_db(self, ini_params=None, env=None):
if not ini_params:
diff --git a/rhodecode/tests/database/test_creation.py b/rhodecode/tests/database/test_creation.py
--- a/rhodecode/tests/database/test_creation.py
+++ b/rhodecode/tests/database/test_creation.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/database/test_migration.py b/rhodecode/tests/database/test_migration.py
--- a/rhodecode/tests/database/test_migration.py
+++ b/rhodecode/tests/database/test_migration.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/events/__init__.py b/rhodecode/tests/events/__init__.py
--- a/rhodecode/tests/events/__init__.py
+++ b/rhodecode/tests/events/__init__.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/events/conftest.py b/rhodecode/tests/events/conftest.py
--- a/rhodecode/tests/events/conftest.py
+++ b/rhodecode/tests/events/conftest.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2016-2016 RhodeCode GmbH
+# Copyright (C) 2016-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/events/test_pullrequest.py b/rhodecode/tests/events/test_pullrequest.py
--- a/rhodecode/tests/events/test_pullrequest.py
+++ b/rhodecode/tests/events/test_pullrequest.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -22,7 +22,7 @@ import pytest
from rhodecode.tests.events.conftest import EventCatcher
-from rhodecode.model.comment import ChangesetCommentsModel
+from rhodecode.model.comment import CommentsModel
from rhodecode.model.pull_request import PullRequestModel
from rhodecode.events import (
PullRequestCreateEvent,
@@ -61,7 +61,7 @@ def test_create_pull_request_events(pr_u
@pytest.mark.backends("git", "hg")
def test_pullrequest_comment_events_serialized(pr_util):
pr = pr_util.create_pull_request()
- comment = ChangesetCommentsModel().get_comments(
+ comment = CommentsModel().get_comments(
pr.target_repo.repo_id, pull_request=pr)[0]
event = PullRequestCommentEvent(pr, comment)
data = event.as_dict()
diff --git a/rhodecode/tests/events/test_repo.py b/rhodecode/tests/events/test_repo.py
--- a/rhodecode/tests/events/test_repo.py
+++ b/rhodecode/tests/events/test_repo.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/fixture.py b/rhodecode/tests/fixture.py
--- a/rhodecode/tests/fixture.py
+++ b/rhodecode/tests/fixture.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/fixtures/svn_diff_binary_add_file.diff b/rhodecode/tests/fixtures/svn_diff_binary_add_file.diff
new file mode 100644
--- /dev/null
+++ b/rhodecode/tests/fixtures/svn_diff_binary_add_file.diff
@@ -0,0 +1,9 @@
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: intl.dll
+===================================================================
+diff --git a/intl.dll b/intl.dll
+new file mode 10644
+--- /dev/null (revision 0)
++++ b/intl.dll (revision 1489)
diff --git a/rhodecode/tests/fixtures/svn_diff_multiple_changes.diff b/rhodecode/tests/fixtures/svn_diff_multiple_changes.diff
new file mode 100644
--- /dev/null
+++ b/rhodecode/tests/fixtures/svn_diff_multiple_changes.diff
@@ -0,0 +1,652 @@
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = image/png
+Index: trunk/doc/images/SettingsOverlay.png
+===================================================================
+diff --git a/trunk/doc/images/SettingsOverlay.png b/trunk/doc/images/SettingsOverlay.png
+GIT binary patch
+--- a/trunk/doc/images/SettingsOverlay.png (revision 1487)
++++ b/trunk/doc/images/SettingsOverlay.png (revision 1488)
+Index: trunk/doc/source/de/tsvn_ch04.xml
+===================================================================
+diff --git a/trunk/doc/source/de/tsvn_ch04.xml b/trunk/doc/source/de/tsvn_ch04.xml
+--- a/trunk/doc/source/de/tsvn_ch04.xml (revision 1487)
++++ b/trunk/doc/source/de/tsvn_ch04.xml (revision 1488)
+@@ -1561,39 +1561,49 @@
+
+ Abgesehen von der bevorzugten Sprache erlaubt dieser Dialog es Ihnen,
+ (fast) alle Einstellungen von TortoiseSVN zu ändern.
+-### Translate ###
+
+
+- Language
+-
+- Selects your user interface language. What did you expect?
++ Sprache
++
++ Wählt die Sprache für die Dialoge/Meldungen aus. Was
++ haben Sie anderes erwartet?
+
+
+
+
+- Exclude pattern
++ Ausschliessen
+
+
+
+- exclude pattern
++ ausschliessen
+
+- Exclude files or directories by typing in the names or extensions. Patterns are separated by spaces
+- e.g. bin obj *.bak *.~?? *.jar *.[Tt]mp. The first two entries refer to directories, the
+- other four to files.
+-
+-
+- This exclude pattern will affect all your projects. It is not versioned, so it
+- will not affect other users. In contrast you can also use the versioned svn:ignore
+- property to exclude files or directories from version control. You can set the svn:ignore
+- property using the
++ Ausgeschlossene, unversionierte Dateien werden nicht angezeigt
++ in z.B. dem Übertragen Dialog. Ausserdem werden solche Dateien
++ beim Importieren in ein Projektarchiv ignoriert.
++ Schliessen Sie Dateien oder Ordner aus durch Angabe von
++ Dateinamen oder Erweiterungen. Die einzelnen Muster werden
++ durch Leerzeichen voneinander getrennt. Zum Beispiel
++ bin obj *.bak *.~?? *.jar *.[Tt]mp.
++ Die ersten beiden Muster beziehen sich auf Ordner, die
++ restlichen vier auf Dateien.
++
++
++ Diese Auschluss-Muster beziehen sich auf alle Ihre Projekte.
++ Sie werden nicht versioniert, d.h. andere Benutzer werden davon
++ nichts mitbekommen. Im Gegensatz dazu können Sie jedoch auch
++ die versionierte Eigenschaft svn:ignore verwenden, um Dateien
++ und/oder Ordner von der Versionskontrolle auszuschliessen.
++ Sie können die svn:ignore Eigenschaft setzen durch den
+
+- Add to Ignore List
++ Ignorieren
+
+- command. After commiting every other user will have the same
+- svn:ignore property set for this project / directory as you.
++ Befehl. Nach dem Übertragen wird jeder Benutzer dieselbe
++ svn:ignore Eigenschaft für das Projekt oder den Ordner
++ haben wie Sie.
+
+
+
++### Translate ###
+
+
+ Default number of log messages
+@@ -1608,16 +1618,36 @@
+
+
+
+- Short date / time format in log messages
+-
+- If the standard long messages use up too much space on your sceen use the short format.
++ Edit...
++
++ ... the subversion configuration file directly. Some settings cannot be modified by TortoiseSVN.
+
+
+
+
+- Edit...
+-
+- ... the subversion configuration file directly. Some settings cannot be modified by TortoiseSVN.
++ Short date / time format in log messages
++
++ If the standard long messages use up too much space on your sceen use the short format.
++
++
++
++
++ Set filedates to "last commit time"
++
++
++ This option tells TortoiseSVN to set the filedates to the last commit time
++ when doing a checkout or an update. Otherwise TortoiseSVN will use
++ the current date.
++
++
++
++
++
++ Close windows automatically
++
++
++ TortoiseSVN will automatically close all progress dialogs when the action is finished.
++
+
+
+
+@@ -1629,15 +1659,15 @@
+
+
+
+- Set filedates to "last commit time"
+-
+-
+- This option tells TortoiseSVN to set the filedates to the last commit time
+- when doing a checkout or an update. Otherwise TortoiseSVN will use
+- the current date.
++ Minimum logsize in chars
++
++
++ The minimum length of a log message for a commit. If you enter
++ a shorter message than specified here, the commit is disabled.
+
+
+
++
+
+ Don't remove log messages when cancelling a commit
+
+@@ -1648,11 +1678,14 @@
+
+
+
++
+
+- Close windows automatically
+-
+-
+- TortoiseSVN will automatically close all progress dialogs when the action is finished.
++ Show BugID/Issue-Nr. Box
++
++
++ Shows a textbox in the commit dialog where you can enter
++ a BugID or Issue-Nr. from a bugtracker to associate the
++ commit with that ID/number.
+
+
+
+@@ -1673,10 +1706,32 @@
+ Sie können auch alle überlagerten Icons deaktivieren, aber wo liegt der Spaß darin?
+
+
++ Die Ausschluss Pfade sagen TortoiseSVN für welche
++ Pfade die überlagerten Icons nicht gezeichnet
++ werden sollen. Dies ist nützlich wenn Sie zum Beispiel sehr grosse
++ Arbeitskopien haben, welche grosse externe Bibliotheken, welche Sie
++ selbst nie ändern werden enthalten. Sie können dann diese Pfade
++ ausschliessen. Zum Beispiel:
++
++
++ f:\development\SVN\Subversion deaktiviert
++ die überlagerten Icons nur für diesen speziellen
++ Ordner. Sie können die Icons noch immer für alle Dateien und Ordner
++ innerhalb sehen.
++
++
++ f:\development\SVN\Subversion* deaktiviert die
++ überlagerten Icons für alle Dateien und Ordner
++ welcher Pfad mit f:\development\SVN\Subversion
++ beginnt. Das bedeutet dass auch für alle Dateien und Ordner innerhalb
++ keine überlagerten Icons angezeigt werden.
++
++
+ Ausserdem können Sie angeben, welche Befehle im
+ Hauptkontextmenu des Explorer angezeigt werden sollen und welche
+ Sie lieber im Untermenu haben wollen.
+
++
+
+
+ Der Einstellungsdialog, Netzwerkseite
+Index: trunk/doc/source/en/tsvn_ch04.xml
+===================================================================
+diff --git a/trunk/doc/source/en/tsvn_ch04.xml b/trunk/doc/source/en/tsvn_ch04.xml
+--- a/trunk/doc/source/en/tsvn_ch04.xml (revision 1487)
++++ b/trunk/doc/source/en/tsvn_ch04.xml (revision 1488)
+@@ -1457,7 +1457,7 @@
+
+ Language
+
+- Selects your user interface language. What did you expect?
++ Selects your user interface language. What else did you expect?
+
+
+
+@@ -1468,6 +1468,9 @@
+
+ exclude pattern
+
++ Exclude patterns are used to prevent unversioned files from
++ showing up e.g. in the commit dialog. Files matching the
++ patterns are also ignored by an import.
+ Exclude files or directories by typing in the names or extensions. Patterns are separated by spaces
+ e.g. bin obj *.bak *.~?? *.jar *.[Tt]mp. The first two entries refer to directories, the
+ other four to files.
+@@ -1499,23 +1502,16 @@
+
+
+
++ Edit...
++
++ ... the subversion configuration file directly. Some settings cannot be modified by TortoiseSVN.
++
++
++
++
+ Short date / time format in log messages
+
+ If the standard long messages use up too much space on your sceen use the short format.
+-
+-
+-
+-
+- Edit...
+-
+- ... the subversion configuration file directly. Some settings cannot be modified by TortoiseSVN.
+-
+-
+-
+-
+- Check for newer versions
+-
+- If checked, TortoiseSVN will check once a week if an update is available
+
+
+
+@@ -1529,6 +1525,33 @@
+
+
+
++
++
++ Close windows automatically
++
++
++ TortoiseSVN will automatically close all progress dialogs when the action is finished.
++
++
++
++
++
++ Check for newer versions
++
++ If checked, TortoiseSVN will check once a week if an update is available
++
++
++
++
++ Minimum logsize in chars
++
++
++ The minimum length of a log message for a commit. If you enter
++ a shorter message than specified here, the commit is disabled.
++
++
++
++
+
+ Don't remove log messages when cancelling a commit
+
+@@ -1539,11 +1562,14 @@
+
+
+
++
+
+- Close windows automatically
+-
+-
+- TortoiseSVN will automatically close all progress dialogs when the action is finished.
++ Show BugID/Issue-Nr. Box
++
++
++ Shows a textbox in the commit dialog where you can enter
++ a BugID or Issue-Nr. from a bugtracker to associate the
++ commit with that ID/number.
+
+
+
+@@ -1552,7 +1578,7 @@
+
+
+
+- The Settings Dialog, Overlay Tab
++ The Settings Dialog, Look and Feel Tab
+
+
+ The Settings Dialog, Overlay Tab
+@@ -1560,8 +1586,27 @@
+
+ This tab allows you to choose, for which items TortoiseSVN shall
+ display icon overlays. If you feel that your icon overlays are very
+- slow (explore is not responsive), uncheck the "show changed directories" box.
++ slow (explorer is not responsive), uncheck the "show changed directories" box.
+ You can even disable all icon overlays, but where's the fun in that?
++
++
++ The Exclude Paths are used to tell TortoiseSVN for which
++ paths not to show icon overlays and status columns.
++ This is useful if you have some very big working copies containing
++ only libraries which you won't change at all and therefore don't
++ need the overlays. For example:
++
++
++ f:\development\SVN\Subversion will disable
++ the overlays on only that specific folder. You
++ still can see the overlays on all files and folder inside that folder.
++
++
++ f:\development\SVN\Subversion* will disable the
++ overlays on all files and folders which path
++ starts with f:\development\SVN\Subversion. That
++ means you won't see overlays for all files and folder below that
++ path.
+
+
+ You can also specifiy here which of the TortoiseSVN contex menu
+Index: trunk/src/Changelog.txt
+===================================================================
+diff --git a/trunk/src/Changelog.txt b/trunk/src/Changelog.txt
+--- a/trunk/src/Changelog.txt (revision 1487)
++++ b/trunk/src/Changelog.txt (revision 1488)
+@@ -1,3 +1,5 @@
++- ADD: Option to exclude specific paths from showing
++ icon overlays. (Stefan)
+ - ADD: On Win2k and later, the authentication data is now
+ encrypted before saved. The encryption is not available
+ for the other OS's. (Stefan)
+Index: trunk/src/Resources/TortoiseProcENG.rc
+===================================================================
+diff --git a/trunk/src/Resources/TortoiseProcENG.rc b/trunk/src/Resources/TortoiseProcENG.rc
+--- a/trunk/src/Resources/TortoiseProcENG.rc (revision 1487)
++++ b/trunk/src/Resources/TortoiseProcENG.rc (revision 1488)
+@@ -398,27 +398,31 @@
+ BEGIN
+ CONTROL "&Indicate folders with changed contents",
+ IDC_CHANGEDDIRS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,
+- 20,145,10
++ 20,206,10
+ CONTROL "&Removable drives",IDC_REMOVABLE,"Button",
+- BS_AUTOCHECKBOX | WS_TABSTOP,18,66,130,10
++ BS_AUTOCHECKBOX | WS_TABSTOP,18,58,130,10
+ CONTROL "&Network drives",IDC_NETWORK,"Button",BS_AUTOCHECKBOX |
+- WS_TABSTOP,18,76,130,10
++ WS_TABSTOP,18,68,130,10
+ CONTROL "&Fixed drives",IDC_FIXED,"Button",BS_AUTOCHECKBOX |
+- WS_TABSTOP,18,87,127,10
++ WS_TABSTOP,18,79,127,10
+ CONTROL "&CD-ROM",IDC_CDROM,"Button",BS_AUTOCHECKBOX |
+- WS_TABSTOP,159,66,118,10
+- GROUPBOX "Drive Types",IDC_DRIVEGROUP,12,52,274,50
++ WS_TABSTOP,166,58,118,10
++ GROUPBOX "Drive Types",IDC_DRIVEGROUP,12,44,274,50
+ CONTROL "RAM drives",IDC_RAM,"Button",BS_AUTOCHECKBOX |
+- WS_TABSTOP,159,76,119,10
++ WS_TABSTOP,166,68,119,10
+ CONTROL "Unknown drives",IDC_UNKNOWN,"Button",BS_AUTOCHECKBOX |
+- WS_TABSTOP,159,86,118,10
++ WS_TABSTOP,166,78,118,10
+ CONTROL "Show overlays only in explorer",IDC_ONLYEXPLORER,"Button",
+- BS_AUTOCHECKBOX | WS_TABSTOP,12,33,122,10
+- GROUPBOX "Icon Overlays / Status Columns",IDC_STATIC,7,7,286,103
+- GROUPBOX "Context Menu",IDC_STATIC,7,113,286,97
++ BS_AUTOCHECKBOX | WS_TABSTOP,12,33,190,10
++ GROUPBOX "Icon Overlays / Status Columns",IDC_STATIC,7,7,286,118
++ GROUPBOX "Context Menu",IDC_STATIC,7,130,286,80
+ CONTROL "",IDC_MENULIST,"SysListView32",LVS_REPORT |
+ LVS_SINGLESEL | LVS_ALIGNLEFT | LVS_NOCOLUMNHEADER |
+- WS_BORDER | WS_TABSTOP,12,125,274,78
++ WS_BORDER | WS_TABSTOP,12,140,274,63
++ LTEXT "Exclude paths:",IDC_STATIC,12,106,85,8
++ EDITTEXT IDC_EXCLUDEPATHS,102,96,184,25,ES_MULTILINE |
++ ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_WANTRETURN |
++ WS_VSCROLL
+ END
+
+ IDD_SETTINGSPROXY DIALOGEX 0, 0, 300, 217
+@@ -860,7 +864,7 @@
+ RIGHTMARGIN, 293
+ VERTGUIDE, 12
+ VERTGUIDE, 18
+- VERTGUIDE, 159
++ VERTGUIDE, 166
+ VERTGUIDE, 286
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 210
+@@ -1377,6 +1381,8 @@
+ "If activated, prevents the overlays from showing in ""save as.."" or ""open"" dialogs"
+ IDS_SETTINGS_MENULAYOUT_TT
+ "Check those menu entries you want to appear in the top context menu instead of the submenu"
++ IDS_SETTINGS_EXCLUDELIST_TT
++ "A newline separated list of paths for which no icon overlays are shown.\nIf you add an ""*"" char at the end of a path, then all files and subdirs inside that path are excluded too.\nAn empty list will allow overlays on all paths."
+ END
+
+ STRINGTABLE
+Index: trunk/src/TortoiseProc/SetOverlayPage.cpp
+===================================================================
+diff --git a/trunk/src/TortoiseProc/SetOverlayPage.cpp b/trunk/src/TortoiseProc/SetOverlayPage.cpp
+--- a/trunk/src/TortoiseProc/SetOverlayPage.cpp (revision 1487)
++++ b/trunk/src/TortoiseProc/SetOverlayPage.cpp (revision 1488)
+@@ -20,6 +20,7 @@
+ #include "TortoiseProc.h"
+ #include "SetOverlayPage.h"
+ #include "Globals.h"
++#include ".\setoverlaypage.h"
+
+
+ // CSetOverlayPage dialog
+@@ -35,6 +36,7 @@
+ , m_bRAM(FALSE)
+ , m_bUnknown(FALSE)
+ , m_bOnlyExplorer(FALSE)
++ , m_sExcludePaths(_T(""))
+ {
+ m_regShowChangedDirs = CRegDWORD(_T("Software\\TortoiseSVN\\RecursiveOverlay"));
+ m_regOnlyExplorer = CRegDWORD(_T("Software\\TortoiseSVN\\OverlaysOnlyInExplorer"), FALSE);
+@@ -45,6 +47,7 @@
+ m_regDriveMaskRAM = CRegDWORD(_T("Software\\TortoiseSVN\\DriveMaskRAM"));
+ m_regDriveMaskUnknown = CRegDWORD(_T("Software\\TortoiseSVN\\DriveMaskUnknown"));
+ m_regTopmenu = CRegDWORD(_T("Software\\TortoiseSVN\\ContextMenuEntries"), MENUCHECKOUT | MENUUPDATE | MENUCOMMIT);
++ m_regExcludePaths = CRegString(_T("Software\\TortoiseSVN\\OverlayExcludeList"));
+
+ m_bShowChangedDirs = m_regShowChangedDirs;
+ m_bOnlyExplorer = m_regOnlyExplorer;
+@@ -55,6 +58,8 @@
+ m_bRAM = m_regDriveMaskRAM;
+ m_bUnknown = m_regDriveMaskUnknown;
+ m_topmenu = m_regTopmenu;
++ m_sExcludePaths = m_regExcludePaths;
++ m_sExcludePaths.Replace(_T("\n"), _T("\r\n"));
+ }
+
+ CSetOverlayPage::~CSetOverlayPage()
+@@ -74,6 +79,7 @@
+ DDX_Control(pDX, IDC_DRIVEGROUP, m_cDriveGroup);
+ DDX_Check(pDX, IDC_ONLYEXPLORER, m_bOnlyExplorer);
+ DDX_Control(pDX, IDC_MENULIST, m_cMenuList);
++ DDX_Text(pDX, IDC_EXCLUDEPATHS, m_sExcludePaths);
+ }
+
+
+@@ -87,6 +93,7 @@
+ ON_BN_CLICKED(IDC_RAM, OnBnClickedRam)
+ ON_BN_CLICKED(IDC_ONLYEXPLORER, OnBnClickedOnlyexplorer)
+ ON_NOTIFY(LVN_ITEMCHANGED, IDC_MENULIST, OnLvnItemchangedMenulist)
++ ON_EN_CHANGE(IDC_EXCLUDEPATHS, OnEnChangeExcludepaths)
+ END_MESSAGE_MAP()
+
+
+@@ -103,6 +110,9 @@
+ m_regDriveMaskRAM = m_bRAM;
+ m_regDriveMaskUnknown = m_bUnknown;
+ m_regTopmenu = m_topmenu;
++ m_sExcludePaths.Replace(_T("\r"), _T(""));
++ m_regExcludePaths = m_sExcludePaths;
++ m_sExcludePaths.Replace(_T("\n"), _T("\r\n"));
+ }
+ }
+
+@@ -116,7 +126,7 @@
+ m_tooltips.AddTool(IDC_CHANGEDDIRS, IDS_SETTINGS_CHANGEDDIRS_TT);
+ m_tooltips.AddTool(IDC_ONLYEXPLORER, IDS_SETTINGS_ONLYEXPLORER_TT);
+ m_tooltips.AddTool(IDC_MENULIST, IDS_SETTINGS_MENULAYOUT_TT);
+-
++ m_tooltips.AddTool(IDC_EXCLUDEPATHS, IDS_SETTINGS_EXCLUDELIST_TT);
+
+ m_cMenuList.SetExtendedStyle(LVS_EX_CHECKBOXES | LVS_EX_FULLROWSELECT | LVS_EX_DOUBLEBUFFER);
+
+@@ -280,3 +290,8 @@
+ } // if (m_cMenuList.GetItemCount() > 0)
+ *pResult = 0;
+ }
++
++void CSetOverlayPage::OnEnChangeExcludepaths()
++{
++ SetModified();
++}
+Index: trunk/src/TortoiseProc/SetOverlayPage.h
+===================================================================
+diff --git a/trunk/src/TortoiseProc/SetOverlayPage.h b/trunk/src/TortoiseProc/SetOverlayPage.h
+--- a/trunk/src/TortoiseProc/SetOverlayPage.h (revision 1487)
++++ b/trunk/src/TortoiseProc/SetOverlayPage.h (revision 1488)
+@@ -92,6 +92,8 @@
+ CIconStatic m_cDriveGroup;
+ BOOL m_bInitialized;
+ CRegDWORD m_regTopmenu;
++ CRegString m_regExcludePaths;
++ CString m_sExcludePaths;
+
+ CImageList m_imgList;
+ CListCtrl m_cMenuList;
+@@ -110,4 +112,5 @@
+ virtual BOOL OnApply();
+ afx_msg void OnBnClickedOnlyexplorer();
+ afx_msg void OnLvnItemchangedMenulist(NMHDR *pNMHDR, LRESULT *pResult);
++ afx_msg void OnEnChangeExcludepaths();
+ };
+Index: trunk/src/TortoiseProc/resource.h
+===================================================================
+diff --git a/trunk/src/TortoiseProc/resource.h b/trunk/src/TortoiseProc/resource.h
+--- a/trunk/src/TortoiseProc/resource.h (revision 1487)
++++ b/trunk/src/TortoiseProc/resource.h (revision 1488)
+@@ -179,6 +179,7 @@
+ #define IDC_MINLOGSIZE 1077
+ #define IDC_BUGID 1077
+ #define IDC_WCURL 1077
++#define IDC_EXCLUDEPATHS 1077
+ #define IDC_DRIVEGROUP 1079
+ #define IDC_PROXYGROUP 1080
+ #define IDC_SSHGROUP 1081
+@@ -427,6 +428,7 @@
+ #define IDS_SETTINGS_CHECKNEWER_TT 3100
+ #define IDS_SETTINGS_ONLYEXPLORER_TT 3101
+ #define IDS_SETTINGS_MENULAYOUT_TT 3102
++#define IDS_SETTINGS_EXCLUDELIST_TT 3103
+ #define IDS_CHECKNEWER_YOURVERSION 3200
+ #define IDS_CHECKNEWER_CURRENTVERSION 3201
+ #define IDS_CHECKNEWER_YOURUPTODATE 3202
+Index: trunk/src/TortoiseShell/ShellCache.h
+===================================================================
+diff --git a/trunk/src/TortoiseShell/ShellCache.h b/trunk/src/TortoiseShell/ShellCache.h
+--- a/trunk/src/TortoiseShell/ShellCache.h (revision 1487)
++++ b/trunk/src/TortoiseShell/ShellCache.h (revision 1488)
+@@ -21,9 +21,11 @@
+ #include "globals.h"
+ #include
+ #include
++#include
+ #include "registry.h"
+
+ #define REGISTRYTIMEOUT 2000
++#define EXCLUDELISTTIMEOUT 5000
+ #define DRIVETYPETIMEOUT 300000 // 5 min
+ #define NUMBERFMTTIMEOUT 300000
+ class ShellCache
+@@ -39,12 +41,14 @@
+ driveremove = CRegStdWORD(_T("Software\\TortoiseSVN\\DriveMaskRemovable"));
+ driveram = CRegStdWORD(_T("Software\\TortoiseSVN\\DriveMaskRAM"));
+ driveunknown = CRegStdWORD(_T("Software\\TortoiseSVN\\DriveMaskUnknown"));
++ excludelist = CRegStdString(_T("Software\\TortoiseSVN\\OverlayExcludeList"));
+ recursiveticker = GetTickCount();
+ folderoverlayticker = GetTickCount();
+ driveticker = recursiveticker;
+ drivetypeticker = recursiveticker;
+ langticker = recursiveticker;
+- columnrevformatticker = langticker;
++ columnrevformatticker = recursiveticker;
++ excludelistticker = recursiveticker;
+ menulayout = CRegStdWORD(_T("Software\\TortoiseSVN\\ContextMenuEntries"), MENUCHECKOUT | MENUUPDATE | MENUCOMMIT);
+ langid = CRegStdWORD(_T("Software\\TortoiseSVN\\LanguageID"), 1033);
+ blockstatus = CRegStdWORD(_T("Software\\TortoiseSVN\\BlockStatus"), 0);
+@@ -177,6 +181,21 @@
+ return FALSE;
+ if ((drivetype == DRIVE_UNKNOWN)&&(IsUnknown()))
+ return FALSE;
++
++ ExcludeListValid();
++ for (std::vector::iterator I = exvector.begin(); I != exvector.end(); ++I)
++ {
++ if (I->empty())
++ continue;
++ if (I->at(I->size()-1)=='*')
++ {
++ stdstring str = I->substr(0, I->size()-1);
++ if (_tcsnicmp(str.c_str(), path, str.size())==0)
++ return FALSE;
++ }
++ else if (_tcsicmp(I->c_str(), path)==0)
++ return FALSE;
++ }
+ return TRUE;
+ }
+ DWORD GetLangID()
+@@ -218,6 +237,32 @@
+ driveremove.read();
+ }
+ }
++ void ExcludeListValid()
++ {
++ if ((GetTickCount() - EXCLUDELISTTIMEOUT)>excludelistticker)
++ {
++ excludelistticker = GetTickCount();
++ excludelist.read();
++ if (excludeliststr.compare((stdstring)excludelist)==0)
++ return;
++ excludeliststr = (stdstring)excludelist;
++ exvector.clear();
++ int pos = 0, pos_ant = 0;
++ pos = excludeliststr.find(_T("\n"), pos_ant);
++ while (pos != stdstring::npos)
++ {
++ stdstring token = excludeliststr.substr(pos_ant, pos-pos_ant);
++ exvector.push_back(token);
++ pos_ant = pos+1;
++ pos = excludeliststr.find(_T("\n"), pos_ant);
++ }
++ if (!excludeliststr.empty())
++ {
++ exvector.push_back(excludeliststr.substr(pos_ant, excludeliststr.size()-1));
++ }
++ excludeliststr = (stdstring)excludelist;
++ }
++ }
+ CRegStdWORD blockstatus;
+ CRegStdWORD langid;
+ CRegStdWORD showrecursive;
+@@ -229,6 +274,9 @@
+ CRegStdWORD driveram;
+ CRegStdWORD driveunknown;
+ CRegStdWORD menulayout;
++ CRegStdString excludelist;
++ stdstring excludeliststr;
++ std::vector exvector;
+ DWORD recursiveticker;
+ DWORD folderoverlayticker;
+ DWORD driveticker;
+@@ -237,6 +285,7 @@
+ DWORD langticker;
+ DWORD blockstatusticker;
+ DWORD columnrevformatticker;
++ DWORD excludelistticker;
+ UINT drivetypecache[27];
+ TCHAR drivetypepathcache[MAX_PATH];
+ NUMBERFMT columnrevformat;
\ No newline at end of file
diff --git a/rhodecode/tests/functional/__init__.py b/rhodecode/tests/functional/__init__.py
--- a/rhodecode/tests/functional/__init__.py
+++ b/rhodecode/tests/functional/__init__.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/functional/test_admin.py b/rhodecode/tests/functional/test_admin.py
--- a/rhodecode/tests/functional/test_admin.py
+++ b/rhodecode/tests/functional/test_admin.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/functional/test_admin_auth_settings.py b/rhodecode/tests/functional/test_admin_auth_settings.py
--- a/rhodecode/tests/functional/test_admin_auth_settings.py
+++ b/rhodecode/tests/functional/test_admin_auth_settings.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/functional/test_admin_defaults.py b/rhodecode/tests/functional/test_admin_defaults.py
--- a/rhodecode/tests/functional/test_admin_defaults.py
+++ b/rhodecode/tests/functional/test_admin_defaults.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/functional/test_admin_gists.py b/rhodecode/tests/functional/test_admin_gists.py
--- a/rhodecode/tests/functional/test_admin_gists.py
+++ b/rhodecode/tests/functional/test_admin_gists.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -90,7 +90,7 @@ class TestGistsController(TestController
# Expiration information should be visible
expires_tag = '%s' % h.age_component(
- h.time_to_datetime(g2.gist_expires))
+ h.time_to_utcdatetime(g2.gist_expires))
response.mustcontain(expires_tag.replace('"', '\\"'))
def test_index_private_gists(self, create_gist):
diff --git a/rhodecode/tests/functional/test_admin_my_account.py b/rhodecode/tests/functional/test_admin_my_account.py
--- a/rhodecode/tests/functional/test_admin_my_account.py
+++ b/rhodecode/tests/functional/test_admin_my_account.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/functional/test_admin_notifications.py b/rhodecode/tests/functional/test_admin_notifications.py
--- a/rhodecode/tests/functional/test_admin_notifications.py
+++ b/rhodecode/tests/functional/test_admin_notifications.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/functional/test_admin_permissions.py b/rhodecode/tests/functional/test_admin_permissions.py
--- a/rhodecode/tests/functional/test_admin_permissions.py
+++ b/rhodecode/tests/functional/test_admin_permissions.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/functional/test_admin_repo_groups.py b/rhodecode/tests/functional/test_admin_repo_groups.py
--- a/rhodecode/tests/functional/test_admin_repo_groups.py
+++ b/rhodecode/tests/functional/test_admin_repo_groups.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/functional/test_admin_repo_settings.py b/rhodecode/tests/functional/test_admin_repo_settings.py
--- a/rhodecode/tests/functional/test_admin_repo_settings.py
+++ b/rhodecode/tests/functional/test_admin_repo_settings.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/functional/test_admin_repos.py b/rhodecode/tests/functional/test_admin_repos.py
--- a/rhodecode/tests/functional/test_admin_repos.py
+++ b/rhodecode/tests/functional/test_admin_repos.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/functional/test_admin_repos_issuetracker.py b/rhodecode/tests/functional/test_admin_repos_issuetracker.py
--- a/rhodecode/tests/functional/test_admin_repos_issuetracker.py
+++ b/rhodecode/tests/functional/test_admin_repos_issuetracker.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/functional/test_admin_settings.py b/rhodecode/tests/functional/test_admin_settings.py
--- a/rhodecode/tests/functional/test_admin_settings.py
+++ b/rhodecode/tests/functional/test_admin_settings.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -32,11 +32,11 @@ from rhodecode.tests.utils import Assert
UPDATE_DATA_QUALNAME = (
- 'rhodecode.controllers.admin.settings.SettingsController.get_update_data')
+ 'rhodecode.admin.views.system_info.AdminSystemInfoSettingsView.get_update_data')
@pytest.mark.usefixtures('autologin_user', 'app')
-class TestAdminSettingsController:
+class TestAdminSettingsController(object):
@pytest.mark.parametrize('urlname', [
'admin_settings_vcs',
@@ -46,7 +46,6 @@ class TestAdminSettingsController:
'admin_settings_email',
'admin_settings_hooks',
'admin_settings_search',
- 'admin_settings_system',
])
def test_simple_get(self, urlname, app):
app.get(url(urlname))
@@ -85,46 +84,9 @@ class TestAdminSettingsController:
response.mustcontain(no=['test_hooks_2'])
response.mustcontain(no=['cd /tmp2'])
- def test_system_update_new_version(self):
- update_data = {
- 'versions': [
- {
- 'version': '100.3.1415926535',
- 'general': 'The latest version we are ever going to ship'
- },
- {
- 'version': '0.0.0',
- 'general': 'The first version we ever shipped'
- }
- ]
- }
- with mock.patch(UPDATE_DATA_QUALNAME, return_value=update_data):
- response = self.app.get(url('admin_settings_system_update'))
- response.mustcontain('A new version is available')
-
- def test_system_update_nothing_new(self):
- update_data = {
- 'versions': [
- {
- 'version': '0.0.0',
- 'general': 'The first version we ever shipped'
- }
- ]
- }
- with mock.patch(UPDATE_DATA_QUALNAME, return_value=update_data):
- response = self.app.get(url('admin_settings_system_update'))
- response.mustcontain(
- 'You already have the latest stable version.')
-
- def test_system_update_bad_response(self):
- with mock.patch(UPDATE_DATA_QUALNAME, side_effect=ValueError('foo')):
- response = self.app.get(url('admin_settings_system_update'))
- response.mustcontain(
- 'Bad data sent from update server')
-
@pytest.mark.usefixtures('autologin_user', 'app')
-class TestAdminSettingsGlobal:
+class TestAdminSettingsGlobal(object):
def test_pre_post_code_code_active(self, csrf_token):
pre_code = 'rc-pre-code-187652122'
@@ -211,7 +173,7 @@ class TestAdminSettingsGlobal:
@pytest.mark.usefixtures('autologin_user', 'app')
-class TestAdminSettingsVcs:
+class TestAdminSettingsVcs(object):
def test_contains_svn_default_patterns(self, app):
response = app.get(url('admin_settings_vcs'))
@@ -463,7 +425,7 @@ class TestOpenSourceLicenses(object):
}
}
read_licenses_patch = mock.patch(
- 'rhodecode.admin.views.read_opensource_licenses',
+ 'rhodecode.admin.views.open_source_licenses.read_opensource_licenses',
return_value=sample_licenses)
with read_licenses_patch:
response = self.app.get(self._get_url(), status=200)
@@ -486,8 +448,90 @@ class TestOpenSourceLicenses(object):
self.app.get(self._get_url(), status=403)
+@pytest.mark.usefixtures('app')
+class TestUserSessions(object):
+
+ def _get_url(self, name='admin_settings_sessions'):
+ return {
+ 'admin_settings_sessions': ADMIN_PREFIX + '/settings/sessions',
+ 'admin_settings_sessions_cleanup': ADMIN_PREFIX + '/settings/sessions/cleanup'
+ }[name]
+
+ def test_forbidden_when_normal_user(self, autologin_regular_user):
+ self.app.get(self._get_url(), status=403)
+
+ def test_show_sessions_page(self, autologin_user):
+ response = self.app.get(self._get_url(), status=200)
+ response.mustcontain('file')
+
+ def test_cleanup_old_sessions(self, autologin_user, csrf_token):
+
+ post_data = {
+ 'csrf_token': csrf_token,
+ 'expire_days': '60'
+ }
+ response = self.app.post(
+ self._get_url('admin_settings_sessions_cleanup'), params=post_data,
+ status=302)
+ assert_session_flash(response, 'Cleaned up old sessions')
+
+
+@pytest.mark.usefixtures('app')
+class TestAdminSystemInfo(object):
+ def _get_url(self, name='admin_settings_system'):
+ return {
+ 'admin_settings_system': ADMIN_PREFIX + '/settings/system',
+ 'admin_settings_system_update': ADMIN_PREFIX + '/settings/system/updates',
+ }[name]
+
+ def test_forbidden_when_normal_user(self, autologin_regular_user):
+ self.app.get(self._get_url(), status=403)
+
+ def test_system_info_page(self, autologin_user):
+ response = self.app.get(self._get_url())
+ response.mustcontain('RhodeCode Community Edition, version {}'.format(
+ rhodecode.__version__))
+
+ def test_system_update_new_version(self, autologin_user):
+ update_data = {
+ 'versions': [
+ {
+ 'version': '100.3.1415926535',
+ 'general': 'The latest version we are ever going to ship'
+ },
+ {
+ 'version': '0.0.0',
+ 'general': 'The first version we ever shipped'
+ }
+ ]
+ }
+ with mock.patch(UPDATE_DATA_QUALNAME, return_value=update_data):
+ response = self.app.get(self._get_url('admin_settings_system_update'))
+ response.mustcontain('A new version is available')
+
+ def test_system_update_nothing_new(self, autologin_user):
+ update_data = {
+ 'versions': [
+ {
+ 'version': '0.0.0',
+ 'general': 'The first version we ever shipped'
+ }
+ ]
+ }
+ with mock.patch(UPDATE_DATA_QUALNAME, return_value=update_data):
+ response = self.app.get(self._get_url('admin_settings_system_update'))
+ response.mustcontain(
+ 'You already have the latest stable version.')
+
+ def test_system_update_bad_response(self, autologin_user):
+ with mock.patch(UPDATE_DATA_QUALNAME, side_effect=ValueError('foo')):
+ response = self.app.get(self._get_url('admin_settings_system_update'))
+ response.mustcontain(
+ 'Bad data sent from update server')
+
+
@pytest.mark.usefixtures("app")
-class TestAdminSettingsIssueTracker:
+class TestAdminSettingsIssueTracker(object):
RC_PREFIX = 'rhodecode_'
SHORT_PATTERN_KEY = 'issuetracker_pat_'
PATTERN_KEY = RC_PREFIX + SHORT_PATTERN_KEY
diff --git a/rhodecode/tests/functional/test_admin_user_groups.py b/rhodecode/tests/functional/test_admin_user_groups.py
--- a/rhodecode/tests/functional/test_admin_user_groups.py
+++ b/rhodecode/tests/functional/test_admin_user_groups.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/functional/test_admin_users.py b/rhodecode/tests/functional/test_admin_users.py
--- a/rhodecode/tests/functional/test_admin_users.py
+++ b/rhodecode/tests/functional/test_admin_users.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/functional/test_bookmarks.py b/rhodecode/tests/functional/test_bookmarks.py
--- a/rhodecode/tests/functional/test_bookmarks.py
+++ b/rhodecode/tests/functional/test_bookmarks.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/functional/test_branches.py b/rhodecode/tests/functional/test_branches.py
--- a/rhodecode/tests/functional/test_branches.py
+++ b/rhodecode/tests/functional/test_branches.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/functional/test_changelog.py b/rhodecode/tests/functional/test_changelog.py
--- a/rhodecode/tests/functional/test_changelog.py
+++ b/rhodecode/tests/functional/test_changelog.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/functional/test_changeset.py b/rhodecode/tests/functional/test_changeset.py
--- a/rhodecode/tests/functional/test_changeset.py
+++ b/rhodecode/tests/functional/test_changeset.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -288,7 +288,6 @@ Added a symlink
'Hide comments']:
response.mustcontain(elem)
-
def _check_new_diff_menus(self, response, right_menu=False,):
# diff menus
for elem in ['Show file before', 'Show file after',
diff --git a/rhodecode/tests/functional/test_commit_comments.py b/rhodecode/tests/functional/test_commit_comments.py
--- a/rhodecode/tests/functional/test_commit_comments.py
+++ b/rhodecode/tests/functional/test_commit_comments.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -244,7 +244,8 @@ class TestCommitCommentsController(TestC
('markdown', '# header', '
header
'),
('markdown', '*italics*', 'italics'),
('markdown', '**bold**', 'bold'),
- ])
+ ], ids=['rst-plain', 'rst-header', 'rst-italics', 'rst-bold', 'md-plain',
+ 'md-header', 'md-italics', 'md-bold', ])
def test_preview(self, renderer, input, output, backend):
self.log_user()
params = {
diff --git a/rhodecode/tests/functional/test_compare.py b/rhodecode/tests/functional/test_compare.py
--- a/rhodecode/tests/functional/test_compare.py
+++ b/rhodecode/tests/functional/test_compare.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -22,16 +22,13 @@ import mock
import pytest
import lxml.html
-from rhodecode.lib.vcs.backends.base import EmptyCommit
from rhodecode.lib.vcs.exceptions import RepositoryRequirementError
-from rhodecode.model.db import Repository
-from rhodecode.model.scm import ScmModel
-from rhodecode.tests import url, TEST_USER_ADMIN_LOGIN, assert_session_flash
-from rhodecode.tests.utils import AssertResponse
+from rhodecode.tests import url, assert_session_flash
+from rhodecode.tests.utils import AssertResponse, commit_change
@pytest.mark.usefixtures("autologin_user", "app")
-class TestCompareController:
+class TestCompareController(object):
@pytest.mark.xfail_backends("svn", reason="Requires pull")
def test_compare_remote_with_different_commit_indexes(self, backend):
@@ -53,23 +50,23 @@ class TestCompareController:
fork = backend.create_repo()
# prepare fork
- commit0 = _commit_change(
+ commit0 = commit_change(
fork.repo_name, filename='file1', content='A',
message='A', vcs_type=backend.alias, parent=None, newfile=True)
- commit1 = _commit_change(
+ commit1 = commit_change(
fork.repo_name, filename='file1', content='B',
message='B, child of A', vcs_type=backend.alias, parent=commit0)
- _commit_change( # commit 2
+ commit_change( # commit 2
fork.repo_name, filename='file1', content='C',
message='C, child of B', vcs_type=backend.alias, parent=commit1)
- commit3 = _commit_change(
+ commit3 = commit_change(
fork.repo_name, filename='file1', content='D',
message='D, child of A', vcs_type=backend.alias, parent=commit0)
- commit4 = _commit_change(
+ commit4 = commit_change(
fork.repo_name, filename='file1', content='E',
message='E, child of D', vcs_type=backend.alias, parent=commit3)
@@ -105,7 +102,7 @@ class TestCompareController:
repo1 = backend.create_repo()
# commit something !
- commit0 = _commit_change(
+ commit0 = commit_change(
repo1.repo_name, filename='file1', content='line1\n',
message='commit1', vcs_type=backend.alias, parent=None,
newfile=True)
@@ -114,11 +111,11 @@ class TestCompareController:
repo2 = backend.create_fork()
# add two extra commit into fork
- commit1 = _commit_change(
+ commit1 = commit_change(
repo2.repo_name, filename='file1', content='line1\nline2\n',
message='commit2', vcs_type=backend.alias, parent=commit0)
- commit2 = _commit_change(
+ commit2 = commit_change(
repo2.repo_name, filename='file1', content='line1\nline2\nline3\n',
message='commit3', vcs_type=backend.alias, parent=commit1)
@@ -156,7 +153,7 @@ class TestCompareController:
repo1 = backend.create_repo()
# commit something !
- commit0 = _commit_change(
+ commit0 = commit_change(
repo1.repo_name, filename='file1', content='line1\n',
message='commit1', vcs_type=backend.alias, parent=None,
newfile=True)
@@ -165,17 +162,17 @@ class TestCompareController:
repo2 = backend.create_fork()
# now commit something to origin repo
- _commit_change(
+ commit_change(
repo1.repo_name, filename='file2', content='line1file2\n',
message='commit2', vcs_type=backend.alias, parent=commit0,
newfile=True)
# add two extra commit into fork
- commit1 = _commit_change(
+ commit1 = commit_change(
repo2.repo_name, filename='file1', content='line1\nline2\n',
message='commit2', vcs_type=backend.alias, parent=commit0)
- commit2 = _commit_change(
+ commit2 = commit_change(
repo2.repo_name, filename='file1', content='line1\nline2\nline3\n',
message='commit3', vcs_type=backend.alias, parent=commit1)
@@ -207,9 +204,9 @@ class TestCompareController:
compare_page.swap_is_hidden()
compare_page.target_source_are_disabled()
- @pytest.mark.xfail_backends("svn", "git")
+ @pytest.mark.xfail_backends("svn")
+ # TODO(marcink): no svn support for compare two seperate repos
def test_compare_of_unrelated_forks(self, backend):
- # TODO: johbo: Fails for git due to some other issue it seems
orig = backend.create_repo(number_of_commits=1)
fork = backend.create_repo(number_of_commits=1)
@@ -245,11 +242,11 @@ class TestCompareController:
repo1 = backend.create_repo()
# commit something !
- commit0 = _commit_change(
+ commit0 = commit_change(
repo1.repo_name, filename='file1', content='line1\n',
message='commit1', vcs_type=backend.alias, parent=None,
newfile=True)
- commit1 = _commit_change(
+ commit1 = commit_change(
repo1.repo_name, filename='file1', content='line1\nline2\n',
message='commit2', vcs_type=backend.alias, parent=commit0)
@@ -257,18 +254,18 @@ class TestCompareController:
repo2 = backend.create_fork()
# now make commit3-6
- commit2 = _commit_change(
+ commit2 = commit_change(
repo1.repo_name, filename='file1', content='line1\nline2\nline3\n',
message='commit3', vcs_type=backend.alias, parent=commit1)
- commit3 = _commit_change(
+ commit3 = commit_change(
repo1.repo_name, filename='file1',
content='line1\nline2\nline3\nline4\n', message='commit4',
vcs_type=backend.alias, parent=commit2)
- commit4 = _commit_change(
+ commit4 = commit_change(
repo1.repo_name, filename='file1',
content='line1\nline2\nline3\nline4\nline5\n', message='commit5',
vcs_type=backend.alias, parent=commit3)
- _commit_change( # commit 5
+ commit_change( # commit 5
repo1.repo_name, filename='file1',
content='line1\nline2\nline3\nline4\nline5\nline6\n',
message='commit6', vcs_type=backend.alias, parent=commit4)
@@ -311,11 +308,11 @@ class TestCompareController:
repo1 = backend.create_repo()
# commit something !
- commit0 = _commit_change(
+ commit0 = commit_change(
repo1.repo_name, filename='file1', content='line1\n',
message='commit1', vcs_type=backend.alias, parent=None,
newfile=True)
- commit1 = _commit_change(
+ commit1 = commit_change(
repo1.repo_name, filename='file1', content='line1\nline2\n',
message='commit2', vcs_type=backend.alias, parent=commit0)
@@ -323,18 +320,18 @@ class TestCompareController:
backend.create_fork()
# now make commit3-6
- commit2 = _commit_change(
+ commit2 = commit_change(
repo1.repo_name, filename='file1', content='line1\nline2\nline3\n',
message='commit3', vcs_type=backend.alias, parent=commit1)
- commit3 = _commit_change(
+ commit3 = commit_change(
repo1.repo_name, filename='file1',
content='line1\nline2\nline3\nline4\n', message='commit4',
vcs_type=backend.alias, parent=commit2)
- commit4 = _commit_change(
+ commit4 = commit_change(
repo1.repo_name, filename='file1',
content='line1\nline2\nline3\nline4\nline5\n', message='commit5',
vcs_type=backend.alias, parent=commit3)
- commit5 = _commit_change(
+ commit5 = commit_change(
repo1.repo_name, filename='file1',
content='line1\nline2\nline3\nline4\nline5\nline6\n',
message='commit6', vcs_type=backend.alias, parent=commit4)
@@ -400,7 +397,7 @@ class TestCompareController:
repo1 = backend.create_repo()
r1_name = repo1.repo_name
- commit0 = _commit_change(
+ commit0 = commit_change(
repo=r1_name, filename='file1',
content='line1', message='commit1', vcs_type=backend.alias,
newfile=True)
@@ -413,19 +410,19 @@ class TestCompareController:
self.r2_id = repo2.repo_id
r2_name = repo2.repo_name
- commit1 = _commit_change(
+ commit1 = commit_change(
repo=r2_name, filename='file1-fork',
content='file1-line1-from-fork', message='commit1-fork',
vcs_type=backend.alias, parent=repo2.scm_instance()[-1],
newfile=True)
- commit2 = _commit_change(
+ commit2 = commit_change(
repo=r2_name, filename='file2-fork',
content='file2-line1-from-fork', message='commit2-fork',
vcs_type=backend.alias, parent=commit1,
newfile=True)
- _commit_change( # commit 3
+ commit_change( # commit 3
repo=r2_name, filename='file3-fork',
content='file3-line1-from-fork', message='commit3-fork',
vcs_type=backend.alias, parent=commit2, newfile=True)
@@ -447,9 +444,9 @@ class TestCompareController:
response.mustcontain('%s@%s' % (r2_name, commit_id1))
response.mustcontain('%s@%s' % (r1_name, commit_id2))
response.mustcontain('No files')
- response.mustcontain('No Commits')
+ response.mustcontain('No commits in this compare')
- commit0 = _commit_change(
+ commit0 = commit_change(
repo=r1_name, filename='file2',
content='line1-added-after-fork', message='commit2-parent',
vcs_type=backend.alias, parent=None, newfile=True)
@@ -558,7 +555,7 @@ class TestCompareController:
@pytest.mark.usefixtures("autologin_user")
-class TestCompareControllerSvn:
+class TestCompareControllerSvn(object):
def test_supports_references_with_path(self, app, backend_svn):
repo = backend_svn['svn-simple-layout']
@@ -574,7 +571,7 @@ class TestCompareControllerSvn:
status=200)
# Expecting no commits, since both paths are at the same revision
- response.mustcontain('No Commits')
+ response.mustcontain('No commits in this compare')
# Should find only one file changed when comparing those two tags
response.mustcontain('example.py')
@@ -596,7 +593,7 @@ class TestCompareControllerSvn:
status=200)
# It should show commits
- assert 'No Commits' not in response.body
+ assert 'No commits in this compare' not in response.body
# Should find only one file changed when comparing those two tags
response.mustcontain('example.py')
@@ -660,36 +657,3 @@ class ComparePage(AssertResponse):
def target_source_are_enabled(self):
response = self.response
response.mustcontain("var enable_fields = true;")
-
-
-def _commit_change(
- repo, filename, content, message, vcs_type, parent=None,
- newfile=False):
- repo = Repository.get_by_repo_name(repo)
- _commit = parent
- if not parent:
- _commit = EmptyCommit(alias=vcs_type)
-
- if newfile:
- nodes = {
- filename: {
- 'content': content
- }
- }
- commit = ScmModel().create_nodes(
- user=TEST_USER_ADMIN_LOGIN, repo=repo,
- message=message,
- nodes=nodes,
- parent_commit=_commit,
- author=TEST_USER_ADMIN_LOGIN,
- )
- else:
- commit = ScmModel().commit_change(
- repo=repo.scm_instance(), repo_name=repo.repo_name,
- commit=parent, user=TEST_USER_ADMIN_LOGIN,
- author=TEST_USER_ADMIN_LOGIN,
- message=message,
- content=content,
- f_path=filename
- )
- return commit
diff --git a/rhodecode/tests/functional/test_compare_local.py b/rhodecode/tests/functional/test_compare_local.py
--- a/rhodecode/tests/functional/test_compare_local.py
+++ b/rhodecode/tests/functional/test_compare_local.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -44,7 +44,7 @@ class TestCompareController:
response.mustcontain('%s@%s' % (backend.repo_name, tag1))
response.mustcontain('%s@%s' % (backend.repo_name, tag2))
- # outgoing changesets between tags
+ # outgoing commits between tags
commit_indexes = {
'git': [113] + range(115, 121),
'hg': [112] + range(115, 121),
@@ -118,8 +118,8 @@ class TestCompareController:
response.mustcontain('%s@%s' % (backend.repo_name, head_id))
# branches are equal
- response.mustcontain('
No files
')
- response.mustcontain('
No Commits
')
+ response.mustcontain('No files')
+ response.mustcontain('No commits in this compare')
def test_compare_commits(self, backend):
repo = backend.repo
diff --git a/rhodecode/tests/functional/test_compare_on_single_file.py b/rhodecode/tests/functional/test_compare_on_single_file.py
new file mode 100644
--- /dev/null
+++ b/rhodecode/tests/functional/test_compare_on_single_file.py
@@ -0,0 +1,192 @@
+# -*- coding: utf-8 -*-
+
+# Copyright (C) 2010-2017 RhodeCode GmbH
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License, version 3
+# (only), as published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# 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 Affero General Public License
+# along with this program. If not, see .
+#
+# This program is dual-licensed. If you wish to learn more about the
+# RhodeCode Enterprise Edition, including its added features, Support services,
+# and proprietary license terms, please see https://rhodecode.com/licenses/
+
+import os
+
+import mock
+import pytest
+
+from rhodecode.controllers.files import FilesController
+from rhodecode.lib import helpers as h
+from rhodecode.lib.compat import OrderedDict
+from rhodecode.lib.ext_json import json
+from rhodecode.lib.vcs import nodes
+from rhodecode.lib.vcs.backends.base import EmptyCommit
+from rhodecode.lib.vcs.conf import settings
+from rhodecode.lib.vcs.nodes import FileNode
+from rhodecode.model.db import Repository
+from rhodecode.model.scm import ScmModel
+from rhodecode.tests import (
+ url, TEST_USER_ADMIN_LOGIN, assert_session_flash, assert_not_in_session_flash)
+from rhodecode.tests.fixture import Fixture
+from rhodecode.tests.utils import commit_change
+
+fixture = Fixture()
+
+
+@pytest.mark.usefixtures("autologin_user", "app")
+class TestSideBySideDiff(object):
+
+ def test_diff_side_by_side(self, app, backend, backend_stub):
+ f_path = 'test_sidebyside_file.py'
+ commit1_content = 'content-25d7e49c18b159446c\n'
+ commit2_content = 'content-603d6c72c46d953420\n'
+ repo = backend.create_repo()
+
+ commit1 = commit_change(
+ repo.repo_name, filename=f_path, content=commit1_content,
+ message='A', vcs_type=backend.alias, parent=None, newfile=True)
+
+ commit2 = commit_change(
+ repo.repo_name, filename=f_path, content=commit2_content,
+ message='B, child of A', vcs_type=backend.alias, parent=commit1)
+
+ compare_url = url(
+ 'compare_url',
+ repo_name=repo.repo_name,
+ source_ref_type='rev',
+ source_ref=commit1.raw_id,
+ target_repo=repo.repo_name,
+ target_ref_type='rev',
+ target_ref=commit2.raw_id,
+ f_path=f_path,
+ diffmode='sidebyside')
+
+ response = self.app.get(compare_url)
+
+ response.mustcontain('Expand 1 commit')
+ response.mustcontain('1 file changed')
+
+ response.mustcontain(
+ 'r%s:%s...r%s:%s' % (
+ commit1.idx, commit1.short_id, commit2.idx, commit2.short_id))
+
+ response.mustcontain('{}'.format(f_path))
+
+ def test_diff_side_by_side_with_empty_file(self, app, backend, backend_stub):
+ commits = [
+ {'message': 'First commit'},
+ {'message': 'Commit with binary',
+ 'added': [nodes.FileNode('file.empty', content='')]},
+ ]
+ f_path = 'file.empty'
+ repo = backend.create_repo(commits=commits)
+ commit1 = repo.get_commit(commit_idx=0)
+ commit2 = repo.get_commit(commit_idx=1)
+
+ compare_url = url(
+ 'compare_url',
+ repo_name=repo.repo_name,
+ source_ref_type='rev',
+ source_ref=commit1.raw_id,
+ target_repo=repo.repo_name,
+ target_ref_type='rev',
+ target_ref=commit2.raw_id,
+ f_path=f_path,
+ diffmode='sidebyside')
+
+ response = self.app.get(compare_url)
+
+ response.mustcontain('Expand 1 commit')
+ response.mustcontain('1 file changed')
+
+ response.mustcontain(
+ 'r%s:%s...r%s:%s' % (
+ commit1.idx, commit1.short_id, commit2.idx, commit2.short_id))
+
+ response.mustcontain('{}'.format(f_path))
+
+ def test_diff_sidebyside_two_commits(self, app, backend):
+ commit_id_range = {
+ 'hg': {
+ 'commits': ['25d7e49c18b159446cadfa506a5cf8ad1cb04067',
+ '603d6c72c46d953420c89d36372f08d9f305f5dd'],
+ 'changes': '21 files changed: 943 inserted, 288 deleted'
+ },
+ 'git': {
+ 'commits': ['6fc9270775aaf5544c1deb014f4ddd60c952fcbb',
+ '03fa803d7e9fb14daa9a3089e0d1494eda75d986'],
+ 'changes': '21 files changed: 943 inserted, 288 deleted'
+ },
+
+ 'svn': {
+ 'commits': ['336',
+ '337'],
+ 'changes': '21 files changed: 943 inserted, 288 deleted'
+ },
+ }
+
+ commit_info = commit_id_range[backend.alias]
+ commit2, commit1 = commit_info['commits']
+ file_changes = commit_info['changes']
+
+ compare_url = url(
+ 'compare_url',
+ repo_name=backend.repo_name,
+ source_ref_type='rev',
+ source_ref=commit2,
+ target_repo=backend.repo_name,
+ target_ref_type='rev',
+ target_ref=commit1,
+ diffmode='sidebyside')
+ response = self.app.get(compare_url)
+
+ response.mustcontain('Expand 1 commit')
+ response.mustcontain(file_changes)
+
+ def test_diff_sidebyside_two_commits_single_file(self, app, backend):
+ commit_id_range = {
+ 'hg': {
+ 'commits': ['25d7e49c18b159446cadfa506a5cf8ad1cb04067',
+ '603d6c72c46d953420c89d36372f08d9f305f5dd'],
+ 'changes': '1 file changed: 1 inserted, 1 deleted'
+ },
+ 'git': {
+ 'commits': ['6fc9270775aaf5544c1deb014f4ddd60c952fcbb',
+ '03fa803d7e9fb14daa9a3089e0d1494eda75d986'],
+ 'changes': '1 file changed: 1 inserted, 1 deleted'
+ },
+
+ 'svn': {
+ 'commits': ['336',
+ '337'],
+ 'changes': '1 file changed: 1 inserted, 1 deleted'
+ },
+ }
+ f_path = 'docs/conf.py'
+
+ commit_info = commit_id_range[backend.alias]
+ commit2, commit1 = commit_info['commits']
+ file_changes = commit_info['changes']
+
+ compare_url = url(
+ 'compare_url',
+ repo_name=backend.repo_name,
+ source_ref_type='rev',
+ source_ref=commit2,
+ target_repo=backend.repo_name,
+ target_ref_type='rev',
+ target_ref=commit1,
+ f_path=f_path,
+ diffmode='sidebyside')
+ response = self.app.get(compare_url)
+
+ response.mustcontain('Expand 1 commit')
+ response.mustcontain(file_changes)
diff --git a/rhodecode/tests/functional/test_feed.py b/rhodecode/tests/functional/test_feed.py
--- a/rhodecode/tests/functional/test_feed.py
+++ b/rhodecode/tests/functional/test_feed.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/functional/test_files.py b/rhodecode/tests/functional/test_files.py
--- a/rhodecode/tests/functional/test_files.py
+++ b/rhodecode/tests/functional/test_files.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -28,15 +28,11 @@ from rhodecode.lib import helpers as h
from rhodecode.lib.compat import OrderedDict
from rhodecode.lib.ext_json import json
from rhodecode.lib.vcs import nodes
-from rhodecode.lib.vcs.backends.base import EmptyCommit
+
from rhodecode.lib.vcs.conf import settings
-from rhodecode.lib.vcs.nodes import FileNode
-from rhodecode.model.db import Repository
-from rhodecode.model.scm import ScmModel
from rhodecode.tests import (
- url, TEST_USER_ADMIN_LOGIN, assert_session_flash, assert_not_in_session_flash)
+ url, assert_session_flash, assert_not_in_session_flash)
from rhodecode.tests.fixture import Fixture
-from rhodecode.tests.utils import AssertResponse
fixture = Fixture()
@@ -48,40 +44,6 @@ NODE_HISTORY = {
-def _commit_change(
- repo, filename, content, message, vcs_type, parent=None,
- newfile=False):
- repo = Repository.get_by_repo_name(repo)
- _commit = parent
- if not parent:
- _commit = EmptyCommit(alias=vcs_type)
-
- if newfile:
- nodes = {
- filename: {
- 'content': content
- }
- }
- commit = ScmModel().create_nodes(
- user=TEST_USER_ADMIN_LOGIN, repo=repo,
- message=message,
- nodes=nodes,
- parent_commit=_commit,
- author=TEST_USER_ADMIN_LOGIN,
- )
- else:
- commit = ScmModel().commit_change(
- repo=repo.scm_instance(), repo_name=repo.repo_name,
- commit=parent, user=TEST_USER_ADMIN_LOGIN,
- author=TEST_USER_ADMIN_LOGIN,
- message=message,
- content=content,
- f_path=filename
- )
- return commit
-
-
-
@pytest.mark.usefixtures("app")
class TestFilesController:
@@ -120,7 +82,7 @@ class TestFilesController:
response = self.app.get(url(
controller='files', action='index',
repo_name=repo.repo_name, revision='tip', f_path='/'))
- assert_response = AssertResponse(response)
+ assert_response = response.assert_response()
assert_response.contains_one_link(
'absolute-path @ 000000000000', 'http://example.com/absolute-path')
@@ -130,7 +92,7 @@ class TestFilesController:
response = self.app.get(url(
controller='files', action='index',
repo_name=repo.repo_name, revision='tip', f_path='/'))
- assert_response = AssertResponse(response)
+ assert_response = response.assert_response()
assert_response.contains_one_link(
'subpaths-path @ 000000000000',
'http://sub-base.example.com/subpaths-path')
@@ -179,21 +141,24 @@ class TestFilesController:
assert_dirs_in_response(response, dirs, params)
assert_files_in_response(response, files, params)
- @pytest.mark.xfail_backends("git", reason="Missing branches in git repo")
- @pytest.mark.xfail_backends("svn", reason="Depends on branch support")
def test_index_different_branch(self, backend):
- # TODO: Git test repository does not contain branches
- # TODO: Branch support in Subversion
-
- commit = backend.repo.get_commit(commit_idx=150)
+ branches = dict(
+ hg=(150, ['git']),
+ # TODO: Git test repository does not contain other branches
+ git=(633, ['master']),
+ # TODO: Branch support in Subversion
+ svn=(150, [])
+ )
+ idx, branches = branches[backend.alias]
+ commit = backend.repo.get_commit(commit_idx=idx)
response = self.app.get(url(
controller='files', action='index',
repo_name=backend.repo_name,
revision=commit.raw_id,
f_path='/'))
- assert_response = AssertResponse(response)
- assert_response.element_contains(
- '.tags .branchtag', 'git')
+ assert_response = response.assert_response()
+ for branch in branches:
+ assert_response.element_contains('.tags .branchtag', branch)
def test_index_paging(self, backend):
repo = backend.repo
@@ -221,7 +186,7 @@ class TestFilesController:
msgbox = """
%s
"""
response.mustcontain(msgbox % (commit.message, ))
- assert_response = AssertResponse(response)
+ assert_response = response.assert_response()
if commit.branch:
assert_response.element_contains('.tags.tags-main .branchtag', commit.branch)
if commit.tags:
@@ -348,7 +313,7 @@ class TestFilesController:
f_path='/', commit_id=commit.raw_id),
extra_environ=xhr_header)
- assert_response = AssertResponse(response)
+ assert_response = response.assert_response()
for attr in ['data-commit-id', 'data-date', 'data-author']:
elements = assert_response.get_elements('[{}]'.format(attr))
@@ -401,7 +366,7 @@ class TestFilesController:
# TODO: johbo: Think about a better place for these tests. Either controller
# specific unit tests or we move down the whole logic further towards the vcs
# layer
-class TestAdjustFilePathForSvn:
+class TestAdjustFilePathForSvn(object):
"""SVN specific adjustments of node history in FileController."""
def test_returns_path_relative_to_matched_reference(self):
@@ -433,7 +398,7 @@ class TestAdjustFilePathForSvn:
@pytest.mark.usefixtures("app")
-class TestRepositoryArchival:
+class TestRepositoryArchival(object):
def test_archival(self, backend):
backend.enable_downloads()
@@ -485,7 +450,7 @@ class TestRepositoryArchival:
@pytest.mark.usefixtures("app", "autologin_user")
-class TestRawFileHandling:
+class TestRawFileHandling(object):
def test_raw_file_ok(self, backend):
commit = backend.repo.get_commit(commit_idx=173)
@@ -575,6 +540,7 @@ class TestFilesDiff:
def test_file_full_diff(self, backend, diff):
commit1 = backend.repo.get_commit(commit_idx=-1)
commit2 = backend.repo.get_commit(commit_idx=-2)
+
response = self.app.get(
url(
controller='files',
@@ -582,11 +548,17 @@ class TestFilesDiff:
repo_name=backend.repo_name,
f_path='README'),
params={
- 'diff1': commit1.raw_id,
- 'diff2': commit2.raw_id,
+ 'diff1': commit2.raw_id,
+ 'diff2': commit1.raw_id,
'fulldiff': '1',
'diff': diff,
})
+
+ if diff == 'diff':
+ # use redirect since this is OLD view redirecting to compare page
+ response = response.follow()
+
+ # It's a symlink to README.rst
response.mustcontain('README.rst')
response.mustcontain('No newline at end of file')
@@ -610,7 +582,17 @@ class TestFilesDiff:
'fulldiff': '1',
'diff': 'diff',
})
- response.mustcontain('Cannot diff binary files')
+ # use redirect since this is OLD view redirecting to compare page
+ response = response.follow()
+ response.mustcontain('Expand 1 commit')
+ response.mustcontain('1 file changed: 0 inserted, 0 deleted')
+
+ if backend.alias == 'svn':
+ response.mustcontain('new file 10644')
+ # TODO(marcink): SVN doesn't yet detect binary changes
+ else:
+ response.mustcontain('new file 100644')
+ response.mustcontain('binary diff hidden')
def test_diff_2way(self, backend):
commit1 = backend.repo.get_commit(commit_idx=-1)
@@ -622,14 +604,15 @@ class TestFilesDiff:
repo_name=backend.repo_name,
f_path='README'),
params={
- 'diff1': commit1.raw_id,
- 'diff2': commit2.raw_id,
+ 'diff1': commit2.raw_id,
+ 'diff2': commit1.raw_id,
})
+ # use redirect since this is OLD view redirecting to compare page
+ response = response.follow()
- # Expecting links to both variants of the file. Links are used
- # to load the content dynamically.
- response.mustcontain('/%s/README' % commit1.raw_id)
- response.mustcontain('/%s/README' % commit2.raw_id)
+ # It's a symlink to README.rst
+ response.mustcontain('README.rst')
+ response.mustcontain('No newline at end of file')
def test_requires_one_commit_id(self, backend, autologin_user):
response = self.app.get(
@@ -642,21 +625,23 @@ class TestFilesDiff:
response.mustcontain(
'Need query parameter', 'diff1', 'diff2', 'to generate a diff.')
- def test_returns_not_found_if_file_does_not_exist(self, vcsbackend):
+ def test_returns_no_files_if_file_does_not_exist(self, vcsbackend):
repo = vcsbackend.repo
- self.app.get(
+ response = self.app.get(
url(
controller='files',
action='diff',
repo_name=repo.name,
f_path='does-not-exist-in-any-commit',
diff1=repo[0].raw_id,
- diff2=repo[1].raw_id),
- status=404)
+ diff2=repo[1].raw_id),)
+
+ response = response.follow()
+ response.mustcontain('No files')
def test_returns_redirect_if_file_not_changed(self, backend):
commit = backend.repo.get_commit(commit_idx=-1)
- f_path= 'README'
+ f_path = 'README'
response = self.app.get(
url(
controller='files',
@@ -666,25 +651,40 @@ class TestFilesDiff:
diff1=commit.raw_id,
diff2=commit.raw_id,
),
- status=302
)
- assert response.headers['Location'].endswith(f_path)
- redirected = response.follow()
- redirected.mustcontain('has not changed between')
+ response = response.follow()
+ response.mustcontain('No files')
+ response.mustcontain('No commits in this compare')
def test_supports_diff_to_different_path_svn(self, backend_svn):
+ #TODO: check this case
+ return
+
repo = backend_svn['svn-simple-layout'].scm_instance()
- commit_id = repo[-1].raw_id
+ commit_id_1 = '24'
+ commit_id_2 = '26'
+
+
+ print( url(
+ controller='files',
+ action='diff',
+ repo_name=repo.name,
+ f_path='trunk/example.py',
+ diff1='tags/v0.2/example.py@' + commit_id_1,
+ diff2=commit_id_2))
+
response = self.app.get(
url(
controller='files',
action='diff',
repo_name=repo.name,
f_path='trunk/example.py',
- diff1='tags/v0.2/example.py@' + commit_id,
- diff2=commit_id),
- status=200)
+ diff1='tags/v0.2/example.py@' + commit_id_1,
+ diff2=commit_id_2))
+
+ response = response.follow()
response.mustcontain(
+ # diff contains this
"Will print out a useful message on invocation.")
# Note: Expecting that we indicate the user what's being compared
@@ -692,6 +692,9 @@ class TestFilesDiff:
response.mustcontain("tags/v0.2/example.py")
def test_show_rev_redirects_to_svn_path(self, backend_svn):
+ #TODO: check this case
+ return
+
repo = backend_svn['svn-simple-layout'].scm_instance()
commit_id = repo[-1].raw_id
response = self.app.get(
@@ -708,6 +711,9 @@ class TestFilesDiff:
'svn-svn-simple-layout/files/26/branches/argparse/example.py')
def test_show_rev_and_annotate_redirects_to_svn_path(self, backend_svn):
+ #TODO: check this case
+ return
+
repo = backend_svn['svn-simple-layout'].scm_instance()
commit_id = repo[-1].raw_id
response = self.app.get(
@@ -979,100 +985,3 @@ def _assert_items_in_response(response,
def assert_timeago_in_response(response, items, params):
for item in items:
response.mustcontain(h.age_component(params['date']))
-
-
-
-@pytest.mark.usefixtures("autologin_user", "app")
-class TestSideBySideDiff:
-
- def test_diff2way(self, app, backend, backend_stub):
- f_path = 'content'
- commit1_content = 'content-25d7e49c18b159446c'
- commit2_content = 'content-603d6c72c46d953420'
- repo = backend.create_repo()
-
- commit1 = _commit_change(
- repo.repo_name, filename=f_path, content=commit1_content,
- message='A', vcs_type=backend.alias, parent=None, newfile=True)
-
- commit2 = _commit_change(
- repo.repo_name, filename=f_path, content=commit2_content,
- message='B, child of A', vcs_type=backend.alias, parent=commit1)
-
- response = self.app.get(url(
- controller='files', action='diff_2way',
- repo_name=repo.repo_name,
- diff1=commit1.raw_id,
- diff2=commit2.raw_id,
- f_path=f_path))
-
- assert_response = AssertResponse(response)
- response.mustcontain(
- ('Side-by-side Diff r0:%s ... r1:%s') % ( commit1.short_id, commit2.short_id ))
- response.mustcontain('id="compare"')
- response.mustcontain((
- "var orig1_url = '/%s/raw/%s/%s';\n"
- "var orig2_url = '/%s/raw/%s/%s';") %
- ( repo.repo_name, commit1.raw_id, f_path,
- repo.repo_name, commit2.raw_id, f_path))
-
-
- def test_diff2way_with_empty_file(self, app, backend, backend_stub):
- commits = [
- {'message': 'First commit'},
- {'message': 'Commit with binary',
- 'added': [nodes.FileNode('file.empty', content='')]},
- ]
- f_path='file.empty'
- repo = backend.create_repo(commits=commits)
- commit_id1 = repo.get_commit(commit_idx=0).raw_id
- commit_id2 = repo.get_commit(commit_idx=1).raw_id
-
- response = self.app.get(url(
- controller='files', action='diff_2way',
- repo_name=repo.repo_name,
- diff1=commit_id1,
- diff2=commit_id2,
- f_path=f_path))
-
- assert_response = AssertResponse(response)
- if backend.alias == 'svn':
- assert_session_flash( response,
- ('%(file_path)s has not changed') % { 'file_path': 'file.empty' })
- else:
- response.mustcontain(
- ('Side-by-side Diff r0:%s ... r1:%s') % ( repo.get_commit(commit_idx=0).short_id, repo.get_commit(commit_idx=1).short_id ))
- response.mustcontain('id="compare"')
- response.mustcontain((
- "var orig1_url = '/%s/raw/%s/%s';\n"
- "var orig2_url = '/%s/raw/%s/%s';") %
- ( repo.repo_name, commit_id1, f_path,
- repo.repo_name, commit_id2, f_path))
-
-
- def test_empty_diff_2way_redirect_to_summary_with_alert(self, app, backend):
- commit_id_range = {
- 'hg': (
- '25d7e49c18b159446cadfa506a5cf8ad1cb04067',
- '603d6c72c46d953420c89d36372f08d9f305f5dd'),
- 'git': (
- '6fc9270775aaf5544c1deb014f4ddd60c952fcbb',
- '03fa803d7e9fb14daa9a3089e0d1494eda75d986'),
- 'svn': (
- '335',
- '337'),
- }
- f_path = 'setup.py'
-
- commit_ids = commit_id_range[backend.alias]
-
- response = self.app.get(url(
- controller='files', action='diff_2way',
- repo_name=backend.repo_name,
- diff2=commit_ids[0],
- diff1=commit_ids[1],
- f_path=f_path))
-
- assert_response = AssertResponse(response)
- assert_session_flash( response,
- ('%(file_path)s has not changed') % { 'file_path': f_path })
diff --git a/rhodecode/tests/functional/test_followers.py b/rhodecode/tests/functional/test_followers.py
--- a/rhodecode/tests/functional/test_followers.py
+++ b/rhodecode/tests/functional/test_followers.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/functional/test_forks.py b/rhodecode/tests/functional/test_forks.py
--- a/rhodecode/tests/functional/test_forks.py
+++ b/rhodecode/tests/functional/test_forks.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/functional/test_home.py b/rhodecode/tests/functional/test_home.py
--- a/rhodecode/tests/functional/test_home.py
+++ b/rhodecode/tests/functional/test_home.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/functional/test_integrations.py b/rhodecode/tests/functional/test_integrations.py
--- a/rhodecode/tests/functional/test_integrations.py
+++ b/rhodecode/tests/functional/test_integrations.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/functional/test_journal.py b/rhodecode/tests/functional/test_journal.py
--- a/rhodecode/tests/functional/test_journal.py
+++ b/rhodecode/tests/functional/test_journal.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/functional/test_login.py b/rhodecode/tests/functional/test_login.py
--- a/rhodecode/tests/functional/test_login.py
+++ b/rhodecode/tests/functional/test_login.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/functional/test_pullrequests.py b/rhodecode/tests/functional/test_pullrequests.py
--- a/rhodecode/tests/functional/test_pullrequests.py
+++ b/rhodecode/tests/functional/test_pullrequests.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -541,7 +541,9 @@ class TestPullrequestsController:
params={'csrf_token': csrf_token}).follow()
assert response.status_int == 200
- assert 'Server-side pull request merging is disabled.' in response.body
+ response.mustcontain(
+ 'Merge is not currently possible because of below failed checks.')
+ response.mustcontain('Server-side pull request merging is disabled.')
@pytest.mark.skip_backends('svn')
def test_merge_pull_request_not_approved(self, pr_util, csrf_token):
@@ -556,10 +558,11 @@ class TestPullrequestsController:
pull_request_id=str(pull_request_id)),
params={'csrf_token': csrf_token}).follow()
- pull_request = PullRequest.get(pull_request_id)
+ assert response.status_int == 200
- assert response.status_int == 200
- assert ' Reviewer approval is pending.' in response.body
+ response.mustcontain(
+ 'Merge is not currently possible because of below failed checks.')
+ response.mustcontain('Pull request reviewer approval is pending.')
def test_update_source_revision(self, backend, csrf_token):
commits = [
diff --git a/rhodecode/tests/functional/test_search.py b/rhodecode/tests/functional/test_search.py
--- a/rhodecode/tests/functional/test_search.py
+++ b/rhodecode/tests/functional/test_search.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/functional/test_sessions.py b/rhodecode/tests/functional/test_sessions.py
--- a/rhodecode/tests/functional/test_sessions.py
+++ b/rhodecode/tests/functional/test_sessions.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/functional/test_summary.py b/rhodecode/tests/functional/test_summary.py
--- a/rhodecode/tests/functional/test_summary.py
+++ b/rhodecode/tests/functional/test_summary.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/functional/test_tags.py b/rhodecode/tests/functional/test_tags.py
--- a/rhodecode/tests/functional/test_tags.py
+++ b/rhodecode/tests/functional/test_tags.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/functional/test_users.py b/rhodecode/tests/functional/test_users.py
--- a/rhodecode/tests/functional/test_users.py
+++ b/rhodecode/tests/functional/test_users.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/integrations/conftest.py b/rhodecode/tests/integrations/conftest.py
--- a/rhodecode/tests/integrations/conftest.py
+++ b/rhodecode/tests/integrations/conftest.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/integrations/test_integration.py b/rhodecode/tests/integrations/test_integration.py
--- a/rhodecode/tests/integrations/test_integration.py
+++ b/rhodecode/tests/integrations/test_integration.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/integrations/test_slack.py b/rhodecode/tests/integrations/test_slack.py
--- a/rhodecode/tests/integrations/test_slack.py
+++ b/rhodecode/tests/integrations/test_slack.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/integrations/test_webhook.py b/rhodecode/tests/integrations/test_webhook.py
--- a/rhodecode/tests/integrations/test_webhook.py
+++ b/rhodecode/tests/integrations/test_webhook.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/lib/__init__.py b/rhodecode/tests/lib/__init__.py
--- a/rhodecode/tests/lib/__init__.py
+++ b/rhodecode/tests/lib/__init__.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/lib/auth_modules/test_auth_modules.py b/rhodecode/tests/lib/auth_modules/test_auth_modules.py
--- a/rhodecode/tests/lib/auth_modules/test_auth_modules.py
+++ b/rhodecode/tests/lib/auth_modules/test_auth_modules.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/lib/middleware/__init__.py b/rhodecode/tests/lib/middleware/__init__.py
--- a/rhodecode/tests/lib/middleware/__init__.py
+++ b/rhodecode/tests/lib/middleware/__init__.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/lib/middleware/mock_scm_app.py b/rhodecode/tests/lib/middleware/mock_scm_app.py
--- a/rhodecode/tests/lib/middleware/mock_scm_app.py
+++ b/rhodecode/tests/lib/middleware/mock_scm_app.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/lib/middleware/test_appenlight.py b/rhodecode/tests/lib/middleware/test_appenlight.py
--- a/rhodecode/tests/lib/middleware/test_appenlight.py
+++ b/rhodecode/tests/lib/middleware/test_appenlight.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/lib/middleware/test_csrf.py b/rhodecode/tests/lib/middleware/test_csrf.py
--- a/rhodecode/tests/lib/middleware/test_csrf.py
+++ b/rhodecode/tests/lib/middleware/test_csrf.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -21,15 +21,15 @@
import wsgiref.simple_server
import pytest
-import webtest
+from rhodecode.tests.utils import CustomTestApp
from rhodecode.lib.middleware import csrf
def test_origin_checker_no_origin():
app = csrf.OriginChecker(
wsgiref.simple_server.demo_app, 'https://safe.org')
- app = webtest.TestApp(app)
+ app = CustomTestApp(app)
app.post('/foo')
@@ -37,7 +37,7 @@ def test_origin_checker_no_origin():
def test_origin_checker_null_origin():
app = csrf.OriginChecker(
wsgiref.simple_server.demo_app, 'https://safe.org')
- app = webtest.TestApp(app)
+ app = CustomTestApp(app)
app.post('/foo', headers={'Origin': 'null'})
@@ -50,7 +50,7 @@ def test_origin_checker_null_origin():
def test_origin_checker_valid_origin(origin):
app = csrf.OriginChecker(
wsgiref.simple_server.demo_app, 'http://safe.org')
- app = webtest.TestApp(app)
+ app = CustomTestApp(app)
app.post('/foo', headers={'Origin': origin})
@@ -63,7 +63,7 @@ def test_origin_checker_valid_origin(ori
def test_origin_checker_valid_origin_https(origin):
app = csrf.OriginChecker(
wsgiref.simple_server.demo_app, 'https://safe.org')
- app = webtest.TestApp(app)
+ app = CustomTestApp(app)
app.post('/foo', headers={'Origin': origin})
@@ -76,7 +76,7 @@ def test_origin_checker_valid_origin_htt
def test_origin_checker_invalid_origin(origin):
app = csrf.OriginChecker(
wsgiref.simple_server.demo_app, 'https://safe.org')
- app = webtest.TestApp(app)
+ app = CustomTestApp(app)
app.post('/foo', headers={'Origin': origin}, status=403)
@@ -84,6 +84,6 @@ def test_origin_checker_invalid_origin(o
def test_origin_checker_invalid_origin_skipped_url():
app = csrf.OriginChecker(
wsgiref.simple_server.demo_app, 'https://safe.org', skip_urls=['/foo'])
- app = webtest.TestApp(app)
+ app = CustomTestApp(app)
app.post('/foo', headers={'Origin': 'http://www.evil.org'})
diff --git a/rhodecode/tests/lib/middleware/test_simplegit.py b/rhodecode/tests/lib/middleware/test_simplegit.py
--- a/rhodecode/tests/lib/middleware/test_simplegit.py
+++ b/rhodecode/tests/lib/middleware/test_simplegit.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/lib/middleware/test_simplehg.py b/rhodecode/tests/lib/middleware/test_simplehg.py
--- a/rhodecode/tests/lib/middleware/test_simplehg.py
+++ b/rhodecode/tests/lib/middleware/test_simplehg.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/lib/middleware/test_simplesvn.py b/rhodecode/tests/lib/middleware/test_simplesvn.py
--- a/rhodecode/tests/lib/middleware/test_simplesvn.py
+++ b/rhodecode/tests/lib/middleware/test_simplesvn.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/lib/middleware/test_simplevcs.py b/rhodecode/tests/lib/middleware/test_simplevcs.py
--- a/rhodecode/tests/lib/middleware/test_simplevcs.py
+++ b/rhodecode/tests/lib/middleware/test_simplevcs.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -22,7 +22,8 @@ import base64
import mock
import pytest
-import webtest.app
+
+from rhodecode.tests.utils import CustomTestApp
from rhodecode.lib.caching_query import FromCache
from rhodecode.lib.hooks_daemon import DummyHooksCallbackDaemon
@@ -72,7 +73,7 @@ def vcscontroller(pylonsapp, config_stub
set_anonymous_access(True)
controller = StubVCSController(pylonsapp, pylonsapp.config, None)
app = HttpsFixup(controller, pylonsapp.config)
- app = webtest.app.TestApp(app)
+ app = CustomTestApp(app)
_remove_default_user_from_query_cache()
@@ -137,7 +138,7 @@ class StubFailVCSController(simplevcs.Si
def fail_controller(pylonsapp):
controller = StubFailVCSController(pylonsapp, pylonsapp.config, None)
controller = HttpsFixup(controller, pylonsapp.config)
- controller = webtest.app.TestApp(controller)
+ controller = CustomTestApp(controller)
return controller
diff --git a/rhodecode/tests/lib/middleware/test_vcs.py b/rhodecode/tests/lib/middleware/test_vcs.py
--- a/rhodecode/tests/lib/middleware/test_vcs.py
+++ b/rhodecode/tests/lib/middleware/test_vcs.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/lib/middleware/test_vcs_unavailable.py b/rhodecode/tests/lib/middleware/test_vcs_unavailable.py
--- a/rhodecode/tests/lib/middleware/test_vcs_unavailable.py
+++ b/rhodecode/tests/lib/middleware/test_vcs_unavailable.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/lib/middleware/utils/__init__.py b/rhodecode/tests/lib/middleware/utils/__init__.py
--- a/rhodecode/tests/lib/middleware/utils/__init__.py
+++ b/rhodecode/tests/lib/middleware/utils/__init__.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/lib/middleware/utils/test_scm_app_http.py b/rhodecode/tests/lib/middleware/utils/test_scm_app_http.py
--- a/rhodecode/tests/lib/middleware/utils/test_scm_app_http.py
+++ b/rhodecode/tests/lib/middleware/utils/test_scm_app_http.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2016-2016 RhodeCode GmbH
+# Copyright (C) 2016-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -21,8 +21,8 @@
import mock
import Pyro4
import pytest
-import webtest
+from rhodecode.tests.utils import CustomTestApp
from rhodecode.lib.middleware.utils import scm_app_http, scm_app
from rhodecode.lib.vcs.conf import settings
@@ -34,7 +34,7 @@ def vcs_http_app(vcsserver_http_echo_app
git_url = vcsserver_http_echo_app.http_url + 'stream/git/'
vcs_http_proxy = scm_app_http.VcsHttpProxy(
git_url, 'stub_path', 'stub_name', None)
- app = webtest.TestApp(vcs_http_proxy)
+ app = CustomTestApp(vcs_http_proxy)
return app
@@ -112,7 +112,7 @@ def vcs_pyro4_app(vcsserver_pyro_echo_ap
GIT_REMOTE_WSGI):
pyro4_app = scm_app.create_git_wsgi_app(
'stub_path', 'stub_name', stub_config)
- app = webtest.TestApp(pyro4_app)
+ app = CustomTestApp(pyro4_app)
return app
diff --git a/rhodecode/tests/lib/middleware/utils/test_scm_app_http_chunking.py b/rhodecode/tests/lib/middleware/utils/test_scm_app_http_chunking.py
--- a/rhodecode/tests/lib/middleware/utils/test_scm_app_http_chunking.py
+++ b/rhodecode/tests/lib/middleware/utils/test_scm_app_http_chunking.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2016-2016 RhodeCode GmbH
+# Copyright (C) 2016-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/lib/middleware/utils/test_wsgi_app_caller_client.py b/rhodecode/tests/lib/middleware/utils/test_wsgi_app_caller_client.py
--- a/rhodecode/tests/lib/middleware/utils/test_wsgi_app_caller_client.py
+++ b/rhodecode/tests/lib/middleware/utils/test_wsgi_app_caller_client.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -18,8 +18,7 @@
# RhodeCode Enterprise Edition, including its added features, Support services,
# and proprietary license terms, please see https://rhodecode.com/licenses/
-import webtest
-
+from rhodecode.tests.utils import CustomTestApp
from rhodecode.lib.middleware.utils import wsgi_app_caller_client
# pylint: disable=protected-access,too-many-public-methods
@@ -88,7 +87,7 @@ def test_remote_app_caller():
wrapper_app = wsgi_app_caller_client.RemoteAppCaller(
RemoteAppCallerMock(), 'a1', 'a2', arg3='a3', arg4='a4')
- test_app = webtest.TestApp(wrapper_app)
+ test_app = CustomTestApp(wrapper_app)
response = test_app.get('/path')
diff --git a/rhodecode/tests/lib/test_action_parser.py b/rhodecode/tests/lib/test_action_parser.py
--- a/rhodecode/tests/lib/test_action_parser.py
+++ b/rhodecode/tests/lib/test_action_parser.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/lib/test_auth.py b/rhodecode/tests/lib/test_auth.py
--- a/rhodecode/tests/lib/test_auth.py
+++ b/rhodecode/tests/lib/test_auth.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/lib/test_auth_crypto_backend.py b/rhodecode/tests/lib/test_auth_crypto_backend.py
--- a/rhodecode/tests/lib/test_auth_crypto_backend.py
+++ b/rhodecode/tests/lib/test_auth_crypto_backend.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/lib/test_base.py b/rhodecode/tests/lib/test_base.py
--- a/rhodecode/tests/lib/test_base.py
+++ b/rhodecode/tests/lib/test_base.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/lib/test_caches.py b/rhodecode/tests/lib/test_caches.py
--- a/rhodecode/tests/lib/test_caches.py
+++ b/rhodecode/tests/lib/test_caches.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2016-2016 RhodeCode GmbH
+# Copyright (C) 2016-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/lib/test_codeblocks.py b/rhodecode/tests/lib/test_codeblocks.py
--- a/rhodecode/tests/lib/test_codeblocks.py
+++ b/rhodecode/tests/lib/test_codeblocks.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2016-2016 RhodeCode GmbH
+# Copyright (C) 2016-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/lib/test_colored_formatter.py b/rhodecode/tests/lib/test_colored_formatter.py
--- a/rhodecode/tests/lib/test_colored_formatter.py
+++ b/rhodecode/tests/lib/test_colored_formatter.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/lib/test_datelib.py b/rhodecode/tests/lib/test_datelib.py
--- a/rhodecode/tests/lib/test_datelib.py
+++ b/rhodecode/tests/lib/test_datelib.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/lib/test_db_manage.py b/rhodecode/tests/lib/test_db_manage.py
--- a/rhodecode/tests/lib/test_db_manage.py
+++ b/rhodecode/tests/lib/test_db_manage.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/lib/test_dbmigrate.py b/rhodecode/tests/lib/test_dbmigrate.py
--- a/rhodecode/tests/lib/test_dbmigrate.py
+++ b/rhodecode/tests/lib/test_dbmigrate.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/lib/test_diffs.py b/rhodecode/tests/lib/test_diffs.py
--- a/rhodecode/tests/lib/test_diffs.py
+++ b/rhodecode/tests/lib/test_diffs.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -531,6 +531,81 @@ DIFF_FIXTURES = [
}),
]),
+ ('svn',
+ 'svn_diff_binary_add_file.diff',
+ [('intl.dll', 'A',
+ {'added': 0,
+ 'deleted': 0,
+ 'binary': False,
+ 'ops': {NEW_FILENODE: 'new file 10644',
+ #TODO(Marcink): depends on binary detection on svn patches
+ # BIN_FILENODE: 'binary diff hidden'
+ }
+ }),
+ ]),
+
+ ('svn',
+ 'svn_diff_multiple_changes.diff',
+ [('trunk/doc/images/SettingsOverlay.png', 'M',
+ {'added': 0,
+ 'deleted': 0,
+ 'binary': False,
+ 'ops': {MOD_FILENODE: 'modified file',
+ #TODO(Marcink): depends on binary detection on svn patches
+ # BIN_FILENODE: 'binary diff hidden'
+ }
+ }),
+ ('trunk/doc/source/de/tsvn_ch04.xml', 'M',
+ {'added': 89,
+ 'deleted': 34,
+ 'binary': False,
+ 'ops': {MOD_FILENODE: 'modified file'}
+ }),
+ ('trunk/doc/source/en/tsvn_ch04.xml', 'M',
+ {'added': 66,
+ 'deleted': 21,
+ 'binary': False,
+ 'ops': {MOD_FILENODE: 'modified file'}
+ }),
+ ('trunk/src/Changelog.txt', 'M',
+ {'added': 2,
+ 'deleted': 0,
+ 'binary': False,
+ 'ops': {MOD_FILENODE: 'modified file'}
+ }),
+ ('trunk/src/Resources/TortoiseProcENG.rc', 'M',
+ {'added': 19,
+ 'deleted': 13,
+ 'binary': False,
+ 'ops': {MOD_FILENODE: 'modified file'}
+ }),
+ ('trunk/src/TortoiseProc/SetOverlayPage.cpp', 'M',
+ {'added': 16,
+ 'deleted': 1,
+ 'binary': False,
+ 'ops': {MOD_FILENODE: 'modified file'}
+ }),
+ ('trunk/src/TortoiseProc/SetOverlayPage.h', 'M',
+ {'added': 3,
+ 'deleted': 0,
+ 'binary': False,
+ 'ops': {MOD_FILENODE: 'modified file'}
+ }),
+ ('trunk/src/TortoiseProc/resource.h', 'M',
+ {'added': 2,
+ 'deleted': 0,
+ 'binary': False,
+ 'ops': {MOD_FILENODE: 'modified file'}
+ }),
+ ('trunk/src/TortoiseShell/ShellCache.h', 'M',
+ {'added': 50,
+ 'deleted': 1,
+ 'binary': False,
+ 'ops': {MOD_FILENODE: 'modified file'}
+ }),
+ ]),
+
+
# TODO: mikhail: do we still need this?
# (
# 'hg',
@@ -579,7 +654,6 @@ DIFF_FIXTURES = [
# 'pylons_app.egg-info/dependency_links.txt', 'A', {
# 'deleted': 0, 'binary': False, 'added': 1, 'ops': {
# 1: 'new file 100644'}}),
- # #TODO:
# ]
# ),
]
diff --git a/rhodecode/tests/lib/test_diffs_context.py b/rhodecode/tests/lib/test_diffs_context.py
--- a/rhodecode/tests/lib/test_diffs_context.py
+++ b/rhodecode/tests/lib/test_diffs_context.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/lib/test_encrypt.py b/rhodecode/tests/lib/test_encrypt.py
--- a/rhodecode/tests/lib/test_encrypt.py
+++ b/rhodecode/tests/lib/test_encrypt.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/lib/test_ext_json.py b/rhodecode/tests/lib/test_ext_json.py
--- a/rhodecode/tests/lib/test_ext_json.py
+++ b/rhodecode/tests/lib/test_ext_json.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/lib/test_graphmod.py b/rhodecode/tests/lib/test_graphmod.py
--- a/rhodecode/tests/lib/test_graphmod.py
+++ b/rhodecode/tests/lib/test_graphmod.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -42,36 +42,44 @@ def test_get_edge_color_single_parent():
def test_colored_linear():
- dag = [('node3', ['node2']), ('node2', ['node1']), ('node1', [])]
+ dag = [
+ ('hash', 'node3', ['node2'], 'master'),
+ ('hash', 'node2', ['node1'], 'master'),
+ ('hash', 'node1', [], 'master')
+ ]
expected_result = [
- ((0, 1), [(0, 0, 1)]),
- ((0, 1), [(0, 0, 1)]),
- ((0, 1), []),
+ ('hash', (0, 1), [(0, 0, 1)], 'master'),
+ ('hash', (0, 1), [(0, 0, 1)], 'master'),
+ ('hash', (0, 1), [], 'master'),
]
assert list(graphmod._colored(dag)) == expected_result
def test_colored_diverging_branch():
- dag = [('node3', ['node1']), ('node2', ['node1']), ('node1', [])]
+ dag = [
+ ('hash', 'node3', ['node1'], 'stable'),
+ ('hash', 'node2', ['node1'], 'stable'),
+ ('hash', 'node1', [], 'stable')
+ ]
expected_result = [
- ((0, 1), [(0, 0, 1)]),
- ((1, 2), [(0, 0, 1), (1, 0, 2)]),
- ((0, 1), []),
+ ('hash', (0, 1), [(0, 0, 1)], 'stable'),
+ ('hash', (1, 2), [(0, 0, 1), (1, 0, 2)], 'stable'),
+ ('hash', (0, 1), [], 'stable'),
]
assert list(graphmod._colored(dag)) == expected_result
def test_colored_merged_branch():
dag = [
- ('node4', ['node2', 'node3']),
- ('node3', ['node1']),
- ('node2', ['node1']),
- ('node1', []),
+ ('hash', 'node4', ['node2', 'node3'], 'stable'),
+ ('hash', 'node3', ['node1'], 'stable'),
+ ('hash', 'node2', ['node1'], 'stable'),
+ ('hash', 'node1', [], 'stable'),
]
expected_result = [
- ((0, 1), [(0, 0, 1), (0, 1, 2)]),
- ((1, 2), [(0, 0, 1), (1, 1, 2)]),
- ((0, 1), [(0, 0, 1), (1, 0, 2)]),
- ((0, 2), []),
+ ('hash', (0, 1), [(0, 0, 1), (0, 1, 2)], 'stable'),
+ ('hash', (1, 2), [(0, 0, 1), (1, 1, 2)], 'stable'),
+ ('hash', (0, 1), [(0, 0, 1), (1, 0, 2)], 'stable'),
+ ('hash', (0, 2), [], 'stable'),
]
assert list(graphmod._colored(dag)) == expected_result
diff --git a/rhodecode/tests/lib/test_helpers.py b/rhodecode/tests/lib/test_helpers.py
--- a/rhodecode/tests/lib/test_helpers.py
+++ b/rhodecode/tests/lib/test_helpers.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/lib/test_hooks_base.py b/rhodecode/tests/lib/test_hooks_base.py
--- a/rhodecode/tests/lib/test_hooks_base.py
+++ b/rhodecode/tests/lib/test_hooks_base.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/lib/test_hooks_daemon.py b/rhodecode/tests/lib/test_hooks_daemon.py
--- a/rhodecode/tests/lib/test_hooks_daemon.py
+++ b/rhodecode/tests/lib/test_hooks_daemon.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -122,13 +122,13 @@ class TestHooksHttpHandler(object):
fake_date = '1/Nov/2015 00:00:00'
date_patcher = mock.patch.object(
handler, 'log_date_time_string', return_value=fake_date)
- with date_patcher, caplog.atLevel(logging.DEBUG):
+ with date_patcher, caplog.at_level(logging.DEBUG):
handler.log_message('Some message %d, %s', 123, 'string')
expected_message = '{} - - [{}] Some message 123, string'.format(
ip_port[0], fake_date)
assert_message_in_log(
- caplog.records(), expected_message,
+ caplog.records, expected_message,
levelno=logging.DEBUG, module='hooks_daemon')
def _generate_post_request(self, data):
@@ -175,7 +175,7 @@ class TestPyro4HooksCallbackDaemon(objec
def test_prepare_inits_pyro4_and_registers_hooks(self, caplog):
pyro4_daemon = mock.Mock()
- with self._pyro4_patcher(pyro4_daemon), caplog.atLevel(logging.DEBUG):
+ with self._pyro4_patcher(pyro4_daemon), caplog.at_level(logging.DEBUG):
daemon = hooks_daemon.Pyro4HooksCallbackDaemon()
assert daemon._daemon == pyro4_daemon
@@ -186,7 +186,7 @@ class TestPyro4HooksCallbackDaemon(objec
assert isinstance(args[0], hooks_daemon.Hooks)
assert_message_in_log(
- caplog.records(),
+ caplog.records,
'Preparing callback daemon and registering hook object',
levelno=logging.DEBUG, module='hooks_daemon')
@@ -213,7 +213,7 @@ class TestPyro4HooksCallbackDaemon(objec
with self._pyro4_patcher(pyro4_daemon):
daemon = hooks_daemon.Pyro4HooksCallbackDaemon()
- with self._thread_patcher(thread), caplog.atLevel(logging.DEBUG):
+ with self._thread_patcher(thread), caplog.at_level(logging.DEBUG):
with daemon:
assert daemon._daemon == pyro4_daemon
assert daemon._callback_thread == thread
@@ -224,7 +224,7 @@ class TestPyro4HooksCallbackDaemon(objec
thread.join.assert_called_once_with()
assert_message_in_log(
- caplog.records(), 'Waiting for background thread to finish.',
+ caplog.records, 'Waiting for background thread to finish.',
levelno=logging.DEBUG, module='hooks_daemon')
def _pyro4_patcher(self, daemon):
@@ -238,18 +238,18 @@ class TestPyro4HooksCallbackDaemon(objec
class TestHttpHooksCallbackDaemon(object):
def test_prepare_inits_daemon_variable(self, tcp_server, caplog):
- with self._tcp_patcher(tcp_server), caplog.atLevel(logging.DEBUG):
+ with self._tcp_patcher(tcp_server), caplog.at_level(logging.DEBUG):
daemon = hooks_daemon.HttpHooksCallbackDaemon()
assert daemon._daemon == tcp_server
assert_message_in_log(
- caplog.records(),
+ caplog.records,
'Preparing callback daemon and registering hook object',
levelno=logging.DEBUG, module='hooks_daemon')
def test_prepare_inits_hooks_uri_and_logs_it(
self, tcp_server, caplog):
- with self._tcp_patcher(tcp_server), caplog.atLevel(logging.DEBUG):
+ with self._tcp_patcher(tcp_server), caplog.at_level(logging.DEBUG):
daemon = hooks_daemon.HttpHooksCallbackDaemon()
_, port = tcp_server.server_address
@@ -257,7 +257,7 @@ class TestHttpHooksCallbackDaemon(object
assert daemon.hooks_uri == expected_uri
assert_message_in_log(
- caplog.records(), 'Hooks uri is: {}'.format(expected_uri),
+ caplog.records, 'Hooks uri is: {}'.format(expected_uri),
levelno=logging.DEBUG, module='hooks_daemon')
def test_run_creates_a_thread(self, tcp_server):
@@ -280,11 +280,11 @@ class TestHttpHooksCallbackDaemon(object
with self._tcp_patcher(tcp_server):
daemon = hooks_daemon.HttpHooksCallbackDaemon()
- with self._thread_patcher(mock.Mock()), caplog.atLevel(logging.DEBUG):
+ with self._thread_patcher(mock.Mock()), caplog.at_level(logging.DEBUG):
daemon._run()
assert_message_in_log(
- caplog.records(),
+ caplog.records,
'Running event loop of callback daemon in background thread',
levelno=logging.DEBUG, module='hooks_daemon')
@@ -294,7 +294,7 @@ class TestHttpHooksCallbackDaemon(object
with self._tcp_patcher(tcp_server):
daemon = hooks_daemon.HttpHooksCallbackDaemon()
- with self._thread_patcher(thread), caplog.atLevel(logging.DEBUG):
+ with self._thread_patcher(thread), caplog.at_level(logging.DEBUG):
with daemon:
assert daemon._daemon == tcp_server
assert daemon._callback_thread == thread
@@ -305,7 +305,7 @@ class TestHttpHooksCallbackDaemon(object
thread.join.assert_called_once_with()
assert_message_in_log(
- caplog.records(), 'Waiting for background thread to finish.',
+ caplog.records, 'Waiting for background thread to finish.',
levelno=logging.DEBUG, module='hooks_daemon')
def _tcp_patcher(self, tcp_server):
diff --git a/rhodecode/tests/lib/test_jsonalchemy.py b/rhodecode/tests/lib/test_jsonalchemy.py
--- a/rhodecode/tests/lib/test_jsonalchemy.py
+++ b/rhodecode/tests/lib/test_jsonalchemy.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2016-2016 RhodeCode GmbH
+# Copyright (C) 2016-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/lib/test_markup_renderer.py b/rhodecode/tests/lib/test_markup_renderer.py
--- a/rhodecode/tests/lib/test_markup_renderer.py
+++ b/rhodecode/tests/lib/test_markup_renderer.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -33,13 +33,13 @@ from rhodecode.lib.markup_renderer impor
('readme.Rst', 'rst'),
('readme.rest', 'rst'),
('readme.rest', 'rst'),
- ('readme', 'rst'),
- ('README', 'rst'),
('markdown.xml', 'plain'),
('rest.xml', 'plain'),
('readme.xml', 'plain'),
+ ('readme', 'plain'),
+ ('README', 'plain'),
('readme.mdx', 'plain'),
('readme.rstx', 'plain'),
('readmex', 'plain'),
@@ -95,7 +95,7 @@ def test_rst_xss_raw_directive():
def test_render_rst_template_without_files():
expected = u'''\
-Auto status change to |under_review|
+Pull request updated. Auto status change to |under_review|
.. role:: added
.. role:: removed
@@ -125,7 +125,7 @@ Auto status change to |under_review|
def test_render_rst_template_with_files():
expected = u'''\
-Auto status change to |under_review|
+Pull request updated. Auto status change to |under_review|
.. role:: added
.. role:: removed
diff --git a/rhodecode/tests/lib/test_utils.py b/rhodecode/tests/lib/test_utils.py
--- a/rhodecode/tests/lib/test_utils.py
+++ b/rhodecode/tests/lib/test_utils.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/lib/test_utils2.py b/rhodecode/tests/lib/test_utils2.py
--- a/rhodecode/tests/lib/test_utils2.py
+++ b/rhodecode/tests/lib/test_utils2.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/load/api.py b/rhodecode/tests/load/api.py
--- a/rhodecode/tests/load/api.py
+++ b/rhodecode/tests/load/api.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/load/http_performance.py b/rhodecode/tests/load/http_performance.py
--- a/rhodecode/tests/load/http_performance.py
+++ b/rhodecode/tests/load/http_performance.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/load/profile-mem.py b/rhodecode/tests/load/profile-mem.py
--- a/rhodecode/tests/load/profile-mem.py
+++ b/rhodecode/tests/load/profile-mem.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/load/profile.py b/rhodecode/tests/load/profile.py
--- a/rhodecode/tests/load/profile.py
+++ b/rhodecode/tests/load/profile.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/load/time_urls.py b/rhodecode/tests/load/time_urls.py
--- a/rhodecode/tests/load/time_urls.py
+++ b/rhodecode/tests/load/time_urls.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/load/vcs_performance.py b/rhodecode/tests/load/vcs_performance.py
--- a/rhodecode/tests/load/vcs_performance.py
+++ b/rhodecode/tests/load/vcs_performance.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2016-2016 RhodeCode GmbH
+# Copyright (C) 2016-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/models/__init__.py b/rhodecode/tests/models/__init__.py
--- a/rhodecode/tests/models/__init__.py
+++ b/rhodecode/tests/models/__init__.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/models/common.py b/rhodecode/tests/models/common.py
--- a/rhodecode/tests/models/common.py
+++ b/rhodecode/tests/models/common.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/models/schemas/test_gist_schema.py b/rhodecode/tests/models/schemas/test_gist_schema.py
--- a/rhodecode/tests/models/schemas/test_gist_schema.py
+++ b/rhodecode/tests/models/schemas/test_gist_schema.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2016-2016 RhodeCode GmbH
+# Copyright (C) 2016-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/models/schemas/test_integration_schema.py b/rhodecode/tests/models/schemas/test_integration_schema.py
--- a/rhodecode/tests/models/schemas/test_integration_schema.py
+++ b/rhodecode/tests/models/schemas/test_integration_schema.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2016-2016 RhodeCode GmbH
+# Copyright (C) 2016-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -47,7 +47,7 @@ class TestIntegrationSchema(object):
(
'repo:%s' % repo.repo_name,
{
- 'child_repos_only': None,
+ 'child_repos_only': False,
'repo_group': None,
'repo': repo,
},
diff --git a/rhodecode/tests/models/schemas/test_repo_group_schema.py b/rhodecode/tests/models/schemas/test_repo_group_schema.py
--- a/rhodecode/tests/models/schemas/test_repo_group_schema.py
+++ b/rhodecode/tests/models/schemas/test_repo_group_schema.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2016-2016 RhodeCode GmbH
+# Copyright (C) 2016-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/models/schemas/test_repo_schema.py b/rhodecode/tests/models/schemas/test_repo_schema.py
--- a/rhodecode/tests/models/schemas/test_repo_schema.py
+++ b/rhodecode/tests/models/schemas/test_repo_schema.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2016-2016 RhodeCode GmbH
+# Copyright (C) 2016-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/models/schemas/test_schema_types.py b/rhodecode/tests/models/schemas/test_schema_types.py
--- a/rhodecode/tests/models/schemas/test_schema_types.py
+++ b/rhodecode/tests/models/schemas/test_schema_types.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2016-2016 RhodeCode GmbH
+# Copyright (C) 2016-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/models/schemas/test_user_schema.py b/rhodecode/tests/models/schemas/test_user_schema.py
--- a/rhodecode/tests/models/schemas/test_user_schema.py
+++ b/rhodecode/tests/models/schemas/test_user_schema.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2016-2016 RhodeCode GmbH
+# Copyright (C) 2016-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/models/schemas/test_user_usergroup_types.py b/rhodecode/tests/models/schemas/test_user_usergroup_types.py
--- a/rhodecode/tests/models/schemas/test_user_usergroup_types.py
+++ b/rhodecode/tests/models/schemas/test_user_usergroup_types.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2016-2016 RhodeCode GmbH
+# Copyright (C) 2016-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/models/settings/__init__.py b/rhodecode/tests/models/settings/__init__.py
--- a/rhodecode/tests/models/settings/__init__.py
+++ b/rhodecode/tests/models/settings/__init__.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/models/settings/test_issue_tracker.py b/rhodecode/tests/models/settings/test_issue_tracker.py
--- a/rhodecode/tests/models/settings/test_issue_tracker.py
+++ b/rhodecode/tests/models/settings/test_issue_tracker.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/models/settings/test_settings.py b/rhodecode/tests/models/settings/test_settings.py
--- a/rhodecode/tests/models/settings/test_settings.py
+++ b/rhodecode/tests/models/settings/test_settings.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/models/settings/test_vcs_settings.py b/rhodecode/tests/models/settings/test_vcs_settings.py
--- a/rhodecode/tests/models/settings/test_vcs_settings.py
+++ b/rhodecode/tests/models/settings/test_vcs_settings.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/models/test_changeset_status.py b/rhodecode/tests/models/test_changeset_status.py
--- a/rhodecode/tests/models/test_changeset_status.py
+++ b/rhodecode/tests/models/test_changeset_status.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/models/test_comment.py b/rhodecode/tests/models/test_comment.py
--- a/rhodecode/tests/models/test_comment.py
+++ b/rhodecode/tests/models/test_comment.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -72,7 +72,7 @@ def test_diff_to_comment_line_number(old
(DiffLineNumber(old=12, new=None), DiffLineNumber(old=21, new=None)),
])
def test_choose_closest_diff_line_normal(diff_line, expected):
- comment_model = comment.ChangesetCommentsModel()
+ comment_model = comment.CommentsModel()
candidates = [
DiffLineNumber(old=2, new=None),
DiffLineNumber(old=21, new=None),
@@ -82,7 +82,7 @@ def test_choose_closest_diff_line_normal
def test_revision_comments_are_sorted():
- comment_model = comment.ChangesetCommentsModel()
+ comment_model = comment.CommentsModel()
query = comment_model._get_inline_comments_query(
repo_id='fake_repo_name',
revision='fake_revision',
@@ -92,15 +92,15 @@ def test_revision_comments_are_sorted():
@pytest.mark.parametrize('use_outdated', [True, False])
def test_pull_request_comments_are_sorted(use_outdated):
- comment_model = comment.ChangesetCommentsModel()
+ comment_model = comment.CommentsModel()
pull_request = mock.Mock()
# TODO: johbo: Had to do this since we have an inline call to
# self.__get_pull_request. Should be moved out at some point.
get_instance_patcher = mock.patch.object(
- comment.ChangesetCommentsModel, '_get_instance',
+ comment.CommentsModel, '_get_instance',
return_value=pull_request)
config_patcher = mock.patch.object(
- comment.ChangesetCommentsModel, 'use_outdated_comments',
+ comment.CommentsModel, 'use_outdated_comments',
return_value=use_outdated)
with get_instance_patcher, config_patcher as config_mock:
@@ -123,7 +123,7 @@ def assert_inline_comments_order(query):
def test_get_renderer():
- model = comment.ChangesetCommentsModel()
+ model = comment.CommentsModel()
renderer = model._get_renderer()
assert renderer == "rst"
@@ -137,7 +137,7 @@ class TestUseOutdatedComments(object):
'rhodecode_use_outdated_comments': use_outdated
}
with self._patch_settings(general_settings) as settings_mock:
- result = comment.ChangesetCommentsModel.use_outdated_comments(
+ result = comment.CommentsModel.use_outdated_comments(
pull_request)
settings_mock.assert_called_once_with(repo=pull_request.target_repo)
assert result == use_outdated
@@ -147,7 +147,7 @@ class TestUseOutdatedComments(object):
general_settings = {}
with self._patch_settings(general_settings) as settings_mock:
- result = comment.ChangesetCommentsModel.use_outdated_comments(
+ result = comment.CommentsModel.use_outdated_comments(
pull_request)
settings_mock.assert_called_once_with(repo=pull_request.target_repo)
assert result is False
diff --git a/rhodecode/tests/models/test_db.py b/rhodecode/tests/models/test_db.py
--- a/rhodecode/tests/models/test_db.py
+++ b/rhodecode/tests/models/test_db.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -24,24 +24,24 @@ import random
from rhodecode.model import db
-@pytest.mark.parametrize("DBModel, id_attr", [
- (db.ChangesetComment, 'comment_id'),
- (db.PullRequest, 'pull_request_id'),
- (db.PullRequestVersion, 'pull_request_version_id'),
+@pytest.mark.parametrize("DBModel, klass, id_attr", [
+ (db.ChangesetComment, 'Comment', 'comment_id'),
+ (db.PullRequest, db.PullRequest.__name__, 'pull_request_id'),
+ (db.PullRequestVersion, db.PullRequestVersion.__name__, 'pull_request_version_id'),
])
-class TestModelReprImplementation:
+class TestModelReprImplementation(object):
- def test_repr_without_id(self, DBModel, id_attr):
+ def test_repr_without_id(self, DBModel, klass, id_attr):
instance = DBModel()
- expected_repr = '' % (DBModel.__name__, id(instance))
+ expected_repr = '' % (klass, id(instance))
assert repr(instance) == expected_repr
- def test_repr_with_id(self, DBModel, id_attr):
+ def test_repr_with_id(self, DBModel, klass, id_attr):
test_id = random.randint(1, 10)
instance = DBModel()
setattr(instance, id_attr, test_id)
expected_repr = (
- '' % (DBModel.__name__, test_id))
+ '' % (klass, test_id))
assert repr(instance) == expected_repr
diff --git a/rhodecode/tests/models/test_gist.py b/rhodecode/tests/models/test_gist.py
--- a/rhodecode/tests/models/test_gist.py
+++ b/rhodecode/tests/models/test_gist.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/models/test_notifications.py b/rhodecode/tests/models/test_notifications.py
--- a/rhodecode/tests/models/test_notifications.py
+++ b/rhodecode/tests/models/test_notifications.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/models/test_permissions.py b/rhodecode/tests/models/test_permissions.py
--- a/rhodecode/tests/models/test_permissions.py
+++ b/rhodecode/tests/models/test_permissions.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/models/test_pullrequest.py b/rhodecode/tests/models/test_pullrequest.py
--- a/rhodecode/tests/models/test_pullrequest.py
+++ b/rhodecode/tests/models/test_pullrequest.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -29,7 +29,7 @@ from rhodecode.lib.vcs.backends.base imp
MergeResponse, MergeFailureReason, Reference)
from rhodecode.lib.vcs.exceptions import RepositoryError
from rhodecode.lib.vcs.nodes import FileNode
-from rhodecode.model.comment import ChangesetCommentsModel
+from rhodecode.model.comment import CommentsModel
from rhodecode.model.db import PullRequest, Session
from rhodecode.model.pull_request import PullRequestModel
from rhodecode.model.user import UserModel
@@ -183,7 +183,7 @@ class TestPullRequestModel:
assert status is False
assert (
msg.eval() ==
- 'This pull request cannot be merged because of conflicts.')
+ 'This pull request cannot be merged because of merge conflicts.')
self.merge_mock.assert_called_once_with(
pull_request.target_ref_parts,
pull_request.source_repo.scm_instance(),
@@ -200,7 +200,7 @@ class TestPullRequestModel:
assert status is False
assert (
msg.eval() ==
- 'This pull request cannot be merged because of conflicts.')
+ 'This pull request cannot be merged because of merge conflicts.')
assert self.merge_mock.called is False
def test_merge_status_unknown_failure(self, pull_request):
@@ -356,8 +356,11 @@ class TestPullRequestModel:
assert commit_ids == pull_request.revisions + [pull_request.merge_rev]
def test_get_diff_from_pr_version(self, pull_request):
+ source_repo = pull_request.source_repo
+ source_ref_id = pull_request.source_ref_parts.commit_id
+ target_ref_id = pull_request.target_ref_parts.commit_id
diff = PullRequestModel()._get_diff_from_pr_or_version(
- pull_request, context=6)
+ source_repo, source_ref_id, target_ref_id, context=6)
assert 'file_1' in diff.raw
def test_generate_title_returns_unicode(self):
@@ -722,7 +725,7 @@ def test_update_adds_a_comment_to_the_pu
# Expect to find a new comment about the change
expected_message = textwrap.dedent(
"""\
- Auto status change to |under_review|
+ Pull request updated. Auto status change to |under_review|
.. role:: added
.. role:: removed
@@ -803,21 +806,24 @@ def test_link_comments_to_version_only_u
def test_calculate_commits():
- change = PullRequestModel()._calculate_commit_id_changes(
- set([1, 2, 3]), set([1, 3, 4, 5]))
- assert (set([4, 5]), set([1, 3]), set([2])) == (
- change.added, change.common, change.removed)
+ old_ids = [1, 2, 3]
+ new_ids = [1, 3, 4, 5]
+ change = PullRequestModel()._calculate_commit_id_changes(old_ids, new_ids)
+ assert change.added == [4, 5]
+ assert change.common == [1, 3]
+ assert change.removed == [2]
+ assert change.total == [1, 3, 4, 5]
def assert_inline_comments(pull_request, visible=None, outdated=None):
if visible is not None:
- inline_comments = ChangesetCommentsModel().get_inline_comments(
+ inline_comments = CommentsModel().get_inline_comments(
pull_request.target_repo.repo_id, pull_request=pull_request)
- inline_cnt = ChangesetCommentsModel().get_inline_comments_count(
+ inline_cnt = CommentsModel().get_inline_comments_count(
inline_comments)
assert inline_cnt == visible
if outdated is not None:
- outdated_comments = ChangesetCommentsModel().get_outdated_comments(
+ outdated_comments = CommentsModel().get_outdated_comments(
pull_request.target_repo.repo_id, pull_request)
assert len(outdated_comments) == outdated
@@ -842,5 +848,5 @@ def assert_pr_file_changes(
def outdated_comments_patcher(use_outdated=True):
return mock.patch.object(
- ChangesetCommentsModel, 'use_outdated_comments',
+ CommentsModel, 'use_outdated_comments',
return_value=use_outdated)
diff --git a/rhodecode/tests/models/test_pullrequest_git.py b/rhodecode/tests/models/test_pullrequest_git.py
--- a/rhodecode/tests/models/test_pullrequest_git.py
+++ b/rhodecode/tests/models/test_pullrequest_git.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -55,8 +55,11 @@ class TestGetDiffForPrOrVersion(object):
return pull_request
def assert_diff_can_be_fetched(self, pr_or_version):
+ source_repo = pr_or_version.source_repo
+ source_ref_id = pr_or_version.source_ref_parts.commit_id
+ target_ref_id = pr_or_version.target_ref_parts.commit_id
diff = PullRequestModel()._get_diff_from_pr_or_version(
- pr_or_version, context=6)
+ source_repo, source_ref_id, target_ref_id, context=6)
assert 'file_b' in diff.raw
def assert_commit_cannot_be_accessed(
diff --git a/rhodecode/tests/models/test_repo_groups.py b/rhodecode/tests/models/test_repo_groups.py
--- a/rhodecode/tests/models/test_repo_groups.py
+++ b/rhodecode/tests/models/test_repo_groups.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/models/test_repo_readme.py b/rhodecode/tests/models/test_repo_readme.py
--- a/rhodecode/tests/models/test_repo_readme.py
+++ b/rhodecode/tests/models/test_repo_readme.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/models/test_repos.py b/rhodecode/tests/models/test_repos.py
--- a/rhodecode/tests/models/test_repos.py
+++ b/rhodecode/tests/models/test_repos.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/models/test_scm.py b/rhodecode/tests/models/test_scm.py
--- a/rhodecode/tests/models/test_scm.py
+++ b/rhodecode/tests/models/test_scm.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/models/test_user_group_permissions_on_repo_groups.py b/rhodecode/tests/models/test_user_group_permissions_on_repo_groups.py
--- a/rhodecode/tests/models/test_user_group_permissions_on_repo_groups.py
+++ b/rhodecode/tests/models/test_user_group_permissions_on_repo_groups.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/models/test_user_groups.py b/rhodecode/tests/models/test_user_groups.py
--- a/rhodecode/tests/models/test_user_groups.py
+++ b/rhodecode/tests/models/test_user_groups.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/models/test_user_permissions_on_repo_groups.py b/rhodecode/tests/models/test_user_permissions_on_repo_groups.py
--- a/rhodecode/tests/models/test_user_permissions_on_repo_groups.py
+++ b/rhodecode/tests/models/test_user_permissions_on_repo_groups.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/models/test_users.py b/rhodecode/tests/models/test_users.py
--- a/rhodecode/tests/models/test_users.py
+++ b/rhodecode/tests/models/test_users.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/other/__init__.py b/rhodecode/tests/other/__init__.py
--- a/rhodecode/tests/other/__init__.py
+++ b/rhodecode/tests/other/__init__.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/other/example_rcextensions.py b/rhodecode/tests/other/example_rcextensions.py
--- a/rhodecode/tests/other/example_rcextensions.py
+++ b/rhodecode/tests/other/example_rcextensions.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/other/test_base_controller.py b/rhodecode/tests/other/test_base_controller.py
--- a/rhodecode/tests/other/test_base_controller.py
+++ b/rhodecode/tests/other/test_base_controller.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/other/test_libs.py b/rhodecode/tests/other/test_libs.py
--- a/rhodecode/tests/other/test_libs.py
+++ b/rhodecode/tests/other/test_libs.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -145,7 +145,12 @@ def test_age(age_args, expected, kw, pyl
from dateutil import relativedelta
n = datetime.datetime(year=2012, month=5, day=17)
delt = lambda *args, **kwargs: relativedelta.relativedelta(*args, **kwargs)
- assert age(n + delt(**age_args), now=n, **kw) == expected
+
+ def translate(elem):
+ return elem.interpolate()
+
+ assert translate(age(n + delt(**age_args), now=n, **kw)) == expected
+
@pytest.mark.parametrize("age_args, expected, kw", [
({}, u'just now', {}),
@@ -172,7 +177,11 @@ def test_age_in_future(age_args, expecte
from dateutil import relativedelta
n = datetime.datetime(year=2012, month=5, day=17)
delt = lambda *args, **kwargs: relativedelta.relativedelta(*args, **kwargs)
- assert age(n + delt(**age_args), now=n, **kw) == expected
+
+ def translate(elem):
+ return elem.interpolate()
+
+ assert translate(age(n + delt(**age_args), now=n, **kw)) == expected
def test_tag_exctrator():
diff --git a/rhodecode/tests/other/test_validators.py b/rhodecode/tests/other/test_validators.py
--- a/rhodecode/tests/other/test_validators.py
+++ b/rhodecode/tests/other/test_validators.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/other/vcs_operations/__init__.py b/rhodecode/tests/other/vcs_operations/__init__.py
--- a/rhodecode/tests/other/vcs_operations/__init__.py
+++ b/rhodecode/tests/other/vcs_operations/__init__.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/other/vcs_operations/conftest.py b/rhodecode/tests/other/vcs_operations/conftest.py
--- a/rhodecode/tests/other/vcs_operations/conftest.py
+++ b/rhodecode/tests/other/vcs_operations/conftest.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/other/vcs_operations/test_vcs_calls_custom_auth_code_403.py b/rhodecode/tests/other/vcs_operations/test_vcs_calls_custom_auth_code_403.py
--- a/rhodecode/tests/other/vcs_operations/test_vcs_calls_custom_auth_code_403.py
+++ b/rhodecode/tests/other/vcs_operations/test_vcs_calls_custom_auth_code_403.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/other/vcs_operations/test_vcs_calls_custom_auth_code_404.py b/rhodecode/tests/other/vcs_operations/test_vcs_calls_custom_auth_code_404.py
--- a/rhodecode/tests/other/vcs_operations/test_vcs_calls_custom_auth_code_404.py
+++ b/rhodecode/tests/other/vcs_operations/test_vcs_calls_custom_auth_code_404.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/other/vcs_operations/test_vcs_calls_custom_auth_code_bad_code.py b/rhodecode/tests/other/vcs_operations/test_vcs_calls_custom_auth_code_bad_code.py
--- a/rhodecode/tests/other/vcs_operations/test_vcs_calls_custom_auth_code_bad_code.py
+++ b/rhodecode/tests/other/vcs_operations/test_vcs_calls_custom_auth_code_bad_code.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/other/vcs_operations/test_vcs_operations.py b/rhodecode/tests/other/vcs_operations/test_vcs_operations.py
--- a/rhodecode/tests/other/vcs_operations/test_vcs_operations.py
+++ b/rhodecode/tests/other/vcs_operations/test_vcs_operations.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/other/vcs_operations/test_vcs_operations_locking.py b/rhodecode/tests/other/vcs_operations/test_vcs_operations_locking.py
--- a/rhodecode/tests/other/vcs_operations/test_vcs_operations_locking.py
+++ b/rhodecode/tests/other/vcs_operations/test_vcs_operations_locking.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/other/vcs_operations/test_vcs_operations_locking_custom_code.py b/rhodecode/tests/other/vcs_operations/test_vcs_operations_locking_custom_code.py
--- a/rhodecode/tests/other/vcs_operations/test_vcs_operations_locking_custom_code.py
+++ b/rhodecode/tests/other/vcs_operations/test_vcs_operations_locking_custom_code.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/plugin.py b/rhodecode/tests/plugin.py
--- a/rhodecode/tests/plugin.py
+++ b/rhodecode/tests/plugin.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -29,18 +29,18 @@ import socket
import subprocess32
import time
import uuid
+import dateutil.tz
import mock
import pyramid.testing
import pytest
import colander
import requests
-from webtest.app import TestApp
import rhodecode
from rhodecode.lib.utils2 import AttributeDict
from rhodecode.model.changeset_status import ChangesetStatusModel
-from rhodecode.model.comment import ChangesetCommentsModel
+from rhodecode.model.comment import CommentsModel
from rhodecode.model.db import (
PullRequest, Repository, RhodeCodeSetting, ChangesetStatus, RepoGroup,
UserGroup, RepoRhodeCodeUi, RepoRhodeCodeSetting, RhodeCodeUi)
@@ -62,6 +62,7 @@ from rhodecode.tests import (
login_user_session, get_new_dir, utils, TESTS_TMP_PATH,
TEST_USER_ADMIN_LOGIN, TEST_USER_REGULAR_LOGIN, TEST_USER_REGULAR2_LOGIN,
TEST_USER_REGULAR_PASS)
+from rhodecode.tests.utils import CustomTestApp
from rhodecode.tests.fixture import Fixture
@@ -211,7 +212,9 @@ def http_environ(http_host_stub):
@pytest.fixture(scope='function')
def app(request, pylonsapp, http_environ):
- app = TestApp(
+
+
+ app = CustomTestApp(
pylonsapp,
extra_environ=http_environ)
if request.cls:
@@ -1036,7 +1039,7 @@ class PRTestUtility(object):
return removed_commit_id
def create_comment(self, linked_to=None):
- comment = ChangesetCommentsModel().create(
+ comment = CommentsModel().create(
text=u"Test comment",
repo=self.target_repository.repo_name,
user=self.author,
@@ -1050,7 +1053,7 @@ class PRTestUtility(object):
def create_inline_comment(
self, linked_to=None, line_no=u'n1', file_path='file_1'):
- comment = ChangesetCommentsModel().create(
+ comment = CommentsModel().create(
text=u"Test comment",
repo=self.target_repository.repo_name,
user=self.author,
@@ -1136,6 +1139,7 @@ class UserUtility(object):
self._test_name = self._sanitize_name(test_name)
self.fixture = Fixture()
self.repo_group_ids = []
+ self.repos_ids = []
self.user_ids = []
self.user_group_ids = []
self.user_repo_permission_ids = []
@@ -1162,6 +1166,17 @@ class UserUtility(object):
self.repo_group_ids.append(repo_group.group_id)
return repo_group
+ def create_repo(self, owner=TEST_USER_ADMIN_LOGIN, parent=None, auto_cleanup=True):
+ repo_name = "{prefix}_repository_{count}".format(
+ prefix=self._test_name,
+ count=len(self.repos_ids))
+
+ repository = self.fixture.create_repo(
+ repo_name, cur_user=owner, repo_group=parent)
+ if auto_cleanup:
+ self.repos_ids.append(repository.repo_id)
+ return repository
+
def create_user(self, auto_cleanup=True, **kwargs):
user_name = "{prefix}_user_{count}".format(
prefix=self._test_name,
@@ -1252,6 +1267,7 @@ class UserUtility(object):
def cleanup(self):
self._cleanup_permissions()
+ self._cleanup_repos()
self._cleanup_repo_groups()
self._cleanup_user_groups()
self._cleanup_users()
@@ -1297,6 +1313,11 @@ class UserUtility(object):
for repo_group_id in sorted_repo_group_ids:
self.fixture.destroy_repo_group(repo_group_id)
+ def _cleanup_repos(self):
+ sorted_repos_ids = sorted(self.repos_ids)
+ for repo_id in sorted_repos_ids:
+ self.fixture.destroy_repo(repo_id)
+
def _cleanup_user_groups(self):
def _user_group_compare(first_group_id, second_group_id):
"""
@@ -1329,22 +1350,21 @@ def pytest_runtest_makereport(item, call
"""
Adding the remote traceback if the exception has this information.
- Pyro4 attaches this information as the attribute `_pyroTraceback`
+ Pyro4 attaches this information as the attribute `_vcs_server_traceback`
to the exception instance.
"""
outcome = yield
report = outcome.get_result()
if call.excinfo:
- _add_pyro_remote_traceback(report, call.excinfo.value)
+ _add_vcsserver_remote_traceback(report, call.excinfo.value)
-def _add_pyro_remote_traceback(report, exc):
- pyro_traceback = getattr(exc, '_pyroTraceback', None)
+def _add_vcsserver_remote_traceback(report, exc):
+ vcsserver_traceback = getattr(exc, '_vcs_server_traceback', None)
- if pyro_traceback:
- traceback = ''.join(pyro_traceback)
- section = 'Pyro4 remote traceback ' + report.when
- report.sections.append((section, traceback))
+ if vcsserver_traceback:
+ section = 'VCSServer remote traceback ' + report.when
+ report.sections.append((section, vcsserver_traceback))
@pytest.fixture(scope='session')
@@ -1795,3 +1815,11 @@ def root_repos_integration_stub(request,
IntegrationModel().delete(integration)
return integration
+
+
+@pytest.fixture
+def local_dt_to_utc():
+ def _factory(dt):
+ return dt.replace(tzinfo=dateutil.tz.tzlocal()).astimezone(
+ dateutil.tz.tzutc()).replace(tzinfo=None)
+ return _factory
diff --git a/rhodecode/tests/pylons_plugin.py b/rhodecode/tests/pylons_plugin.py
--- a/rhodecode/tests/pylons_plugin.py
+++ b/rhodecode/tests/pylons_plugin.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -280,7 +280,7 @@ class HttpVCSServer(VCSServer):
else:
pytest.exit(
"Starting the VCSServer failed or took more than {} "
- "seconds.".format(timeout))
+ "seconds. cmd: `{}`".format(timeout, ' '.join(self._args)))
def shutdown(self):
self.process.kill()
diff --git a/rhodecode/tests/scripts/test_concurency.py b/rhodecode/tests/scripts/test_concurency.py
--- a/rhodecode/tests/scripts/test_concurency.py
+++ b/rhodecode/tests/scripts/test_concurency.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/scripts/test_crawler.py b/rhodecode/tests/scripts/test_crawler.py
--- a/rhodecode/tests/scripts/test_crawler.py
+++ b/rhodecode/tests/scripts/test_crawler.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/utils.py b/rhodecode/tests/utils.py
--- a/rhodecode/tests/utils.py
+++ b/rhodecode/tests/utils.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -23,24 +23,93 @@ import time
import logging
import os.path
import subprocess32
+import tempfile
import urllib2
from urlparse import urlparse, parse_qsl
from urllib import unquote_plus
+from webtest.app import (
+ Request, TestResponse, TestApp, print_stderr, string_types)
+
import pytest
import rc_testdata
-from lxml.html import fromstring, tostring
-from lxml.cssselect import CSSSelector
-from rhodecode.model.db import User
+from rhodecode.model.db import User, Repository
from rhodecode.model.meta import Session
from rhodecode.model.scm import ScmModel
from rhodecode.lib.vcs.backends.svn.repository import SubversionRepository
+from rhodecode.lib.vcs.backends.base import EmptyCommit
log = logging.getLogger(__name__)
+class CustomTestResponse(TestResponse):
+ def _save_output(self, out):
+ f = tempfile.NamedTemporaryFile(
+ delete=False, prefix='rc-test-', suffix='.html')
+ f.write(out)
+ return f.name
+
+ def mustcontain(self, *strings, **kw):
+ """
+ Assert that the response contains all of the strings passed
+ in as arguments.
+
+ Equivalent to::
+
+ assert string in res
+ """
+ if 'no' in kw:
+ no = kw['no']
+ del kw['no']
+ if isinstance(no, string_types):
+ no = [no]
+ else:
+ no = []
+ if kw:
+ raise TypeError(
+ "The only keyword argument allowed is 'no'")
+
+ f = self._save_output(str(self))
+
+ for s in strings:
+ if not s in self:
+ print_stderr("Actual response (no %r):" % s)
+ print_stderr(str(self))
+ raise IndexError(
+ "Body does not contain string %r, output saved as %s" % (
+ s, f))
+
+ for no_s in no:
+ if no_s in self:
+ print_stderr("Actual response (has %r)" % no_s)
+ print_stderr(str(self))
+ raise IndexError(
+ "Body contains bad string %r, output saved as %s" % (
+ no_s, f))
+
+ def assert_response(self):
+ return AssertResponse(self)
+
+
+class TestRequest(Request):
+
+ # for py.test
+ disabled = True
+ ResponseClass = CustomTestResponse
+
+
+class CustomTestApp(TestApp):
+ """
+ Custom app to make mustcontain more usefull
+ """
+ RequestClass = TestRequest
+
+
+
+
+
def set_anonymous_access(enabled):
"""(Dis)allows anonymous access depending on parameter `enabled`"""
user = User.get_default_user()
@@ -134,6 +203,11 @@ class AssertResponse(object):
def __init__(self, response):
self.response = response
+ def get_imports(self):
+ from lxml.html import fromstring, tostring
+ from lxml.cssselect import CSSSelector
+ return fromstring, tostring, CSSSelector
+
def one_element_exists(self, css_selector):
self.get_element(css_selector)
@@ -154,6 +228,7 @@ class AssertResponse(object):
assert expected_content in element.value
def contains_one_link(self, link_text, href):
+ fromstring, tostring, CSSSelector = self.get_imports()
doc = fromstring(self.response.body)
sel = CSSSelector('a[href]')
elements = [
@@ -162,6 +237,7 @@ class AssertResponse(object):
self._ensure_url_equal(elements[0].attrib.get('href'), href)
def contains_one_anchor(self, anchor_id):
+ fromstring, tostring, CSSSelector = self.get_imports()
doc = fromstring(self.response.body)
sel = CSSSelector('#' + anchor_id)
elements = sel(doc)
@@ -179,12 +255,14 @@ class AssertResponse(object):
return self._get_elements(css_selector)
def _get_elements(self, css_selector):
+ fromstring, tostring, CSSSelector = self.get_imports()
doc = fromstring(self.response.body)
sel = CSSSelector(css_selector)
elements = sel(doc)
return elements
def _element_to_string(self, element):
+ fromstring, tostring, CSSSelector = self.get_imports()
return tostring(element)
@@ -230,7 +308,7 @@ def run_test_concurrently(times, raise_c
def call_test_func():
try:
test_func(*args, **kwargs)
- except Exception, e:
+ except Exception as e:
exceptions.append(e)
if raise_catched_exc:
raise
@@ -260,11 +338,11 @@ def wait_for_url(url, timeout=10):
last = 0
wait = 0.1
- while (timeout > last):
+ while timeout > last:
last = time.time()
if is_url_reachable(url):
break
- elif ((last + wait) > time.time()):
+ elif (last + wait) > time.time():
# Go to sleep because not enough time has passed since last check.
time.sleep(wait)
else:
@@ -295,3 +373,37 @@ def repo_on_filesystem(repo_name):
repo = vcs.get_vcs_instance(
os.path.join(TESTS_TMP_PATH, repo_name), create=False)
return repo is not None
+
+
+def commit_change(
+ repo, filename, content, message, vcs_type, parent=None, newfile=False):
+ from rhodecode.tests import TEST_USER_ADMIN_LOGIN
+
+ repo = Repository.get_by_repo_name(repo)
+ _commit = parent
+ if not parent:
+ _commit = EmptyCommit(alias=vcs_type)
+
+ if newfile:
+ nodes = {
+ filename: {
+ 'content': content
+ }
+ }
+ commit = ScmModel().create_nodes(
+ user=TEST_USER_ADMIN_LOGIN, repo=repo,
+ message=message,
+ nodes=nodes,
+ parent_commit=_commit,
+ author=TEST_USER_ADMIN_LOGIN,
+ )
+ else:
+ commit = ScmModel().commit_change(
+ repo=repo.scm_instance(), repo_name=repo.repo_name,
+ commit=parent, user=TEST_USER_ADMIN_LOGIN,
+ author=TEST_USER_ADMIN_LOGIN,
+ message=message,
+ content=content,
+ f_path=filename
+ )
+ return commit
diff --git a/rhodecode/tests/vcs/__init__.py b/rhodecode/tests/vcs/__init__.py
--- a/rhodecode/tests/vcs/__init__.py
+++ b/rhodecode/tests/vcs/__init__.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/vcs/base.py b/rhodecode/tests/vcs/base.py
--- a/rhodecode/tests/vcs/base.py
+++ b/rhodecode/tests/vcs/base.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/vcs/conftest.py b/rhodecode/tests/vcs/conftest.py
--- a/rhodecode/tests/vcs/conftest.py
+++ b/rhodecode/tests/vcs/conftest.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/vcs/test_archives.py b/rhodecode/tests/vcs/test_archives.py
--- a/rhodecode/tests/vcs/test_archives.py
+++ b/rhodecode/tests/vcs/test_archives.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/vcs/test_branches.py b/rhodecode/tests/vcs/test_branches.py
--- a/rhodecode/tests/vcs/test_branches.py
+++ b/rhodecode/tests/vcs/test_branches.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -28,34 +28,6 @@ from rhodecode.tests.vcs.base import Bac
class TestBranches(BackendTestMixin):
- @classmethod
- def _get_commits(cls):
- commits = [
- {
- 'message': 'Initial commit',
- 'author': 'Joe Doe ',
- 'date': datetime.datetime(2010, 1, 1, 20),
- 'added': [
- FileNode('foobar', content='Foobar'),
- FileNode('foobar2', content='Foobar II'),
- FileNode('foo/bar/baz', content='baz here!'),
- ],
- },
- {
- 'message': 'Changes...',
- 'author': 'Jane Doe ',
- 'date': datetime.datetime(2010, 1, 1, 21),
- 'added': [
- FileNode('some/new.txt', content='news...'),
- ],
- 'changed': [
- FileNode('foobar', 'Foobar I'),
- ],
- 'removed': [],
- },
- ]
- return commits
-
def test_empty_repository_has_no_branches(self, vcsbackend):
empty_repo = vcsbackend.create_repo()
assert empty_repo.branches == {}
@@ -71,9 +43,10 @@ class TestBranches(BackendTestMixin):
def test_closed_branches(self):
assert len(self.repo.branches_closed) == 0
- def test_simple(self):
+ def test_simple(self, local_dt_to_utc):
tip = self.repo.get_commit()
- assert tip.date == datetime.datetime(2010, 1, 1, 21)
+ assert tip.message == 'Changes...'
+ assert tip.date == local_dt_to_utc(datetime.datetime(2010, 1, 1, 21))
@pytest.mark.backends("git", "hg")
def test_new_branch(self):
@@ -145,7 +118,7 @@ class TestBranches(BackendTestMixin):
assert '123' in self.repo.branches
-class TestSvnBranches:
+class TestSvnBranches(object):
def test_empty_repository_has_no_tags_and_branches(self, vcsbackend_svn):
empty_repo = vcsbackend_svn.create_repo()
diff --git a/rhodecode/tests/vcs/test_client_http.py b/rhodecode/tests/vcs/test_client_http.py
--- a/rhodecode/tests/vcs/test_client_http.py
+++ b/rhodecode/tests/vcs/test_client_http.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -37,7 +37,7 @@ def test_uses_persistent_http_connection
remote_call(normal=True, closed=False)
new_connections = [
- r for r in caplog.record_tuples() if is_new_connection(*r)]
+ r for r in caplog.record_tuples if is_new_connection(*r)]
assert len(new_connections) <= 1
diff --git a/rhodecode/tests/vcs/test_commits.py b/rhodecode/tests/vcs/test_commits.py
--- a/rhodecode/tests/vcs/test_commits.py
+++ b/rhodecode/tests/vcs/test_commits.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -321,16 +321,13 @@ class TestCommits(BackendTestMixin):
def test_get_file_annotate(self):
file_added_commit = self.repo.get_commit(commit_idx=3)
annotations = list(file_added_commit.get_file_annotate('file_3.txt'))
+
line_no, commit_id, commit_loader, line = annotations[0]
+
assert line_no == 1
assert commit_id == file_added_commit.raw_id
assert commit_loader() == file_added_commit
-
- # git annotation is generated differently thus different results
- if self.repo.alias == 'git':
- assert line == '(Joe Doe 2010-01-03 08:00:00 +0000 1) Foobar 3'
- else:
- assert line == 'Foobar 3'
+ assert 'Foobar 3' in line
def test_get_file_annotate_does_not_exist(self):
file_added_commit = self.repo.get_commit(commit_idx=2)
@@ -519,7 +516,7 @@ class TestCommitsChanges(BackendTestMixi
},
]
- def test_initial_commit(self):
+ def test_initial_commit(self, local_dt_to_utc):
commit = self.repo.get_commit(commit_idx=0)
assert set(commit.added) == set([
commit.get_node('foo/bar'),
@@ -531,7 +528,8 @@ class TestCommitsChanges(BackendTestMixi
assert set(commit.removed) == set()
assert set(commit.affected_files) == set(
['foo/bar', 'foo/bał', 'foobar', 'qwe'])
- assert commit.date == datetime.datetime(2010, 1, 1, 20, 0)
+ assert commit.date == local_dt_to_utc(
+ datetime.datetime(2010, 1, 1, 20, 0))
def test_head_added(self):
commit = self.repo.get_commit()
diff --git a/rhodecode/tests/vcs/test_config.py b/rhodecode/tests/vcs/test_config.py
--- a/rhodecode/tests/vcs/test_config.py
+++ b/rhodecode/tests/vcs/test_config.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/vcs/test_diff.py b/rhodecode/tests/vcs/test_diff.py
--- a/rhodecode/tests/vcs/test_diff.py
+++ b/rhodecode/tests/vcs/test_diff.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -359,14 +359,15 @@ class TestSvnGetDiff:
], ids=['file', 'dir'])
def test_diff_to_tagged_version(self, vcsbackend_svn, path, path1):
repo = vcsbackend_svn['svn-simple-layout']
- commit = repo[-1]
- diff = repo.get_diff(commit, commit, path=path, path1=path1)
+ commit1 = repo[-2]
+ commit2 = repo[-1]
+ diff = repo.get_diff(commit1, commit2, path=path, path1=path1)
assert diff.raw == self.expected_diff_v_0_2
expected_diff_v_0_2 = '''Index: example.py
===================================================================
diff --git a/example.py b/example.py
---- a/example.py\t(revision 26)
+--- a/example.py\t(revision 25)
+++ b/example.py\t(revision 26)
@@ -7,8 +7,12 @@
diff --git a/rhodecode/tests/vcs/test_exceptions.py b/rhodecode/tests/vcs/test_exceptions.py
--- a/rhodecode/tests/vcs/test_exceptions.py
+++ b/rhodecode/tests/vcs/test_exceptions.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/vcs/test_filenodes_unicode_path.py b/rhodecode/tests/vcs/test_filenodes_unicode_path.py
--- a/rhodecode/tests/vcs/test_filenodes_unicode_path.py
+++ b/rhodecode/tests/vcs/test_filenodes_unicode_path.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/vcs/test_getitem.py b/rhodecode/tests/vcs/test_getitem.py
--- a/rhodecode/tests/vcs/test_getitem.py
+++ b/rhodecode/tests/vcs/test_getitem.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/vcs/test_getslice.py b/rhodecode/tests/vcs/test_getslice.py
--- a/rhodecode/tests/vcs/test_getslice.py
+++ b/rhodecode/tests/vcs/test_getslice.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/vcs/test_git.py b/rhodecode/tests/vcs/test_git.py
--- a/rhodecode/tests/vcs/test_git.py
+++ b/rhodecode/tests/vcs/test_git.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/vcs/test_hg.py b/rhodecode/tests/vcs/test_hg.py
--- a/rhodecode/tests/vcs/test_hg.py
+++ b/rhodecode/tests/vcs/test_hg.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/vcs/test_hg_vcsserver_cache_invalidation.py b/rhodecode/tests/vcs/test_hg_vcsserver_cache_invalidation.py
--- a/rhodecode/tests/vcs/test_hg_vcsserver_cache_invalidation.py
+++ b/rhodecode/tests/vcs/test_hg_vcsserver_cache_invalidation.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2016-2016 RhodeCode GmbH
+# Copyright (C) 2016-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/vcs/test_inmemory.py b/rhodecode/tests/vcs/test_inmemory.py
--- a/rhodecode/tests/vcs/test_inmemory.py
+++ b/rhodecode/tests/vcs/test_inmemory.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -320,7 +320,7 @@ class TestInMemoryCommit(BackendTestMixi
repo = self.Backend(self.repo_path)
assert len(repo.commit_ids) == N
- def test_date_attr(self):
+ def test_date_attr(self, local_dt_to_utc):
node = FileNode('foobar.txt', content='Foobared!')
self.imc.add(node)
date = datetime.datetime(1985, 1, 30, 1, 45)
@@ -328,7 +328,7 @@ class TestInMemoryCommit(BackendTestMixi
u"Committed at time when I was born ;-)",
author=u'lb', date=date)
- assert commit.date == date
+ assert commit.date == local_dt_to_utc(date)
def assert_succesful_commit(self, added_nodes):
newtip = self.repo.get_commit()
diff --git a/rhodecode/tests/vcs/test_load.py b/rhodecode/tests/vcs/test_load.py
--- a/rhodecode/tests/vcs/test_load.py
+++ b/rhodecode/tests/vcs/test_load.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/vcs/test_nodes.py b/rhodecode/tests/vcs/test_nodes.py
--- a/rhodecode/tests/vcs/test_nodes.py
+++ b/rhodecode/tests/vcs/test_nodes.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/vcs/test_repository.py b/rhodecode/tests/vcs/test_repository.py
--- a/rhodecode/tests/vcs/test_repository.py
+++ b/rhodecode/tests/vcs/test_repository.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -90,22 +90,24 @@ class TestRepositoryBase(BackendTestMixi
self.Backend.check_url(self.repo.path + "invalid", config)
def test_get_contact(self):
- self.repo.contact
+ assert self.repo.contact
def test_get_description(self):
- self.repo.description
+ assert self.repo.description
def test_get_hook_location(self):
assert len(self.repo.get_hook_location()) != 0
- def test_last_change(self):
- assert self.repo.last_change >= datetime.datetime(2010, 1, 1, 21, 0)
+ def test_last_change(self, local_dt_to_utc):
+ assert self.repo.last_change >= local_dt_to_utc(
+ datetime.datetime(2010, 1, 1, 21, 0))
- def test_last_change_in_empty_repository(self, vcsbackend):
+ def test_last_change_in_empty_repository(self, vcsbackend, local_dt_to_utc):
delta = datetime.timedelta(seconds=1)
- start = datetime.datetime.now()
+
+ start = local_dt_to_utc(datetime.datetime.now())
empty_repo = vcsbackend.create_repo()
- now = datetime.datetime.now()
+ now = local_dt_to_utc(datetime.datetime.now())
assert empty_repo.last_change >= start - delta
assert empty_repo.last_change <= now + delta
diff --git a/rhodecode/tests/vcs/test_svn.py b/rhodecode/tests/vcs/test_svn.py
--- a/rhodecode/tests/vcs/test_svn.py
+++ b/rhodecode/tests/vcs/test_svn.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/vcs/test_tags.py b/rhodecode/tests/vcs/test_tags.py
--- a/rhodecode/tests/vcs/test_tags.py
+++ b/rhodecode/tests/vcs/test_tags.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/vcs/test_utils.py b/rhodecode/tests/vcs/test_utils.py
--- a/rhodecode/tests/vcs/test_utils.py
+++ b/rhodecode/tests/vcs/test_utils.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/vcs/test_vcs.py b/rhodecode/tests/vcs/test_vcs.py
--- a/rhodecode/tests/vcs/test_vcs.py
+++ b/rhodecode/tests/vcs/test_vcs.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/vcs/test_vcsclient.py b/rhodecode/tests/vcs/test_vcsclient.py
--- a/rhodecode/tests/vcs/test_vcsclient.py
+++ b/rhodecode/tests/vcs/test_vcsclient.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/tests/vcs/utils.py b/rhodecode/tests/vcs/utils.py
--- a/rhodecode/tests/vcs/utils.py
+++ b/rhodecode/tests/vcs/utils.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/translation.py b/rhodecode/translation.py
--- a/rhodecode/translation.py
+++ b/rhodecode/translation.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2016-2016 RhodeCode GmbH
+# Copyright (C) 2016-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -16,7 +16,7 @@
# RhodeCode Enterprise Edition, including its added features, Support services,
# and proprietary license terms, please see https://rhodecode.com/licenses/
-from pyramid.i18n import TranslationStringFactory
+from pyramid.i18n import TranslationStringFactory, TranslationString
# Create a translation string factory for the 'rhodecode' domain.
_ = TranslationStringFactory('rhodecode')
@@ -34,3 +34,10 @@ class LazyString(object):
def lazy_ugettext(*args, **kw):
""" Lazily evaluated version of _() """
return LazyString(*args, **kw)
+
+
+def _pluralize(msgid1, msgid2, n, mapping=None):
+ if n == 1:
+ return _(msgid1, mapping=mapping)
+ else:
+ return _(msgid2, mapping=mapping)
diff --git a/rhodecode/tweens.py b/rhodecode/tweens.py
--- a/rhodecode/tweens.py
+++ b/rhodecode/tweens.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@@ -20,62 +20,47 @@
import logging
-import pylons
-import rhodecode
-from pylons.i18n.translation import _get_translator
-from pylons.util import ContextObj
-from routes.util import URLGenerator
+from rhodecode.lib.middleware.vcs import (
+ detect_vcs_request, VCS_TYPE_KEY, VCS_TYPE_SKIP)
-from rhodecode.lib.base import attach_context_attributes, get_auth_user
-from rhodecode.model import meta
log = logging.getLogger(__name__)
-def pylons_compatibility_tween_factory(handler, registry):
- def pylons_compatibility_tween(request):
+def vcs_detection_tween_factory(handler, registry):
+
+ def vcs_detection_tween(request):
"""
- While migrating from pylons to pyramid we need to call some pylons code
- from pyramid. For example while rendering an old template that uses the
- 'c' or 'h' objects. This tween sets up the needed pylons globals.
+ Do detection of vcs type, and save results for other layers to re-use
+ this information
"""
- config = rhodecode.CONFIG
- environ = request.environ
- session = request.session
- session_key = (config['pylons.environ_config']
- .get('session', 'beaker.session'))
- # Setup pylons globals.
- pylons.config._push_object(config)
- pylons.request._push_object(request)
- pylons.session._push_object(session)
- environ[session_key] = session
- pylons.url._push_object(URLGenerator(config['routes.map'],
- environ))
+ vcs_handler = detect_vcs_request(
+ request.environ, request.registry.settings.get('vcs.backends'))
- # TODO: Maybe we should use the language from pyramid.
- translator = _get_translator(config.get('lang'))
- pylons.translator._push_object(translator)
+ if vcs_handler:
+ # save detected VCS type for later re-use
+ request.environ[VCS_TYPE_KEY] = vcs_handler.SCM
+ request.vcs_call = vcs_handler.SCM
+ return handler(request)
- # Get the rhodecode auth user object and make it available.
- auth_user = get_auth_user(environ)
- request.user = auth_user
- environ['rc_auth_user'] = auth_user
+ # mark that we didn't detect an VCS, and we can skip detection later on
+ request.environ[VCS_TYPE_KEY] = VCS_TYPE_SKIP
- # Setup the pylons context object ('c')
- context = ContextObj()
- context.rhodecode_user = auth_user
- attach_context_attributes(context, request)
- pylons.tmpl_context._push_object(context)
return handler(request)
- return pylons_compatibility_tween
+ return vcs_detection_tween
def includeme(config):
config.add_subscriber('rhodecode.subscribers.add_renderer_globals',
'pyramid.events.BeforeRender')
+ config.add_subscriber('rhodecode.subscribers.set_user_lang',
+ 'pyramid.events.NewRequest')
config.add_subscriber('rhodecode.subscribers.add_localizer',
'pyramid.events.NewRequest')
- config.add_tween('rhodecode.tweens.pylons_compatibility_tween_factory')
+ config.add_subscriber('rhodecode.subscribers.add_pylons_context',
+ 'pyramid.events.ContextFound')
+
+ config.add_tween('rhodecode.tweens.vcs_detection_tween_factory')
diff --git a/rhodecode/utils/__init__.py b/rhodecode/utils/__init__.py
--- a/rhodecode/utils/__init__.py
+++ b/rhodecode/utils/__init__.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/utils/debugtoolbar.py b/rhodecode/utils/debugtoolbar.py
--- a/rhodecode/utils/debugtoolbar.py
+++ b/rhodecode/utils/debugtoolbar.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/rhodecode/websetup.py b/rhodecode/websetup.py
--- a/rhodecode/websetup.py
+++ b/rhodecode/websetup.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 RhodeCode GmbH
+# Copyright (C) 2010-2017 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
diff --git a/scripts/notify.py b/scripts/notify.py
deleted file mode 100644
--- a/scripts/notify.py
+++ /dev/null
@@ -1,91 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright (C) 2010-2016 RhodeCode GmbH
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License, version 3
-# (only), as published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# 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 Affero General Public License
-# along with this program. If not, see .
-#
-# This program is dual-licensed. If you wish to learn more about the
-# RhodeCode Enterprise Edition, including its added features, Support services,
-# and proprietary license terms, please see https://rhodecode.com/licenses/
-
-import argparse
-
-from rhodecode_api import RhodeCodeAPI
-
-
-def add_api_pr_args(parser):
- parser.add_argument("--url", help="Rhodecode host url", required=True)
- parser.add_argument("--token", help="Rhodecode user token", required=True)
- parser.add_argument("--repoid", help="Repo id", required=True)
- parser.add_argument("--message", help="Comment to add", required=True)
- parser.add_argument("--status", help="Status to set (approved|rejected)")
- parser.add_argument(
- "--prid",
- help="(Optional) Pull request id")
- parser.add_argument(
- "--commit-id",
- help="(Optional) Expected commit ID for source repo")
-
-
-def get_pr_head(args):
- rc = RhodeCodeAPI(args.url, args.token)
- pr_info = rc.get_pull_request(
- repoid=args.repoid,
- pullrequestid=args.prid
- )
- if pr_info['error']:
- return None
-
- return pr_info['result']['source']['reference']['commit_id']
-
-
-def pr_has_same_head(args):
- head_id = get_pr_head(args)
- return head_id == args.commit_id
-
-
-if __name__ == "__main__":
- parser = argparse.ArgumentParser()
- add_api_pr_args(parser)
- args = parser.parse_args()
- status = args.status
-
- rc = RhodeCodeAPI(args.url, args.token)
-
- if not (args.prid or args.commit_id):
- raise AttributeError('You must specify --prid or --commit-id')
-
- if args.prid:
- if args.commit_id and status:
- if not pr_has_same_head(args):
- # PR updated, don't set status
- status = None
-
- resp = rc.comment_pull_request(
- repoid=args.repoid,
- pullrequestid=int(args.prid),
- message=args.message,
- status=status
- )
- elif args.commit_id:
- resp = rc.comment_commit(
- repoid=args.repoid,
- commit_id=args.commit_id,
- message=args.message,
- status=status,
- )
-
- if resp['error']:
- raise Exception(resp['error'])
- else:
- print resp
diff --git a/scripts/rhodecode_api.py b/scripts/rhodecode_api.py
deleted file mode 100644
--- a/scripts/rhodecode_api.py
+++ /dev/null
@@ -1,75 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright (C) 2010-2016 RhodeCode GmbH
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License, version 3
-# (only), as published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# 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 Affero General Public License
-# along with this program. If not, see .
-#
-# This program is dual-licensed. If you wish to learn more about the
-# RhodeCode Enterprise Edition, including its added features, Support services,
-# and proprietary license terms, please see https://rhodecode.com/licenses/
-
-import json
-import urlparse
-import uuid
-
-import requests
-
-
-class RhodeCodeAPI(object):
- """
- Make generic calls to RCE API.
-
- To call any API method, instanciate the API with the URL of your
- RCE instance and your user token.
- Then use a method call with the name of your API method, and pass the
- correct parameters.
-
- Will return a dict with the response from the API call
-
- eg.:
- api = RhodeCodeAPI('http://my.rhodecode.com');
- response = api.comment_pull_request(
- repoid=args.repoid,
- pullrequestid=int(args.prid),
- message=args.message,
- status=args.status
- )
- if response['error']:
- raise Exception(resp['error'])
- else:
- print resp
- """
- headers = {'content-type': 'application/json'}
-
- def __init__(self, instance_url, user_token):
- self.url = instance_url
- self.key = user_token
-
- def __getattr__(self, name):
- return lambda **kwargs: self._call(name, **kwargs)
-
- def _call(self, method, **kwargs):
- payload = {
- 'id': str(uuid.uuid4()),
- 'api_key': self.key,
- 'method': method,
- 'args': kwargs
- }
- url = urlparse.urljoin(self.url, '_admin/api')
- resp = requests.post(
- url, data=json.dumps(payload), headers=self.headers)
-
- if resp.ok:
- return resp.json()
- else:
- resp.raise_for_status()
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -1,45 +1,76 @@
# -*- coding: utf-8 -*-
+# Copyright (C) 2010-2017 RhodeCode GmbH
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License, version 3
+# (only), as published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# 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 Affero General Public License
+# along with this program. If not, see .
+#
+# This program is dual-licensed. If you wish to learn more about the
+# RhodeCode Enterprise Edition, including its added features, Support services,
+# and proprietary license terms, please see https://rhodecode.com/licenses/
+
# Import early to make sure things are patched up properly
from setuptools import setup, find_packages
import os
import sys
+import pkgutil
import platform
+from pip.download import PipSession
+from pip.req import parse_requirements
+
+from codecs import open
+
+
if sys.version_info < (2, 7):
raise Exception('RhodeCode requires Python 2.7 or later')
+here = os.path.abspath(os.path.dirname(__file__))
-here = os.path.abspath(os.path.dirname(__file__))
+# defines current platform
+__platform__ = platform.system()
+__license__ = 'AGPLv3, and Commercial License'
+__author__ = 'RhodeCode GmbH'
+__url__ = 'https://code.rhodecode.com'
+is_windows = __platform__ in ('Windows',)
-def _get_meta_var(name, data, callback_handler=None):
- import re
- matches = re.compile(r'(?:%s)\s*=\s*(.*)' % name).search(data)
- if matches:
- if not callable(callback_handler):
- callback_handler = lambda v: v
+def _get_requirements(req_filename, exclude=None, extras=None):
+ extras = extras or []
+ exclude = exclude or []
- return callback_handler(eval(matches.groups()[0]))
-
-_meta = open(os.path.join(here, 'rhodecode', '__init__.py'), 'rb')
-_metadata = _meta.read()
-_meta.close()
+ try:
+ parsed = parse_requirements(
+ os.path.join(here, req_filename), session=PipSession())
+ except TypeError:
+ # try pip < 6.0.0, that doesn't support session
+ parsed = parse_requirements(os.path.join(here, req_filename))
-callback = lambda V: ('.'.join(map(str, V[:3])) + '.'.join(V[3:]))
-__version__ = open(os.path.join('rhodecode', 'VERSION')).read().strip()
-__license__ = _get_meta_var('__license__', _metadata)
-__author__ = _get_meta_var('__author__', _metadata)
-__url__ = _get_meta_var('__url__', _metadata)
-# defines current platform
-__platform__ = platform.system()
+ requirements = []
+ for ir in parsed:
+ if ir.req and ir.name not in exclude:
+ requirements.append(str(ir.req))
+ return requirements + extras
+
-# Cygwin has different platform identifiers, but they all contain the
-# term "CYGWIN"
-is_windows = __platform__ == 'Windows' or 'CYGWIN' in __platform__
+# requirements extract
+setup_requirements = ['PasteScript', 'pytest-runner']
+install_requirements = _get_requirements(
+ 'requirements.txt', exclude=['setuptools'])
+test_requirements = _get_requirements(
+ 'requirements_test.txt', extras=['configobj'])
-requirements = [
+install_requirements = [
'Babel',
'Beaker',
'FormEncode',
@@ -106,109 +137,72 @@ requirements = [
'waitress',
'zope.cachedescriptors',
'dogpile.cache',
- 'dogpile.core'
-]
-
-if is_windows:
- pass
-else:
- requirements.append('psutil')
- requirements.append('py-bcrypt')
-
-test_requirements = [
- 'WebTest',
- 'configobj',
- 'cssselect',
- 'lxml',
- 'mock',
- 'pytest',
- 'pytest-cov',
- 'pytest-runner',
- 'pytest-sugar',
-]
-
-setup_requirements = [
- 'PasteScript',
- 'pytest-runner',
-]
-
-dependency_links = [
-]
-
-classifiers = [
- 'Development Status :: 6 - Mature',
- 'Environment :: Web Environment',
- 'Framework :: Pylons',
- 'Intended Audience :: Developers',
- 'Operating System :: OS Independent',
- 'Programming Language :: Python',
- 'Programming Language :: Python :: 2.7',
+ 'dogpile.core',
+ 'psutil',
+ 'py-bcrypt',
]
-# additional files from project that goes somewhere in the filesystem
-# relative to sys.prefix
-data_files = []
+def get_version():
+ version = pkgutil.get_data('rhodecode', 'VERSION')
+ return version.strip()
+
# additional files that goes into package itself
-package_data = {'rhodecode': ['i18n/*/LC_MESSAGES/*.mo', ], }
+package_data = {
+ '': ['*.txt', '*.rst'],
+ 'configs': ['*.ini'],
+ 'rhodecode': ['VERSION', 'i18n/*/LC_MESSAGES/*.mo', ],
+}
-description = ('RhodeCode is a fast and powerful management tool '
- 'for Mercurial and GIT with a built in push/pull server, '
- 'full text search and code-review.')
-
+description = 'Source Code Management Platform'
keywords = ' '.join([
- 'rhodecode', 'rhodiumcode', 'mercurial', 'git', 'code review',
- 'repo groups', 'ldap', 'repository management', 'hgweb replacement',
- 'hgwebdir', 'gitweb replacement', 'serving hgweb',
+ 'rhodecode', 'mercurial', 'git', 'svn',
+ 'code review',
+ 'repo groups', 'ldap', 'repository management', 'hgweb',
+ 'hgwebdir', 'gitweb', 'serving hgweb',
])
-# long description
-README_FILE = 'README.rst'
-CHANGELOG_FILE = 'CHANGES.rst'
+
+# README/DESCRIPTION generation
+readme_file = 'README.rst'
+changelog_file = 'CHANGES.rst'
try:
- long_description = open(README_FILE).read() + '\n\n' + \
- open(CHANGELOG_FILE).read()
-
-except IOError, err:
+ long_description = open(readme_file).read() + '\n\n' + \
+ open(changelog_file).read()
+except IOError as err:
sys.stderr.write(
- '[WARNING] Cannot find file specified as long_description (%s)\n or '
- 'changelog (%s) skipping that file' % (README_FILE, CHANGELOG_FILE)
- )
+ "[WARNING] Cannot find file specified as long_description (%s)\n "
+ "or changelog (%s) skipping that file" % (readme_file, changelog_file))
long_description = description
-# packages
-packages = find_packages()
-
-paster_commands = [
- 'make-config=rhodecode.lib.paster_commands.make_config:Command',
- 'setup-rhodecode=rhodecode.lib.paster_commands.setup_rhodecode:Command',
- 'update-repoinfo=rhodecode.lib.paster_commands.update_repoinfo:Command',
- 'cache-keys=rhodecode.lib.paster_commands.cache_keys:Command',
- 'ishell=rhodecode.lib.paster_commands.ishell:Command',
- 'upgrade-db=rhodecode.lib.dbmigrate:UpgradeDb',
- 'celeryd=rhodecode.lib.celerypylons.commands:CeleryDaemonCommand',
-]
setup(
name='rhodecode-enterprise-ce',
- version=__version__,
+ version=get_version(),
description=description,
long_description=long_description,
keywords=keywords,
license=__license__,
author=__author__,
author_email='marcin@rhodecode.com',
- dependency_links=dependency_links,
url=__url__,
- install_requires=requirements,
+ setup_requires=setup_requirements,
+ install_requires=install_requirements,
tests_require=test_requirements,
- classifiers=classifiers,
- setup_requires=setup_requirements,
- data_files=data_files,
- packages=packages,
+ zip_safe=False,
+ packages=find_packages(exclude=["docs", "tests*"]),
+ package_data=package_data,
include_package_data=True,
- package_data=package_data,
+ classifiers=[
+ 'Development Status :: 6 - Mature',
+ 'Environment :: Web Environment',
+ 'Intended Audience :: Developers',
+ 'Operating System :: OS Independent',
+ 'Topic :: Software Development :: Version Control',
+ 'License :: OSI Approved :: Affero GNU General Public License v3 or later (AGPLv3+)',
+ 'Programming Language :: Python :: 2.7',
+ ],
message_extractors={
'rhodecode': [
('**.py', 'python', None),
@@ -218,7 +212,6 @@ setup(
('public/**', 'ignore', None),
]
},
- zip_safe=False,
paster_plugins=['PasteScript', 'Pylons'],
entry_points={
'enterprise.plugins1': [
@@ -238,7 +231,15 @@ setup(
'main=pylons.util:PylonsInstaller',
'pylons=pylons.util:PylonsInstaller',
],
- 'paste.global_paster_command': paster_commands,
+ 'paste.global_paster_command': [
+ 'make-config=rhodecode.lib.paster_commands.make_config:Command',
+ 'setup-rhodecode=rhodecode.lib.paster_commands.setup_rhodecode:Command',
+ 'update-repoinfo=rhodecode.lib.paster_commands.update_repoinfo:Command',
+ 'cache-keys=rhodecode.lib.paster_commands.cache_keys:Command',
+ 'ishell=rhodecode.lib.paster_commands.ishell:Command',
+ 'upgrade-db=rhodecode.lib.dbmigrate:UpgradeDb',
+ 'celeryd=rhodecode.lib.celerypylons.commands:CeleryDaemonCommand',
+ ],
'pytest11': [
'pylons=rhodecode.tests.pylons_plugin',
'enterprise=rhodecode.tests.plugin',