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 + 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} +

+% else: + ${c.form.render() | n} +% endif + diff --git a/rhodecode/templates/admin/my_account/my_account_perms.html b/rhodecode/templates/admin/my_account/my_account_perms.mako rename from rhodecode/templates/admin/my_account/my_account_perms.html rename to rhodecode/templates/admin/my_account/my_account_perms.mako --- a/rhodecode/templates/admin/my_account/my_account_perms.html +++ b/rhodecode/templates/admin/my_account/my_account_perms.mako @@ -1,5 +1,5 @@ ## permissions overview
-<%namespace name="p" file="/base/perms_summary.html"/> +<%namespace name="p" file="/base/perms_summary.mako"/> ${p.perms_summary(c.perm_user.permissions, actions=False)}
diff --git a/rhodecode/templates/admin/my_account/my_account_profile.html b/rhodecode/templates/admin/my_account/my_account_profile.mako rename from rhodecode/templates/admin/my_account/my_account_profile.html rename to rhodecode/templates/admin/my_account/my_account_profile.mako --- a/rhodecode/templates/admin/my_account/my_account_profile.html +++ b/rhodecode/templates/admin/my_account/my_account_profile.mako @@ -1,4 +1,4 @@ -<%namespace name="base" file="/base/base.html"/> +<%namespace name="base" file="/base/base.mako"/> + % endif diff --git a/rhodecode/templates/changelog/changelog_details.html b/rhodecode/templates/changelog/changelog_elements.mako rename from rhodecode/templates/changelog/changelog_details.html rename to rhodecode/templates/changelog/changelog_elements.mako --- a/rhodecode/templates/changelog/changelog_details.html +++ b/rhodecode/templates/changelog/changelog_elements.mako @@ -1,11 +1,122 @@ ## small box that displays changed/added/removed details fetched by AJAX +<%namespace name="base" file="/base/base.mako"/> + + +% if c.prev_page: + + + + ${_('load previous')} + + + +% endif + +% for cnt,commit in enumerate(c.pagination): + + + + ${h.checkbox(commit.raw_id,class_="commit-range")} + + -% if len(c.commit.affected_files) <= c.affected_files_cut_off: -${len(c.commit.removed)} -${len(c.commit.changed)} -${len(c.commit.added)} -% else: - ! - ! - ! + %if c.statuses.get(commit.raw_id): +
+ %if c.statuses.get(commit.raw_id)[2]: + +
+
+ %else: + +
+
+ %endif +
+ %else: +
+ %endif + + + %if c.comments.get(commit.raw_id): + + ${len(c.comments[commit.raw_id])} + + %endif + + + + + ${h.show_id(commit)} + + + + +
+   +
+ + +
+
${h.urlify_commit_message(commit.message, c.repo_name)}
+
+ + + + ${h.age_component(commit.date)} + + + ${base.gravatar_with_user(commit.author)} + + + +
+ + ## merge + %if commit.merge: + + ${_('merge')} + + %endif + + ## branch + %if commit.branch: + + ${h.shorter(commit.branch)} + + %endif + + ## bookmarks + %if h.is_hg(c.rhodecode_repo): + %for book in commit.bookmarks: + + ${h.shorter(book)} + + %endfor + %endif + + ## tags + %for tag in commit.tags: + + ${h.shorter(tag)} + + %endfor + +
+ + +% endfor + +% if c.next_page: + + + + ${_('load next')} + + + % endif + + \ No newline at end of file diff --git a/rhodecode/templates/changelog/changelog_file_history.html b/rhodecode/templates/changelog/changelog_file_history.mako rename from rhodecode/templates/changelog/changelog_file_history.html rename to rhodecode/templates/changelog/changelog_file_history.mako --- a/rhodecode/templates/changelog/changelog_file_history.html +++ b/rhodecode/templates/changelog/changelog_file_history.mako @@ -1,4 +1,4 @@ -<%namespace name="base" file="/base/base.html"/> +<%namespace name="base" file="/base/base.mako"/>
@@ -14,12 +14,6 @@ - %endfor %endif - %if over_lines_changed_limit: - - - - %endif %if filediff.patch['is_limited_diff']: + %else: + %if over_lines_changed_limit: + + + + %endif %endif + %for hunk in filediff.hunks: %endif %endfor + + ## outdated comments that do not fit into currently displayed lines + % for lineno, comments in filediff.left_comments.items(): + + %if c.diffmode == 'unified': + + + + + + + %elif c.diffmode == 'sideside': + + + + + + + + + + %endif + + % endfor +
- - %if cs.merge: - - ${_('merge')} - - %endif
${h.shorter(cs.message, 75)} diff --git a/rhodecode/templates/changelog/changelog_summary_data.html b/rhodecode/templates/changelog/changelog_summary_data.mako rename from rhodecode/templates/changelog/changelog_summary_data.html rename to rhodecode/templates/changelog/changelog_summary_data.mako --- a/rhodecode/templates/changelog/changelog_summary_data.html +++ b/rhodecode/templates/changelog/changelog_summary_data.mako @@ -1,5 +1,5 @@ ## -*- coding: utf-8 -*- -<%namespace name="base" file="/base/base.html"/> +<%namespace name="base" file="/base/base.mako"/> %if c.repo_commits: @@ -34,7 +34,7 @@ diff --git a/rhodecode/templates/changeset/changeset.html b/rhodecode/templates/changeset/changeset.mako rename from rhodecode/templates/changeset/changeset.html rename to rhodecode/templates/changeset/changeset.mako --- a/rhodecode/templates/changeset/changeset.html +++ b/rhodecode/templates/changeset/changeset.mako @@ -1,7 +1,7 @@ ## -*- coding: utf-8 -*- -<%inherit file="/base/base.html"/> -<%namespace name="diff_block" file="/changeset/diff_block.html"/> +<%inherit file="/base/base.mako"/> +<%namespace name="diff_block" file="/changeset/diff_block.mako"/> <%def name="title()"> ${_('%s Commit') % c.repo_name} - ${h.show_id(c.commit)} @@ -112,7 +112,7 @@
- ${_('Diffs')}: + ${_('Diff options')}:
@@ -155,6 +155,23 @@
+
+
+ ${_('Unresolved TODOs')}: +
+
+
+ % if c.unresolved_comments: + % for co in c.unresolved_comments: + ${'' if loop.last else ','} + % endfor + % else: + ${_('There are no unresolved TODOs')} + % endif +
+
+
+
- <%namespace name="cbdiffs" file="/codeblocks/diffs.html"/> + <%namespace name="cbdiffs" file="/codeblocks/diffs.mako"/> ${cbdiffs.render_diffset_menu()} ${cbdiffs.render_diffset( c.changes[c.commit.raw_id], commit=c.commit, use_comments=True)}
## template for inline comment form - <%namespace name="comment" file="/changeset/changeset_file_comment.html"/> - ${comment.comment_inline_form()} + <%namespace name="comment" file="/changeset/changeset_file_comment.mako"/> - ## ## render comments and inlines - ${comment.generate_comments()} + ## render comments + ${comment.generate_comments(c.comments)} ## main comment form and it status ${comment.comments(h.url('changeset_comment', repo_name=c.repo_name, revision=c.commit.raw_id), @@ -210,12 +226,12 @@ if(button.hasClass("comments-visible")) { $('#{0} .inline-comments'.format(boxid)).each(function(index){ $(this).hide(); - }) + }); button.removeClass("comments-visible"); } else { $('#{0} .inline-comments'.format(boxid)).each(function(index){ $(this).show(); - }) + }); button.addClass("comments-visible"); } }); @@ -230,7 +246,7 @@ url: '${h.url('changeset_children',repo_name=c.repo_name, revision=c.commit.raw_id)}', success: function(data) { if(data.results.length === 0){ - $('#child_link').html('${_('No Child Commits')}').addClass('disabled'); + $('#child_link').html("${_('No Child Commits')}").addClass('disabled'); } if(data.results.length === 1){ var commit = data.results[0]; @@ -244,7 +260,7 @@ .replace('__rev__','r{0}:{1}'.format(data.results[0].revision, data.results[0].raw_id.substr(0,6))) .replace('__title__', data.results[0].message) .replace('__url__', pyroutes.url('changeset_home', {'repo_name': '${c.repo_name}','revision': data.results[0].raw_id})); - _html +=' | ' + _html +=' | '; _html +='__rev__ ' .replace('__rev__','r{0}:{1}'.format(data.results[1].revision, data.results[1].raw_id.substr(0,6))) .replace('__title__', data.results[1].message) @@ -263,7 +279,7 @@ // >1 links show them to user to choose if(!$('#parent_link').hasClass('disabled')){ $.ajax({ - url: '${h.url('changeset_parents',repo_name=c.repo_name, revision=c.commit.raw_id)}', + url: '${h.url("changeset_parents",repo_name=c.repo_name, revision=c.commit.raw_id)}', success: function(data) { if(data.results.length === 0){ $('#parent_link').html('${_('No Parent Commits')}').addClass('disabled'); @@ -280,7 +296,7 @@ .replace('__rev__','r{0}:{1}'.format(data.results[0].revision, data.results[0].raw_id.substr(0,6))) .replace('__title__', data.results[0].message) .replace('__url__', pyroutes.url('changeset_home', {'repo_name': '${c.repo_name}','revision': data.results[0].raw_id})); - _html +=' | ' + _html +=' | '; _html +='Parent __rev__' .replace('__rev__','r{0}:{1}'.format(data.results[1].revision, data.results[1].raw_id.substr(0,6))) .replace('__title__', data.results[1].message) diff --git a/rhodecode/templates/changeset/changeset_comment_block.html b/rhodecode/templates/changeset/changeset_comment_block.mako rename from rhodecode/templates/changeset/changeset_comment_block.html rename to rhodecode/templates/changeset/changeset_comment_block.mako --- a/rhodecode/templates/changeset/changeset_comment_block.html +++ b/rhodecode/templates/changeset/changeset_comment_block.mako @@ -1,4 +1,4 @@ ## this is a dummy html file for partial rendering on server and sending ## generated output via ajax after comment submit -<%namespace name="comment" file="/changeset/changeset_file_comment.html"/> -${comment.comment_block(c.co, inline=True)} +<%namespace name="comment" file="/changeset/changeset_file_comment.mako"/> +${comment.comment_block(c.co, inline=c.inline_comment)} diff --git a/rhodecode/templates/changeset/changeset_file_comment.html b/rhodecode/templates/changeset/changeset_file_comment.mako rename from rhodecode/templates/changeset/changeset_file_comment.html rename to rhodecode/templates/changeset/changeset_file_comment.mako --- a/rhodecode/templates/changeset/changeset_file_comment.html +++ b/rhodecode/templates/changeset/changeset_file_comment.mako @@ -1,172 +1,168 @@ ## -*- coding: utf-8 -*- ## usage: -## <%namespace name="comment" file="/changeset/changeset_file_comment.html"/> +## <%namespace name="comment" file="/changeset/changeset_file_comment.mako"/> ## ${comment.comment_block(comment)} ## -<%namespace name="base" file="/base/base.html"/> +<%namespace name="base" file="/base/base.mako"/> <%def name="comment_block(comment, inline=False)"> -
+ <% pr_index_ver = comment.get_index_version(getattr(c, 'versions', [])) %> + % if inline: + <% outdated_at_ver = comment.outdated_at_version(getattr(c, 'at_version_num', None)) %> + % else: + <% outdated_at_ver = comment.older_than_version(getattr(c, 'at_version_num', None)) %> + % endif + + +
+
-
+
+
+ % if comment.comment_type == 'todo': + % if comment.resolved: + + % else: + +
+ ${comment.comment_type} +
+ % endif + % else: + % if comment.resolved_comment: + fix + % else: + ${comment.comment_type or 'note'} + % endif + % endif +
+
+ +
${base.gravatar_with_user(comment.author.email, 16)}
${h.age_component(comment.modified_at, time_is_local=True)}
-
- %if comment.pull_request: - - %if comment.status_change: - ${_('Vote on pull request #%s') % comment.pull_request.pull_request_id}: - %else: - ${_('Comment on pull request #%s') % comment.pull_request.pull_request_id} - %endif - - %else: - %if comment.status_change: - ${_('Status change on commit')}: - %else: - ${_('Comment on commit')} - %endif - %endif -
- %if comment.status_change: + % if inline: + + % else: +
+ % if comment.pull_request: + + % if comment.status_change: + ${_('pull request #%s') % comment.pull_request.pull_request_id}: + % else: + ${_('pull request #%s') % comment.pull_request.pull_request_id} + % endif + + % else: + % if comment.status_change: + ${_('Status change on commit')}: + % endif + % endif +
+ % endif + + % if comment.status_change:
${comment.status_change[0].status_lbl}
- %endif + % endif + + % if comment.resolved_comment: + + ${_('resolves comment #{}').format(comment.resolved_comment.comment_id)} + + % endif + -
${comment.render(mentions=True)|n}
-
- -<%def name="comment_block_outdated(comment)"> -
-
-
-
- ${base.gravatar_with_user(comment.author.email, 16)} -
-
- ${h.age_component(comment.modified_at, time_is_local=True)} -
- %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()): - - %endif -
-
- ${comment.render(mentions=True)|n} -
-
-<%def name="comment_inline_form()"> - - - - ## generate main comments -<%def name="generate_comments(include_pull_request=False, is_pull_request=False)"> -
- %for comment in c.comments: +<%def name="generate_comments(comments, include_pull_request=False, is_pull_request=False)"> +
+ %for comment in comments:
## only render comments that are not from pull request, or from ## pull request and a status change @@ -180,110 +176,220 @@
-## MAIN COMMENT FORM + <%def name="comments(post_url, cur_status, is_pull_request=False, is_compare=False, change_status=True, form_extras=None)"> -%if is_compare: - <% form_id = "comments_form_compare" %> -%else: - <% form_id = "comments_form" %> -%endif + +
+ <% + 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: +
+ ## template generated for injection + ${comment_form(form_type='general', review_statuses=c.commit_statuses, form_extras=form_extras)} +
+ +
+ ## inject form here +
+ + % else: + ## form state when not logged in +
+ +
+
+ +
+ +
+
+
+ ${_('You need to be logged in to leave comments.')} + ${_('Login now')} +
+
+ +
+ + +
+ + +
- %else: -
-
- ${c.pr_merge_msg} ${c.approval_msg if c.approval_msg else ''} + % endif + + +
+ + + +<%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 + +
+ +
+
+ +
+ +
+
+ +
+ +
+ +
- %endif -
-%endif -
- %if c.rhodecode_user.username != h.DEFAULT_USER: -
- ${h.secure_form(post_url, id_=form_id)} -
-
- %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")} + + - - + \ 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 name="main()"> -
+
-
${self.repo_page_title(c.rhodecode_db_repo)} -
- -
+
+ + +
+
+
+ +

+ ${_('Commit Range')} + + r${c.commit_ranges[0].revision}:${h.short_id(c.commit_ranges[0].raw_id)}...r${c.commit_ranges[-1].revision}:${h.short_id(c.commit_ranges[-1].raw_id)} + +

+
+
+ +
+
+ ${_('Diff option')}: +
+ +
-
-
-

- ${self.breadcrumbs_links()} -

+ <%doc> + ##TODO(marcink): implement this and diff menus +
+
+ ${_('Diff options')}: +
+ +
+ +
+ +
+ + -
- ##CS - <%include file="../compare/compare_commits.html"/> + ## Commit range generated below + <%include file="../compare/compare_commits.mako"/>
- <%namespace name="cbdiffs" file="/codeblocks/diffs.html"/> - <%namespace name="comment" file="/changeset/changeset_file_comment.html"/> - <%namespace name="diff_block" file="/changeset/diff_block.html"/> + <%namespace name="cbdiffs" file="/codeblocks/diffs.mako"/> + <%namespace name="comment" file="/changeset/changeset_file_comment.mako"/> + <%namespace name="diff_block" file="/changeset/diff_block.mako"/> ${cbdiffs.render_diffset_menu()} %for commit in c.commit_ranges: ${cbdiffs.render_diffset( @@ -65,7 +120,6 @@ commit=commit, )} %endfor -
%if c.comments.get(cs.raw_id,[]): - ${len(c.comments[cs.raw_id])} + ${len(c.comments[cs.raw_id])} %endif
diff --git a/rhodecode/templates/changeset/diff_block.html b/rhodecode/templates/changeset/diff_block.mako rename from rhodecode/templates/changeset/diff_block.html rename to rhodecode/templates/changeset/diff_block.mako --- a/rhodecode/templates/changeset/diff_block.html +++ b/rhodecode/templates/changeset/diff_block.mako @@ -1,6 +1,6 @@ ## -*- coding: utf-8 -*- ##usage: -## <%namespace name="diff_block" file="/changeset/diff_block.html"/> +## <%namespace name="diff_block" file="/changeset/diff_block.mako"/> ## ${diff_block.diff_block_changeset_table(change)} ## <%def name="changeset_message()"> @@ -12,14 +12,14 @@ <%def name="diff_block_changeset_table(change)">
- %for FID,(cs1, cs2, change, filenode_path, diff, stats, file) in change.iteritems(): + %for FID,(cs1, cs2, change, filenode_path, diff, stats, file_data) in change.iteritems():
${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')}
@@ -33,14 +33,14 @@ <%def name="diff_block_simple(change)">
- %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 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 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 name="action_class(action)"><% +<%def name="action_class(action)"> +<% return { '-': 'cb-deletion', '+': 'cb-addition', ' ': 'cb-context', }.get(action, 'cb-empty') -%> +%> + -<%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 name="link_for(**kw)"><% +<%def name="link_for(**kw)"> +<% new_args = request.GET.mixed() new_args.update(kw) return h.url('', **new_args) -%> +%> + <%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)
+ %if c.rhodecode_user.username != h.DEFAULT_USER: - ${h.form('#', method='get')} -
-
- ${_('Create a comment on line {1}.')} -
-
- ${(_('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 - } -
-
- -
- - + ## render template for inline comments + ${commentblock.comment_form(form_type='inline')} %else: ${h.form('', class_='inline-form comment-form-login', method='get')}
- ${_('You need to be logged in to comment.')} ${_('Login now')} + ${_('You need to be logged in to leave comments.')} ${_('Login now')}
@@ -116,6 +94,7 @@ collapse_all = len(diffset.files) > coll } %endif + %if ruler_at_chars: %endif +
%if commit: @@ -145,7 +125,7 @@ collapse_all = len(diffset.files) > coll ${h.age_component(commit.date)} - %endif %if diffset.limited_diff: - ${_('The requested commit is too big and content was truncated.')} + ${_('The requested commit is too big and content was truncated.')} ${ungettext('%(num)s file changed.', '%(num)s files changed.', diffset.changed_files) % {'num': diffset.changed_files}} ${_('Show full diff')} @@ -153,6 +133,7 @@ collapse_all = len(diffset.files) > coll ${ungettext('%(num)s file changed: %(linesadd)s inserted, ''%(linesdel)s deleted', '%(num)s files changed: %(linesadd)s inserted, %(linesdel)s deleted', diffset.changed_files) % {'num': diffset.changed_files, 'linesadd': diffset.lines_added, 'linesdel': diffset.lines_deleted}} %endif +
@@ -161,11 +142,14 @@ collapse_all = len(diffset.files) > coll %endif
+ ## initial value could be marked as False later on + <% over_lines_changed_limit = False %> %for i, filediff in enumerate(diffset.files): - <% - lines_changed = filediff['patch']['stats']['added'] + filediff['patch']['stats']['deleted'] - over_lines_changed_limit = lines_changed > lines_changed_limit - %> + + <% + lines_changed = filediff['patch']['stats']['added'] + filediff['patch']['stats']['deleted'] + over_lines_changed_limit = lines_changed > lines_changed_limit + %>
coll %if not filediff.hunks: %for op_id, op_text in filediff['patch']['stats']['ops'].items():
+ %if op_id == DEL_FILENODE: ${_('File was deleted')} %elif op_id == BIN_FILENODE: @@ -192,26 +176,28 @@ collapse_all = len(diffset.files) > coll
- ${_('This diff has been collapsed as it changes many lines, (%i lines changed)' % lines_changed)} - ${_('Show them')} - - ${_('Hide them')} - -
${_('The requested commit is too big and content was truncated.')} ${_('Show full diff')}
+ ${_('This diff has been collapsed as it changes many lines, (%i lines changed)' % lines_changed)} + ${_('Show them')} + + ${_('Hide them')} + +
@@ -237,10 +223,100 @@ collapse_all = len(diffset.files) > coll
+ ${inline_comments_container(comments)} +
+ ${inline_comments_container(comments)} +
%endfor - + + ## outdated comments that are made for a file that has been deleted + % for filename, comments_dict in (deleted_files_comments or {}).items(): + + + % endfor + + @@ -252,8 +328,9 @@ from rhodecode.lib.diffs import NEW_FILE %> %if filediff.source_file_path and filediff.target_file_path: - %if filediff.source_file_path != filediff.target_file_path: # file was renamed - ${filediff.target_file_path}${filediff.source_file_path} + %if filediff.source_file_path != filediff.target_file_path: + ## file was renamed + ${filediff.target_file_path}${filediff.source_file_path} %else: ## file was modified ${filediff.source_file_path} @@ -329,30 +406,30 @@ from rhodecode.lib.diffs import NEW_FILE title="${h.tooltip(_('Show file at commit: %(commit_id)s') % {'commit_id': filediff.diffset.source_ref[:12]})}" > ${_('Show file before')} - + | %else: ${_('Show file before')} - + | %endif %if filediff.patch['operation'] in ['A', 'M']: ${_('Show file after')} - + | %else: ${_('Show file after')} - + | %endif ${_('Raw diff')} - + | ${_('Download diff')} + % if use_comments: + | + % endif ## TODO: dan: refactor ignorews_url and context_url into the diff renderer same as diffmode=unified/sideside. Also use ajax to load more context (by clicking hunks) %if hasattr(c, 'ignorews_url'): @@ -377,7 +457,6 @@ from rhodecode.lib.diffs import NEW_FILE ${c.context_url(request.GET, h.FID('', filediff['patch']['filename']))} %endif - %if use_comments: ${_('Show comments')}${_('Hide comments')} @@ -388,16 +467,24 @@ from rhodecode.lib.diffs import NEW_FILE -<%namespace name="commentblock" file="/changeset/changeset_file_comment.html"/> <%def name="inline_comments_container(comments)">
%for comment in comments: ${commentblock.comment_block(comment, inline=True)} %endfor + + % if comments and comments[-1].outdated: + + % else: ${_('Add another comment')} + % endif +
@@ -411,6 +498,7 @@ from rhodecode.lib.diffs import NEW_FILE if line.modified.lineno: new_line_anchor = diff_line_anchor(hunk.filediff.target_file_path, line.modified.lineno, 'n') %> + <%def name="render_add_comment_button()"> - + <%def name="render_diffset_menu()"> +
+
${_('Expand All')} + onclick="$('input[class=filediff-collapse-state]').prop('checked', false); return false">${_('Expand All Files')} ${_('Collapse All')} + onclick="$('input[class=filediff-collapse-state]').prop('checked', true); return false">${_('Collapse All Files')} + ${_('Wide Mode Diff')}
diff --git a/rhodecode/templates/codeblocks/source.html b/rhodecode/templates/codeblocks/source.mako rename from rhodecode/templates/codeblocks/source.html rename to rhodecode/templates/codeblocks/source.mako --- a/rhodecode/templates/codeblocks/source.html +++ b/rhodecode/templates/codeblocks/source.mako @@ -42,9 +42,7 @@ title="Author: ${annotation.author | entity}
Date: ${annotation.date}
Message: ${annotation.message | entity}" > ${h.gravatar_with_user(annotation.author, 16) | n} - ${ - h.truncate(annotation.message, len(lines) * 30) - } + ${h.truncate(annotation.message, len(lines) * 30)} -
- %if not c.commit_ranges: -

${_('No Commits')}

- %else: +<%namespace name="base" file="/base/base.mako"/> - %if c.ancestor: -

${_('Common Ancestor Commit')}: - - ${h.short_id(c.ancestor)} - -

- %endif +%if c.ancestor: +
${_('Common Ancestor Commit')}: + + ${h.short_id(c.ancestor)} + . ${_('Compare was calculated based on this shared commit.')} +
+%endif +
@@ -28,6 +23,7 @@ %endfor + + + + % if not c.commit_ranges: + + + + % endif
${h.age_component(commit.date)} @@ -66,9 +62,22 @@
+ ${ungettext('%s commit hidden','%s commits hidden', len(c.commit_ranges)) % len(c.commit_ranges)}, + ${ungettext('show it','show them', len(c.commit_ranges))} +
+ ${_('No commits in this compare')} +
- %endif +
+
${self.repo_page_title(c.rhodecode_db_repo)} -
-
-
-
-
- ## The hidden elements are replaced with a select2 widget -
${_('Target')}
${h.hidden('compare_source')} -
${_('Source')}
${h.hidden('compare_target')} +
+
+
+ +

+ ${_('Compare Commits')} + % if c.file_path: + ${_('for file')} ${c.file_path} + % endif + + % if c.commit_ranges: + + r${c.source_commit.revision}:${h.short_id(c.source_commit.raw_id)}...r${c.target_commit.revision}:${h.short_id(c.target_commit.raw_id)} + + % endif +

+
+
- %if not c.preview_mode: -
-
- %if not c.compare_home: - ${_('Swap')} - %endif -
${_('Compare Commits')}
- %if c.diffset and c.diffset.files: -
${_('Comment')}
- %endif +
+
+ ${_('Target')}: +
+
+
+
+
+ ## 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 - %> - - - %if c.compare_home: + % if not c.compare_home:
-
${_('Compare commits, branches, bookmarks or tags.')}
-
- %else: -
- ##CS - <%include file="compare_commits.html"/> + +
+ ## commit compare generated below + <%include file="compare_commits.mako"/> ${cbdiffs.render_diffset_menu()} ${cbdiffs.render_diffset(c.diffset)}
- %endif + % endif +
-
- + + \ No newline at end of file diff --git a/rhodecode/templates/data_table/_dt_elements.html b/rhodecode/templates/data_table/_dt_elements.mako rename from rhodecode/templates/data_table/_dt_elements.html rename to rhodecode/templates/data_table/_dt_elements.mako --- a/rhodecode/templates/data_table/_dt_elements.html +++ b/rhodecode/templates/data_table/_dt_elements.mako @@ -1,7 +1,7 @@ ## DATA TABLE RE USABLE ELEMENTS ## usage: -## <%namespace name="dt" file="/data_table/_dt_elements.html"/> -<%namespace name="base" file="/base/base.html"/> +## <%namespace name="dt" file="/data_table/_dt_elements.mako"/> +<%namespace name="base" file="/base/base.mako"/> ## REPOSITORY RENDERERS <%def name="quick_menu(repo_name)"> @@ -295,7 +295,7 @@ <%def name="pullrequest_comments(comments_nr)"> - ${comments_nr} + ${comments_nr} <%def name="pullrequest_name(pull_request_id, target_repo_name, short=False)"> diff --git a/rhodecode/templates/debug_style/code-block.html b/rhodecode/templates/debug_style/code-block.html --- a/rhodecode/templates/debug_style/code-block.html +++ b/rhodecode/templates/debug_style/code-block.html @@ -1,5 +1,5 @@ ## -*- coding: utf-8 -*- -<%namespace name="base" file="/base/base.html"/> +<%namespace name="base" file="/base/base.mako"/> <%inherit file="/debug_style/index.html"/> <%def name="breadcrumbs_links()"> @@ -9,11 +9,9 @@ <%def name="js_extra()"> - <%def name="css_extra()"> - @@ -1142,7 +1140,7 @@ with multiple lines

var val = e.currentTarget.checked; $('#compare').mergely('options', {ignorews: val}); $('#compare').mergely('update'); - }) + }); $('#edit_mode').change(function(e){ var val = !e.currentTarget.checked; $('#compare').mergely('cm', 'lhs').setOption('readOnly', val); diff --git a/rhodecode/templates/debug_style/collapsable-content.html b/rhodecode/templates/debug_style/collapsable-content.html --- a/rhodecode/templates/debug_style/collapsable-content.html +++ b/rhodecode/templates/debug_style/collapsable-content.html @@ -868,7 +868,7 @@ return formatChangeStatus(data, escapeMarkup); }; - $('#change_status').select2({ + $('#change_status_general').select2({ placeholder: "Status Review", formatResult: formatResult, formatSelection: formatSelection, @@ -918,9 +918,6 @@ $(btns).each(fn_display); }); - // inject comments into they proper positions - var file_comments = $('.inline-comment-placeholder'); - renderInlineComments(file_comments); var commentTotals = {}; $.each(file_comments, function(i, comment) { var path = $(comment).attr('path'); diff --git a/rhodecode/templates/debug_style/index.html b/rhodecode/templates/debug_style/index.html --- a/rhodecode/templates/debug_style/index.html +++ b/rhodecode/templates/debug_style/index.html @@ -1,5 +1,5 @@ ## -*- coding: utf-8 -*- -<%inherit file="/base/base.html"/> +<%inherit file="/base/base.mako"/> <%def name="title()"> ${_('Debug Style')} diff --git a/rhodecode/templates/debug_style/login2.html b/rhodecode/templates/debug_style/login2.html --- a/rhodecode/templates/debug_style/login2.html +++ b/rhodecode/templates/debug_style/login2.html @@ -6,4 +6,4 @@ %> ## Include the original file here for easy operation -<%include file="/login.html" /> +<%include file="/login.mako" /> diff --git a/rhodecode/templates/debug_style/tables.html b/rhodecode/templates/debug_style/tables.html --- a/rhodecode/templates/debug_style/tables.html +++ b/rhodecode/templates/debug_style/tables.html @@ -278,7 +278,7 @@ td-comments Comments indicator icon. - 0 + 0 @@ -361,7 +361,7 @@ diff --git a/rhodecode/templates/files/base.html b/rhodecode/templates/files/base.mako rename from rhodecode/templates/files/base.html rename to rhodecode/templates/files/base.mako diff --git a/rhodecode/templates/files/diff_2way.html b/rhodecode/templates/files/diff_2way.html deleted file mode 100644 --- a/rhodecode/templates/files/diff_2way.html +++ /dev/null @@ -1,225 +0,0 @@ -## -*- coding: utf-8 -*- - -<%inherit file="/base/base.html"/> -<%namespace name="diff_block" file="/changeset/diff_block.html"/> - -<%def name="js_extra()"> - - - -<%def name="css_extra()"> - - - -<%def name="title()"> - ${_('%s File side-by-side diff') % c.repo_name} - %if c.rhodecode_name: - · ${h.branding(c.rhodecode_name)} - %endif - - -<%def name="breadcrumbs_links()"> - r${c.commit_1.revision}:${h.short_id(c.commit_1.raw_id)} ... r${c.commit_2.revision}:${h.short_id(c.commit_2.raw_id)} - - -<%def name="menu_bar_nav()"> - ${self.menu_items(active='repositories')} - - -<%def name="menu_bar_subnav()"> - ${self.repo_menu(active='changelog')} - - -<%def name="main()"> -
-
- ${self.repo_page_title(c.rhodecode_db_repo)} -
- - -
- - - - - - - - - - - - - - - - - - -
- - - - - - -
${h.fancy_file_stats(c.diff_data['stats'])}
-
- -
-
-
-
-
-
-
-
- ${_('mode')}: plain | -
-
-
-
-
-
-
-
-
- - - - -
- diff --git a/rhodecode/templates/files/file_authors_box.html b/rhodecode/templates/files/file_authors_box.mako rename from rhodecode/templates/files/file_authors_box.html rename to rhodecode/templates/files/file_authors_box.mako --- a/rhodecode/templates/files/file_authors_box.html +++ b/rhodecode/templates/files/file_authors_box.mako @@ -1,4 +1,4 @@ -<%namespace name="base" file="/base/base.html"/> +<%namespace name="base" file="/base/base.mako"/>

diff --git a/rhodecode/templates/files/file_diff.html b/rhodecode/templates/files/file_diff.html deleted file mode 100644 --- a/rhodecode/templates/files/file_diff.html +++ /dev/null @@ -1,159 +0,0 @@ -<%inherit file="/base/base.html"/> -<%namespace name="diff_block" file="/changeset/diff_block.html"/> -<%def name="title()"> - ${_('%s File Diff') % c.repo_name} - %if c.rhodecode_name: - · ${h.branding(c.rhodecode_name)} - %endif - - -<%def name="breadcrumbs_links()"> - ${_('Compare')} - r${c.commit_1.revision}:${h.short_id(c.commit_1.raw_id)} - % if c.filename1 != c.filename: - ${c.filename1} - % endif - ... - r${c.commit_2.revision}:${h.short_id(c.commit_2.raw_id)} - - -<%def name="menu_bar_nav()"> - ${self.menu_items(active='repositories')} - - -<%def name="menu_bar_subnav()"> - ${self.repo_menu(active='changelog')} - - -<%def name="breadcrumbs_links()"> - ${_('Compare')} - r${c.commit_1.revision}:${h.short_id(c.commit_1.raw_id)} - % if c.filename1 != c.filename: - ${c.filename1} - % endif - ... - r${c.commit_2.revision}:${h.short_id(c.commit_2.raw_id)} - % if c.filename1 == c.filename: - ${_('for')} ${c.filename1} - % endif - - -<%def name="main()"> -
- -
- ${self.repo_page_title(c.rhodecode_db_repo)} -
- - ${self.breadcrumbs()} - -
- - %if not c.commit_ranges: -

${_('No commits')}

- - %else: -
${_('Target')}
-
- - ${h.link_to('r%s:%s' % (c.commit_1.revision, h.short_id(c.commit_1.raw_id)), h.url('changeset_home',repo_name=c.repo_name, revision=c.commit_1.raw_id))} - -
-
${_('Source')}
-
- - ${h.link_to('r%s:%s' % (c.commit_2.revision, h.short_id(c.commit_2.raw_id)), h.url('changeset_home',repo_name=c.repo_name, revision=c.commit_2.raw_id))} - -
- %endif -
- - ##CS - <%include file="../compare/compare_commits.html" /> - - ## FILES -
- - ${_('Expand All')} | ${_('Collapse All')} - -

- % if c.binary_file: - ${_('Cannot diff binary files')} - % elif (c.lines_added == 0 and c.lines_deleted == 0): - ${_('File was not changed in this commit range')} - % else: - ${diff_block.diff_summary_text(len(c.files), c.lines_added, c.lines_deleted)} - % endif -

-
- -% if (c.lines_added > 0 or c.lines_deleted > 0): -
- - %for FID, (cs1, cs2, change, path, diff, stats, file) in c.changes.iteritems(): - - - - - - - - - - - - - - - - - - %endfor -
- - - - - - - %if (stats): -
${h.fancy_file_stats(stats)}
- %endif -
- -
-
-
-
-
-
- ${diff|n} - % if file and file["is_limited_diff"]: - % if file["exceeds_limit"]: - ${diff_block.file_message()} - % else: -
${_('Diff was truncated. File content available only in full diff.')} ${_('Show full diff')}
- % endif - % endif -
-
-
-
-
-% endif -
- diff --git a/rhodecode/templates/files/file_tree_author_box.html b/rhodecode/templates/files/file_tree_author_box.mako rename from rhodecode/templates/files/file_tree_author_box.html rename to rhodecode/templates/files/file_tree_author_box.mako --- a/rhodecode/templates/files/file_tree_author_box.html +++ b/rhodecode/templates/files/file_tree_author_box.mako @@ -1,4 +1,4 @@ -<%namespace name="base" file="/base/base.html"/> +<%namespace name="base" file="/base/base.mako"/>

diff --git a/rhodecode/templates/files/file_tree_detail.html b/rhodecode/templates/files/file_tree_detail.mako rename from rhodecode/templates/files/file_tree_detail.html rename to rhodecode/templates/files/file_tree_detail.mako --- a/rhodecode/templates/files/file_tree_detail.html +++ b/rhodecode/templates/files/file_tree_detail.mako @@ -1,4 +1,4 @@ -<%namespace name="file_base" file="/files/base.html"/> +<%namespace name="file_base" file="/files/base.mako"/>
diff --git a/rhodecode/templates/files/files.html b/rhodecode/templates/files/files.mako rename from rhodecode/templates/files/files.html rename to rhodecode/templates/files/files.mako --- a/rhodecode/templates/files/files.html +++ b/rhodecode/templates/files/files.mako @@ -1,4 +1,4 @@ -<%inherit file="/base/base.html"/> +<%inherit file="/base/base.mako"/> <%def name="title(*args)"> ${_('%s Files') % c.repo_name} @@ -33,7 +33,7 @@
- <%include file='files_pjax.html'/> + <%include file='files_pjax.mako'/>
\ No newline at end of file diff --git a/rhodecode/templates/files/files_edit.html b/rhodecode/templates/files/files_edit.mako rename from rhodecode/templates/files/files_edit.html rename to rhodecode/templates/files/files_edit.mako --- a/rhodecode/templates/files/files_edit.html +++ b/rhodecode/templates/files/files_edit.mako @@ -1,4 +1,4 @@ -<%inherit file="/base/base.html"/> +<%inherit file="/base/base.mako"/> <%def name="title()"> ${_('%s File Edit') % c.repo_name} diff --git a/rhodecode/templates/files/files_pjax.html b/rhodecode/templates/files/files_pjax.mako rename from rhodecode/templates/files/files_pjax.html rename to rhodecode/templates/files/files_pjax.mako --- a/rhodecode/templates/files/files_pjax.html +++ b/rhodecode/templates/files/files_pjax.mako @@ -28,9 +28,9 @@ % if c.file.is_submodule(): Submodule ${h.escape(c.file.name)} % elif c.file.is_dir(): - <%include file='file_tree_detail.html'/> + <%include file='file_tree_detail.mako'/> % else: - <%include file='files_detail.html'/> + <%include file='files_detail.mako'/> % endif
@@ -40,16 +40,16 @@ % if c.file.is_dir(): - <%include file='files_browser.html'/> + <%include file='files_browser.mako'/> % else: - <%include file='files_source.html'/> + <%include file='files_source.mako'/> % endif
\ No newline at end of file diff --git a/rhodecode/templates/files/files_source.html b/rhodecode/templates/files/files_source.mako rename from rhodecode/templates/files/files_source.html rename to rhodecode/templates/files/files_source.mako --- a/rhodecode/templates/files/files_source.html +++ b/rhodecode/templates/files/files_source.mako @@ -1,4 +1,4 @@ -<%namespace name="sourceblock" file="/codeblocks/source.html"/> +<%namespace name="sourceblock" file="/codeblocks/source.mako"/>
diff --git a/rhodecode/templates/followers/followers.html b/rhodecode/templates/followers/followers.mako rename from rhodecode/templates/followers/followers.html rename to rhodecode/templates/followers/followers.mako --- a/rhodecode/templates/followers/followers.html +++ b/rhodecode/templates/followers/followers.mako @@ -1,5 +1,5 @@ ## -*- coding: utf-8 -*- -<%inherit file="/base/base.html"/> +<%inherit file="/base/base.mako"/> <%def name="title()"> ${_('%s Followers') % c.repo_name} diff --git a/rhodecode/templates/followers/followers_data.html b/rhodecode/templates/followers/followers_data.mako rename from rhodecode/templates/followers/followers_data.html rename to rhodecode/templates/followers/followers_data.mako --- a/rhodecode/templates/followers/followers_data.html +++ b/rhodecode/templates/followers/followers_data.mako @@ -1,5 +1,5 @@ ## -*- coding: utf-8 -*- -<%namespace name="base" file="/base/base.html"/> +<%namespace name="base" file="/base/base.mako"/> diff --git a/rhodecode/templates/forks/fork.html b/rhodecode/templates/forks/fork.mako rename from rhodecode/templates/forks/fork.html rename to rhodecode/templates/forks/fork.mako --- a/rhodecode/templates/forks/fork.html +++ b/rhodecode/templates/forks/fork.mako @@ -1,5 +1,5 @@ ## -*- coding: utf-8 -*- -<%inherit file="/base/base.html"/> +<%inherit file="/base/base.mako"/> <%def name="title()"> ${_('Fork repository %s') % c.repo_name} diff --git a/rhodecode/templates/forks/forks.html b/rhodecode/templates/forks/forks.mako rename from rhodecode/templates/forks/forks.html rename to rhodecode/templates/forks/forks.mako --- a/rhodecode/templates/forks/forks.html +++ b/rhodecode/templates/forks/forks.mako @@ -1,5 +1,5 @@ ## -*- coding: utf-8 -*- -<%inherit file="/base/base.html"/> +<%inherit file="/base/base.mako"/> <%def name="title()"> ${_('%s Forks') % c.repo_name} diff --git a/rhodecode/templates/forks/forks_data.html b/rhodecode/templates/forks/forks_data.mako rename from rhodecode/templates/forks/forks_data.html rename to rhodecode/templates/forks/forks_data.mako --- a/rhodecode/templates/forks/forks_data.html +++ b/rhodecode/templates/forks/forks_data.mako @@ -1,5 +1,5 @@ ## -*- coding: utf-8 -*- -<%namespace name="base" file="/base/base.html"/> +<%namespace name="base" file="/base/base.mako"/> % if c.forks_pager:
${_('Follower Name')}
diff --git a/rhodecode/templates/index.html b/rhodecode/templates/index.mako rename from rhodecode/templates/index.html rename to rhodecode/templates/index.mako --- a/rhodecode/templates/index.html +++ b/rhodecode/templates/index.mako @@ -1,5 +1,5 @@ ## -*- coding: utf-8 -*- -<%inherit file="index_base.html"/> +<%inherit file="index_base.mako"/> <%def name="title()"> ${_('Dashboard')} diff --git a/rhodecode/templates/index_base.html b/rhodecode/templates/index_base.mako rename from rhodecode/templates/index_base.html rename to rhodecode/templates/index_base.mako --- a/rhodecode/templates/index_base.html +++ b/rhodecode/templates/index_base.mako @@ -1,4 +1,4 @@ -<%inherit file="/base/base.html"/> +<%inherit file="/base/base.mako"/> <%def name="main()">
@@ -131,8 +131,6 @@ "type": Number}, title: "${_('Commit')}", className: "td-hash" }, { data: {"_": "owner", "sort": "owner"}, title: "${_('Owner')}", className: "td-user" }, - { data: {"_": "rss", - "sort": "rss"}, title: "rss", className: "td-rss" } ], language: { paginate: DEFAULT_GRID_PAGINATION, diff --git a/rhodecode/templates/index_repo_group.html b/rhodecode/templates/index_repo_group.mako rename from rhodecode/templates/index_repo_group.html rename to rhodecode/templates/index_repo_group.mako --- a/rhodecode/templates/index_repo_group.html +++ b/rhodecode/templates/index_repo_group.mako @@ -1,5 +1,5 @@ ## -*- coding: utf-8 -*- -<%inherit file="index_base.html"/> +<%inherit file="index_base.mako"/> <%def name="title()"> ${_('%s Repository group dashboard') % c.repo_group.group_name} diff --git a/rhodecode/templates/journal/journal.html b/rhodecode/templates/journal/journal.mako rename from rhodecode/templates/journal/journal.html rename to rhodecode/templates/journal/journal.mako --- a/rhodecode/templates/journal/journal.html +++ b/rhodecode/templates/journal/journal.mako @@ -1,5 +1,5 @@ ## -*- coding: utf-8 -*- -<%inherit file="/base/base.html"/> +<%inherit file="/base/base.mako"/> <%def name="title()"> ${_('Journal')} %if c.rhodecode_name: diff --git a/rhodecode/templates/journal/journal_data.html b/rhodecode/templates/journal/journal_data.mako rename from rhodecode/templates/journal/journal_data.html rename to rhodecode/templates/journal/journal_data.mako --- a/rhodecode/templates/journal/journal_data.html +++ b/rhodecode/templates/journal/journal_data.mako @@ -1,5 +1,5 @@ ## -*- coding: utf-8 -*- -<%namespace name="base" file="/base/base.html"/> +<%namespace name="base" file="/base/base.mako"/> %if c.journal_day_aggreagate: %for day,items in c.journal_day_aggreagate: diff --git a/rhodecode/templates/journal/public_journal.html b/rhodecode/templates/journal/public_journal.mako rename from rhodecode/templates/journal/public_journal.html rename to rhodecode/templates/journal/public_journal.mako --- a/rhodecode/templates/journal/public_journal.html +++ b/rhodecode/templates/journal/public_journal.mako @@ -1,5 +1,5 @@ ## -*- coding: utf-8 -*- -<%inherit file="/base/base.html"/> +<%inherit file="/base/base.mako"/> <%def name="title()"> ${_('Public Journal')} %if c.rhodecode_name: diff --git a/rhodecode/templates/login.html b/rhodecode/templates/login.mako rename from rhodecode/templates/login.html rename to rhodecode/templates/login.mako --- a/rhodecode/templates/login.html +++ b/rhodecode/templates/login.mako @@ -1,5 +1,5 @@ ## -*- coding: utf-8 -*- -<%inherit file="base/root.html"/> +<%inherit file="base/root.mako"/> <%def name="title()"> ${_('Sign In')} diff --git a/rhodecode/templates/password_reset.html b/rhodecode/templates/password_reset.mako rename from rhodecode/templates/password_reset.html rename to rhodecode/templates/password_reset.mako --- a/rhodecode/templates/password_reset.html +++ b/rhodecode/templates/password_reset.mako @@ -1,5 +1,5 @@ ## -*- coding: utf-8 -*- -<%inherit file="base/root.html"/> +<%inherit file="base/root.mako"/> <%def name="title()"> ${_('Reset Password')} @@ -56,7 +56,7 @@ %endif %if captcha_active: -
+ ## SHOW ALL VERSIONS OF PR + <% ver_pr = None %> + + % for data in reversed(list(enumerate(c.versions, 1))): + <% ver_pos = data[0] %> + <% ver = data[1] %> + <% ver_pr = ver.pull_request_version_id %> + <% display_row = '' if c.at_version and (c.at_version_num == ver_pr or c.from_version_num == ver_pr) else 'none' %> + + + + + + + + + + % endfor + + + + + + ## show comment/inline comments summary + <%def name="comments_summary()"> + + + + + ${comments_summary()} +
+ + v${ver_pos} + + + + + + <% review_status = c.review_versions[ver_pr].status if ver_pr in c.review_versions else 'not_reviewed' %> +
+
+
+ % if c.at_version_num != ver_pr: + + + G:${len(c.comment_versions[ver_pr]['at'])} / I:${len(c.inline_versions[ver_pr]['at'])} + + % endif + + ##${ver.source_ref_parts.commit_id[:6]} + + ${h.age_component(ver.updated_on)} +
+ +
+ + % if c.at_version: + <% inline_comm_count_ver = len(c.inline_versions[c.at_version_num]['display']) %> + <% general_comm_count_ver = len(c.comment_versions[c.at_version_num]['display']) %> + ${_('Comments at this version')}: + % else: + <% inline_comm_count_ver = len(c.inline_versions[c.at_version_num]['until']) %> + <% general_comm_count_ver = len(c.comment_versions[c.at_version_num]['until']) %> + ${_('Comments for this pull request')}: + % endif - % if c.outdated_cnt: - ,${ungettext("%d Outdated Comment", "%d Outdated Comments", c.outdated_cnt) % c.outdated_cnt} ${_('(Show)')} - % endif + %if general_comm_count_ver: + ${_("%d General ") % general_comm_count_ver} + %else: + ${_("%d General ") % general_comm_count_ver} + %endif + + %if inline_comm_count_ver: + , ${_("%d Inline") % inline_comm_count_ver} + %else: + , ${_("%d Inline") % inline_comm_count_ver} + %endif + + %if outdated_comm_count_ver: + , ${_("%d Outdated") % outdated_comm_count_ver} + | ${_('show outdated comments')} + + %else: + , ${_("%d Outdated") % outdated_comm_count_ver} + %endif +
+ % else: +
+ ${_('Pull request versions not available')}.
-
-
+
+ + ${comments_summary()} +
+
+ % endif +

+ % endif -
- % if c.allowed_to_update and not c.pull_request.is_closed(): - + +
+ % if not c.compare_mode: + + % if c.at_version_pos: +

+ ${_('Showing changes at v%d, commenting is disabled.') % c.at_version_pos} +

% endif - % if len(c.commit_ranges): -

${ungettext('Compare View: %s commit','Compare View: %s commits', len(c.commit_ranges)) % len(c.commit_ranges)}

- % endif -
+ + + +
+ % if c.allowed_to_update and not c.pull_request.is_closed(): + ${_('Update commits')} + % else: + ${_('Update commits')} + % endif + +
+ % endif +
+ % if not c.missing_commits: - <%include file="/compare/compare_commits.html" /> -
- <%namespace name="cbdiffs" file="/codeblocks/diffs.html"/> - ${cbdiffs.render_diffset_menu()} - ${cbdiffs.render_diffset( - c.diffset, use_comments=True, - collapse_when_files_over=30, - disable_new_comments=c.pull_request.is_closed())} + % if c.compare_mode: + % if c.at_version: +

+ ${_('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')}: +

+ +
+ ${_('commits added: {}, removed: {}').format(len(c.commit_changes_summary.added), len(c.commit_changes_summary.removed))} +
+ +
+ + + + + + + + + + + % for c_type, commit in c.commit_changes: + % if c_type in ['a', 'r']: + <% + if c_type == 'a': + cc_title = _('Commit added in displayed changes') + elif c_type == 'r': + cc_title = _('Commit removed in displayed changes') + else: + cc_title = '' + %> + + + + + + + + + % endif + % endfor +
${_('Time')}${_('Author')}${_('Commit')}${_('Description')}
+
+
+ ${c_type.upper()} +
+
+
+ ${h.age_component(commit.date)} + + ${base.gravatar_with_user(commit.author, 16)} + + + + r${commit.revision}:${h.short_id(commit.raw_id)} + + ${h.hidden('revisions', commit.raw_id)} + + +
+ +
+
+
+
+ ${h.urlify_commit_message(commit.message, c.repo_name)} +
+
+
+
+ + + + % endif + + % else: + <%include file="/compare/compare_commits.mako" /> + % endif + +
+ <%namespace name="cbdiffs" file="/codeblocks/diffs.mako"/> + ${cbdiffs.render_diffset_menu()} + ${cbdiffs.render_diffset( + c.diffset, use_comments=True, + collapse_when_files_over=30, + disable_new_comments=not c.allowed_to_comment, + deleted_files_comments=c.deleted_files_comments)} +
+ % else: + ## skipping commits we need to clear the view for missing commits +
+ % endif
- % endif
## template for inline comment form - <%namespace name="comment" file="/changeset/changeset_file_comment.html"/> - ${comment.comment_inline_form()} + <%namespace name="comment" file="/changeset/changeset_file_comment.mako"/> + + ## render general comments - ## render comments and inlines - ${comment.generate_comments(include_pull_request=True, is_pull_request=True)} +
+
+ % if general_outdated_comm_count_ver: +
+ % if general_outdated_comm_count_ver == 1: + ${_('there is {num} general comment from older versions').format(num=general_outdated_comm_count_ver)}, + ${_('show it')} + % else: + ${_('there are {num} general comments from older versions').format(num=general_outdated_comm_count_ver)}, + ${_('show them')} + % endif +
+ % endif +
+
+ + ${comment.generate_comments(c.comments, include_pull_request=True, is_pull_request=True)} % if not c.pull_request.is_closed(): + ## merge status, and merge action +
+ <%include file="/pullrequests/pullrequest_merge_checks.mako"/> +
+ ## main comment form and it status ${comment.comments(h.url('pullrequest_comment', repo_name=c.repo_name, pull_request_id=c.pull_request.pull_request_id), @@ -329,11 +593,24 @@ diff --git a/rhodecode/templates/pullrequests/pullrequests.html b/rhodecode/templates/pullrequests/pullrequests.mako rename from rhodecode/templates/pullrequests/pullrequests.html rename to rhodecode/templates/pullrequests/pullrequests.mako --- a/rhodecode/templates/pullrequests/pullrequests.html +++ b/rhodecode/templates/pullrequests/pullrequests.mako @@ -1,4 +1,4 @@ -<%inherit file="/base/base.html"/> +<%inherit file="/base/base.mako"/> <%def name="title()"> ${_('%s Pull Requests') % c.repo_name} diff --git a/rhodecode/templates/register.html b/rhodecode/templates/register.mako rename from rhodecode/templates/register.html rename to rhodecode/templates/register.mako --- a/rhodecode/templates/register.html +++ b/rhodecode/templates/register.mako @@ -1,5 +1,5 @@ -## -*- coding: utf-8 -*- -<%inherit file="base/root.html"/> +=## -*- coding: utf-8 -*- +<%inherit file="base/root.mako"/> <%def name="title()"> ${_('Create an Account')} diff --git a/rhodecode/templates/rst_templates/pull_request_update.mako b/rhodecode/templates/rst_templates/pull_request_update.mako --- a/rhodecode/templates/rst_templates/pull_request_update.mako +++ b/rhodecode/templates/rst_templates/pull_request_update.mako @@ -1,5 +1,5 @@ ## -*- coding: utf-8 -*- -Auto status change to |under_review| +Pull request updated. Auto status change to |under_review| .. role:: added .. role:: removed diff --git a/rhodecode/templates/search/search.html b/rhodecode/templates/search/search.mako rename from rhodecode/templates/search/search.html rename to rhodecode/templates/search/search.mako --- a/rhodecode/templates/search/search.html +++ b/rhodecode/templates/search/search.mako @@ -1,5 +1,5 @@ ## -*- coding: utf-8 -*- -<%inherit file="/base/base.html"/> +<%inherit file="/base/base.mako"/> <%def name="title()"> %if c.repo_name: @@ -78,13 +78,13 @@ ${h.end_form()}
diff --git a/rhodecode/templates/search/search_commit.html b/rhodecode/templates/search/search_commit.mako rename from rhodecode/templates/search/search_commit.html rename to rhodecode/templates/search/search_commit.mako --- a/rhodecode/templates/search/search_commit.html +++ b/rhodecode/templates/search/search_commit.mako @@ -1,4 +1,4 @@ -<%namespace name="base" file="/base/base.html"/> +<%namespace name="base" file="/base/base.mako"/> diff --git a/rhodecode/templates/search/search_content.html b/rhodecode/templates/search/search_content.mako rename from rhodecode/templates/search/search_content.html rename to rhodecode/templates/search/search_content.mako --- a/rhodecode/templates/search/search_content.html +++ b/rhodecode/templates/search/search_content.mako @@ -31,7 +31,7 @@ for line_number in matching_lines: %if len(matching_lines) > shown_matching_lines: ${len(matching_lines) - shown_matching_lines} ${_('more matches in this file')} -

+
%endif diff --git a/rhodecode/templates/search/search_path.html b/rhodecode/templates/search/search_path.mako rename from rhodecode/templates/search/search_path.html rename to rhodecode/templates/search/search_path.mako diff --git a/rhodecode/templates/search/search_repository.html b/rhodecode/templates/search/search_repository.mako rename from rhodecode/templates/search/search_repository.html rename to rhodecode/templates/search/search_repository.mako diff --git a/rhodecode/templates/summary/base.html b/rhodecode/templates/summary/base.mako rename from rhodecode/templates/summary/base.html rename to rhodecode/templates/summary/base.mako --- a/rhodecode/templates/summary/base.html +++ b/rhodecode/templates/summary/base.mako @@ -1,4 +1,4 @@ -<%inherit file="/base/base.html"/> +<%inherit file="/base/base.mako"/> <%def name="title()"> ## represents page title diff --git a/rhodecode/templates/summary/components.html b/rhodecode/templates/summary/components.mako rename from rhodecode/templates/summary/components.html rename to rhodecode/templates/summary/components.mako --- a/rhodecode/templates/summary/components.html +++ b/rhodecode/templates/summary/components.mako @@ -88,7 +88,7 @@
- <%commit_rev = c.rhodecode_db_repo.changeset_cache.get('revision')%> + <% commit_rev = c.rhodecode_db_repo.changeset_cache.get('revision') %> ## commits % if commit_rev == -1: diff --git a/rhodecode/templates/summary/missing_requirements.html b/rhodecode/templates/summary/missing_requirements.mako rename from rhodecode/templates/summary/missing_requirements.html rename to rhodecode/templates/summary/missing_requirements.mako --- a/rhodecode/templates/summary/missing_requirements.html +++ b/rhodecode/templates/summary/missing_requirements.mako @@ -1,6 +1,6 @@ -<%inherit file="/summary/base.html"/> +<%inherit file="/summary/base.mako"/> -<%namespace name="components" file="/summary/components.html"/> +<%namespace name="components" file="/summary/components.mako"/> <%def name="main()">
diff --git a/rhodecode/templates/summary/summary.html b/rhodecode/templates/summary/summary.mako rename from rhodecode/templates/summary/summary.html rename to rhodecode/templates/summary/summary.mako --- a/rhodecode/templates/summary/summary.html +++ b/rhodecode/templates/summary/summary.mako @@ -1,6 +1,6 @@ -<%inherit file="/summary/base.html"/> +<%inherit file="/summary/base.mako"/> -<%namespace name="components" file="/summary/components.html"/> +<%namespace name="components" file="/summary/components.mako"/> <%def name="menu_bar_subnav()"> @@ -14,11 +14,10 @@
@@ -37,7 +36,7 @@ %endif
- <%include file='../changelog/changelog_summary_data.html'/> + <%include file='../changelog/changelog_summary_data.mako'/>
@@ -97,9 +96,9 @@ // format of Object {text: "v0.0.3", type: "tag", id: "rev"} var selected_cs = e.added; var fname= e.added.raw_id + ".zip"; - var href = pyroutes.url('files_archive_home', {'repo_name': templateContext.repo_name, 'fname':fname}) + var href = pyroutes.url('files_archive_home', {'repo_name': templateContext.repo_name, 'fname':fname}); // set new label - $('#archive_link').html(' '+ e.added.text+".zip") + $('#archive_link').html(' '+ e.added.text+".zip"); // set new url to button, $('#archive_link').attr('href', href) diff --git a/rhodecode/templates/tags/tags.html b/rhodecode/templates/tags/tags.mako rename from rhodecode/templates/tags/tags.html rename to rhodecode/templates/tags/tags.mako --- a/rhodecode/templates/tags/tags.html +++ b/rhodecode/templates/tags/tags.mako @@ -1,5 +1,5 @@ ## -*- coding: utf-8 -*- -<%inherit file="/base/base.html"/> +<%inherit file="/base/base.mako"/> <%def name="title()"> ${_('%s Tags') % c.repo_name} diff --git a/rhodecode/templates/tags/tags_data.html b/rhodecode/templates/tags/tags_data.mako rename from rhodecode/templates/tags/tags_data.html rename to rhodecode/templates/tags/tags_data.mako --- a/rhodecode/templates/tags/tags_data.html +++ b/rhodecode/templates/tags/tags_data.mako @@ -1,6 +1,6 @@ ## DATA TABLE RE USABLE ELEMENTS FOR TAGS ## usage: -## <%namespace name="tags" file="/tags/tags_data.html"/> +## <%namespace name="tags" file="/tags/tags_data.mako"/> ## tags.(arg,arg2) <%def name="compare(commit_id)"> diff --git a/rhodecode/templates/users/user.html b/rhodecode/templates/users/user.mako rename from rhodecode/templates/users/user.html rename to rhodecode/templates/users/user.mako --- a/rhodecode/templates/users/user.html +++ b/rhodecode/templates/users/user.mako @@ -1,4 +1,4 @@ -<%inherit file="/base/base.html"/> +<%inherit file="/base/base.mako"/> <%def name="title()"> ${c.user.username} @@ -38,7 +38,7 @@
- <%include file="/users/${c.active}.html"/> + <%include file="/users/${c.active}.mako"/>
diff --git a/rhodecode/templates/users/user_profile.html b/rhodecode/templates/users/user_profile.mako rename from rhodecode/templates/users/user_profile.html rename to rhodecode/templates/users/user_profile.mako --- a/rhodecode/templates/users/user_profile.html +++ b/rhodecode/templates/users/user_profile.mako @@ -1,4 +1,4 @@ -<%namespace name="base" file="/base/base.html"/> +<%namespace name="base" file="/base/base.mako"/>