release: version 5.4.0

This commit is contained in:
Andrii Verbytskyi 2024-12-24 20:09:27 +01:00
commit 06278ea41f
806 changed files with 10367 additions and 10321 deletions

View file

@ -1,5 +0,0 @@
[bumpversion]
current_version = 5.4.0
message = release: Bump version {current_version} to {new_version}
[bumpversion:file:rhodecode/VERSION]

View file

@ -54,7 +54,7 @@ clean:
# test: run test-clean and tests
test:
make test-clean
unset RC_SQLALCHEMY_DB1_URL && unset RC_DB_URL && make test-only
make test-only
.PHONY: test-clean
@ -71,7 +71,25 @@ test-only:
PYTHONHASHSEED=random \
py.test -x -vv -r xw -p no:sugar \
--cov-report=term-missing --cov-report=html \
--cov=rhodecode rhodecode
--cov=rhodecode rhodecode \
--ignore=rhodecode/tests/vcs_operations \
--ignore=rhodecode/tests/database
PYTHONHASHSEED=random \
py.test -x -vv -r xw -p no:sugar \
rhodecode/tests/vcs_operations
PYTHONHASHSEED=random \
py.test -x -vv -r xw -p no:sugar \
rhodecode/tests/database
.PHONY: test-simple
# test-simple: Run tests only for main test suite witout coverage
test-simple:
PYTHONHASHSEED=random \
py.test -x -vv -r xw -p no:sugar \
--ignore=rhodecode/tests/vcs_operations \
--ignore=rhodecode/tests/database
# >>> Docs commands

View file

@ -485,6 +485,10 @@ rc_cache.cache_general.expiration_time = 43200
; auto-renew lock to prevent stale locks, slower but safer. Use only if problems happen
#rc_cache.cache_general.arguments.lock_auto_renewal = true
; prefix for redis keys used for this cache backend, the final key is constructed using {custom-prefix}{key}
#rc_cache.cache_general.arguments.key_prefix = custom-prefix-
; *************************************************
; `cache_perms` cache for permission tree, auth TTL
; for simplicity use rc.file_namespace backend,
@ -512,6 +516,10 @@ rc_cache.cache_perms.expiration_time = 3600
; auto-renew lock to prevent stale locks, slower but safer. Use only if problems happen
#rc_cache.cache_perms.arguments.lock_auto_renewal = true
; prefix for redis keys used for this cache backend, the final key is constructed using {custom-prefix}{key}
#rc_cache.cache_perms.arguments.key_prefix = custom-prefix-
; ***************************************************
; `cache_repo` cache for file tree, Readme, RSS FEEDS
; for simplicity use rc.file_namespace backend,
@ -539,6 +547,40 @@ rc_cache.cache_repo.expiration_time = 2592000
; auto-renew lock to prevent stale locks, slower but safer. Use only if problems happen
#rc_cache.cache_repo.arguments.lock_auto_renewal = true
; prefix for redis keys used for this cache backend, the final key is constructed using {custom-prefix}{key}
#rc_cache.cache_repo.arguments.key_prefix = custom-prefix-
; *********************************************
; `cache_license` cache for storing license info
; for simplicity use rc.file_namespace backend,
; for performance and scale use rc.redis
; *********************************************
rc_cache.cache_license.backend = dogpile.cache.rc.file_namespace
rc_cache.cache_license.expiration_time = 300
; file cache store path. Defaults to `cache_dir =` value or tempdir if both values are not set
#rc_cache.cache_license.arguments.filename = /tmp/cache_general_db
; alternative `cache_license` redis backend with distributed lock
#rc_cache.cache_license.backend = dogpile.cache.rc.redis
#rc_cache.cache_license.expiration_time = 300
; redis_expiration_time needs to be greater then expiration_time
#rc_cache.cache_license.arguments.redis_expiration_time = 360
#rc_cache.cache_license.arguments.host = localhost
#rc_cache.cache_license.arguments.port = 6379
#rc_cache.cache_license.arguments.db = 0
#rc_cache.cache_license.arguments.socket_timeout = 30
; more Redis options: https://dogpilecache.sqlalchemy.org/en/latest/api.html#redis-backends
#rc_cache.cache_license.arguments.distributed_lock = true
; auto-renew lock to prevent stale locks, slower but safer. Use only if problems happen
#rc_cache.cache_license.arguments.lock_auto_renewal = true
; prefix for redis keys used for this cache backend, the final key is constructed using {custom-prefix}{key}
#rc_cache.cache_license.arguments.key_prefix = custom-prefix-
; ##############
; BEAKER SESSION
; ##############
@ -547,7 +589,7 @@ rc_cache.cache_repo.expiration_time = 2592000
; types are file, ext:redis, ext:database, ext:memcached
; Fastest ones are ext:redis and ext:database, DO NOT use memory type for session
#beaker.session.type = file
#beaker.session.data_dir = %(here)s/data/sessions
#beaker.session.data_dir = /var/opt/rhodecode_data/sessions
; Redis based sessions
beaker.session.type = ext:redis

View file

@ -453,6 +453,10 @@ rc_cache.cache_general.expiration_time = 43200
; auto-renew lock to prevent stale locks, slower but safer. Use only if problems happen
#rc_cache.cache_general.arguments.lock_auto_renewal = true
; prefix for redis keys used for this cache backend, the final key is constructed using {custom-prefix}{key}
#rc_cache.cache_general.arguments.key_prefix = custom-prefix-
; *************************************************
; `cache_perms` cache for permission tree, auth TTL
; for simplicity use rc.file_namespace backend,
@ -480,6 +484,10 @@ rc_cache.cache_perms.expiration_time = 3600
; auto-renew lock to prevent stale locks, slower but safer. Use only if problems happen
#rc_cache.cache_perms.arguments.lock_auto_renewal = true
; prefix for redis keys used for this cache backend, the final key is constructed using {custom-prefix}{key}
#rc_cache.cache_perms.arguments.key_prefix = custom-prefix-
; ***************************************************
; `cache_repo` cache for file tree, Readme, RSS FEEDS
; for simplicity use rc.file_namespace backend,
@ -507,6 +515,40 @@ rc_cache.cache_repo.expiration_time = 2592000
; auto-renew lock to prevent stale locks, slower but safer. Use only if problems happen
#rc_cache.cache_repo.arguments.lock_auto_renewal = true
; prefix for redis keys used for this cache backend, the final key is constructed using {custom-prefix}{key}
#rc_cache.cache_repo.arguments.key_prefix = custom-prefix-
; *********************************************
; `cache_license` cache for storing license info
; for simplicity use rc.file_namespace backend,
; for performance and scale use rc.redis
; *********************************************
rc_cache.cache_license.backend = dogpile.cache.rc.file_namespace
rc_cache.cache_license.expiration_time = 300
; file cache store path. Defaults to `cache_dir =` value or tempdir if both values are not set
#rc_cache.cache_license.arguments.filename = /tmp/cache_general_db
; alternative `cache_license` redis backend with distributed lock
#rc_cache.cache_license.backend = dogpile.cache.rc.redis
#rc_cache.cache_license.expiration_time = 300
; redis_expiration_time needs to be greater then expiration_time
#rc_cache.cache_license.arguments.redis_expiration_time = 360
#rc_cache.cache_license.arguments.host = localhost
#rc_cache.cache_license.arguments.port = 6379
#rc_cache.cache_license.arguments.db = 0
#rc_cache.cache_license.arguments.socket_timeout = 30
; more Redis options: https://dogpilecache.sqlalchemy.org/en/latest/api.html#redis-backends
#rc_cache.cache_license.arguments.distributed_lock = true
; auto-renew lock to prevent stale locks, slower but safer. Use only if problems happen
#rc_cache.cache_license.arguments.lock_auto_renewal = true
; prefix for redis keys used for this cache backend, the final key is constructed using {custom-prefix}{key}
#rc_cache.cache_license.arguments.key_prefix = custom-prefix-
; ##############
; BEAKER SESSION
; ##############
@ -515,7 +557,7 @@ rc_cache.cache_repo.expiration_time = 2592000
; types are file, ext:redis, ext:database, ext:memcached
; Fastest ones are ext:redis and ext:database, DO NOT use memory type for session
#beaker.session.type = file
#beaker.session.data_dir = %(here)s/data/sessions
#beaker.session.data_dir = /var/opt/rhodecode_data/sessions
; Redis based sessions
beaker.session.type = ext:redis

View file

@ -1,4 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This 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,8 +27,11 @@ from rhodecode.tests.conftest_common import ( # noqa
pytest_plugins = [
"rhodecode.tests.fixture_mods.fixture_pyramid",
"rhodecode.tests.fixture_mods.fixture_utils",
"rhodecode.tests.fixtures.fixture_pyramid",
"rhodecode.tests.fixtures.fixture_utils",
"rhodecode.tests.fixtures.function_scoped_baseapp",
"rhodecode.tests.fixtures.module_scoped_baseapp",
"rhodecode.tests.fixtures.rcextensions_fixtures",
]

View file

@ -3,4 +3,4 @@
# docker build --tag sphinx-doc-build-rc .
# Build Docs
# docker run --rm -v $(PWD):/project --workdir=/project/docs sphinx-doc-build-rc make clean html
# cd && docker run --rm -v $(pwd):/project --workdir=/project/docs sphinx-doc-build-rc make clean html

View file

@ -2,22 +2,24 @@
Migrating |repos|
-----------------
When you install |RCE| you will be presented with 2 choices:
If you have installed |RCE| and have |repos| that you wish to migrate into
the system, use the following instructions.
1. Mount existing folder on your local filesystem, and this is what |RCE| will use to store your repos. In this case |RCE| will automatically import repos present in that folder. You can also do :ref:`remap-rescan` from admin interface to force new repos discovery.
2. Use docker named volume ``rc_reposvolume`` - in this case you can either set create new |repo| in |RCE| UI and set it as a remote for your local repo, and then push. If your repo is hosted somewhere else, click "Import Existing Repository ?" and provide url to it. |RCE| will attempt to pull it and import.
1. On the |RCE| interface, check your |repo| storage location under
:menuselection:`Admin --> Settings --> System Info`. For example,
Storage location: /home/{username}/repos.
2. Copy the |repos| that you want |RCE| to manage to this location.
3. Remap and rescan the |repos|, see :ref:`remap-rescan`
.. important::
Repo storage path inside docker is configurable in ``rhodecode.ini`` file:
``repo_store.path = /var/opt/rhodecode_repo_store``
Directories create |repo| groups inside |RCE|.
Mounting of local filesystem folder is configurable in ``docker-compose-apps.override.yaml``
Importing adds |RCE| git hooks to your |repos|.
Importing adds |RCE| git hooks to your |repos|.
You should verify if custom ``.hg`` or ``.hgrc`` files inside
repositories should be adjusted since |RCE| reads the content of them.
You should verify if custom ``.hg`` or ``.hgrc`` files inside
repositories should be adjusted since |RCE| reads the content of them.
.. note::
There's another override file for dev setup, which mounts default workspace folder as a repo storage by default.
you can configure this by changing ``docker-compose-apps.dev.yaml``
(and commenting out all lines ``$WORKSPACE_HOME:/var/opt/rhodecode_repo_store:delegated``)

View file

@ -0,0 +1,41 @@
|RCE| 5.3.1 |RNS|
-----------------
Release Date
^^^^^^^^^^^^
- 2024-09-21
New Features
^^^^^^^^^^^^
General
^^^^^^^
Security
^^^^^^^^
Performance
^^^^^^^^^^^
- svn: small performance bump by restoring path cache in previous builds
Fixes
^^^^^
- Fixed problems with incorrect version string
- Fixed accidentally removed svn path check cache
Upgrade notes
^^^^^^^^^^^^^
- RhodeCode 5.3.1 is unscheduled security release to address some build issues with 5.X images

View file

@ -0,0 +1,49 @@
|RCE| 5.4.0 |RNS|
-----------------
Release Date
^^^^^^^^^^^^
New Features
^^^^^^^^^^^^
- RhodeCode and VcsServer operate now on bytestrings instead of strings for diffs and files. This allows a mixed or non-utf8
encoded files to be used.
- Remap and rescan: added more resilient remap and removal option, and also split the logic to either add or cleanup.
- Automatic merge of approved pull requests (available only for enterprise edition).
- Basic implementation of security scan (secrets, keys, passwords, etc) for repositories (available only for enterprise edition).
General
^^^^^^^
- Ported build system to use pyproject.toml.
- Bumped version of mercurial and hg-evolve.
Security
^^^^^^^^
- Multiple library bumps to fix security issues found in those python packages.
Performance
^^^^^^^^^^^
- SVN: added same caches for stored file nodes as git and mercurial have for improved performance.
- GIT: moved certain operations into vcsserver
Fixes
^^^^^
- Fixed UI visualization issues with long commit messages
- Fixed masking for some fields in admin settings
- Fixed issues with caches calculations when passed search fields were empty
- Fixed observer's ability to change a PR status
Upgrade notes
^^^^^^^^^^^^^

View file

@ -9,6 +9,8 @@ Release Notes
.. toctree::
:maxdepth: 1
release-notes-5.4.0.rst
release-notes-5.3.1.rst
release-notes-5.3.0.rst
release-notes-5.2.1.rst
release-notes-5.2.0.rst

View file

@ -8,4 +8,4 @@ pygments==2.18.0
docutils<0.19
markupsafe==2.1.3
jinja2==3.1.2
jinja2==3.1.4

View file

@ -12,6 +12,26 @@ The commands available with |RCT| can be split into three categories:
- Local configuration commands used to help set up your |RCT| configuration.
.. _tools-rhodecode-list-instance:
rhodecode-list-instances
------------------------
Use this command to list the instance details configured in the
:file:`/etc/rhodecode/conf/.rhoderc` file.
.. code-block:: bash
$ ./rcstack cli cmd rhodecode-list-instances --config=/etc/rhodecode/conf/.rhoderc
[instance:production] - Config only
API-HOST: https://some.url.com
API-KEY: some.auth.token
[instance:development] - Config only
API-HOST: http://some.ip.address
API-KEY: some.auth.token
rhodecode-tools
---------------
@ -163,6 +183,7 @@ Example usage:
removing gist /home/brian/repos/.rc_gist_store/5
removing gist /home/brian/repos/.rc_gist_store/8FtCKdcbRKmEvRzTVsEt
rhodecode-cleanup-repos
-----------------------
@ -201,30 +222,37 @@ Example usage:
.. code-block:: bash
# Cleaning up repos using tools installed with RCE 350 and above
$ ~/.rccontrol/enterprise-4/profile/bin/rhodecode-cleanup-repos \
--instance-name=enterprise-4 --older-than=1d
Scanning for repositories in /home/brian/repos...
preparing to remove [2] found repositories older than 1 day, 0:00:00 (1d)
# create a .rhoderc file in your host config directory (in :file:`config/_shared/.rhoderc`):
[instance:rcstack-instance]
api_host = http://rhodecode:10020
api_key = <API_KEY>
repo_dir = /var/opt/rhodecode_repo_store
# Run rcstack cli
./rcstack cli cmd rhodecode-cleanup-repos --instance-name=rcstack-instance --config=/etc/rhodecode/conf/.rhoderc
checking if config files needs bootstrapping
Scanning for repositories in /var/opt/rhodecode_repo_store...
the following repositories will be deleted completely:
* REMOVED: 2015-08-05 00:23:18 | /home/brian/repos/rm__20150805_002318_831
* REMOVED: 2015-08-04 01:22:10 | /home/brian/repos/rm__20150804_012210_336
* REMOVED: 2015-08-05 00:23:18 | /var/opt/rhodecode_repo_store/rm__20150805_002318_831
* REMOVED: 2015-08-04 01:22:10 | /var/opt/rhodecode_repo_store/rm__20150804_012210_336
are you sure you want to remove them? [y/N]:
# Clean up repos older than 1 year
# If using virtualenv and pre RCE 350 tools installation
(venv)$ rhodecode-cleanup-repos --instance-name=enterprise-1 \
--older-than=365d
./rcstack cli cmd rhodecode-cleanup-repos --instance-name=rcstack-instance --config=/etc/rhodecode/conf/.rhoderc --older-than=365d
Scanning for repositories in /home/brian/repos...
checking if config files needs bootstrapping
Scanning for repositories in /var/opt/rhodecode_repo_store...
preparing to remove [343] found repositories older than 365 days
# clean up repos older than 3 days
# If using virtualenv and pre RCE 350 tools installation
(venv)$ rhodecode-cleanup-repos --instance-name=enterprise-1 \
--older-than=3d
Scanning for repositories in /home/brian/repos...
./rcstack cli cmd rhodecode-cleanup-repos --instance-name=rcstack-instance --config=/etc/rhodecode/conf/.rhoderc --older-than=3d
checking if config files needs bootstrapping
Scanning for repositories in /var/opt/rhodecode_repo_store...
preparing to remove [3] found repositories older than 3 days
.. _tools-config:
@ -420,9 +448,8 @@ Example usage:
}
# Cat a file and pipe to gist
# in RCE 3.5.0 tools and above
$ cat ~/.rhoderc | ~/.rccontrol/{instance-id}/profile/bin/rhodecode-gist \
--instance-name=enterprise-4 -d '.rhoderc copy' create
$ cat ~/.rhoderc | ./rcstack cli cmd rhodecode-gist --instance-name=rcstack-instance --config=/etc/rhodecode/conf/.rhoderc -d '.rhoderc copy' create
{
"error": null,
"id": 9253,
@ -512,41 +539,18 @@ Example usage:
.. code-block:: bash
# Run the indexer
$ ~/.rccontrol/enterprise-4/profile/bin/rhodecode-index \
--instance-name=enterprise-4
# Create the indexing mapping file
$ ./rcstack cli cmd rhodecode-index --instance-name=rcstack-instance --config=/etc/rhodecode/conf/.rhoderc --create-mapping search_mapping.ini
# Run indexer based on search_mapping.ini file
# This is using pre-350 virtualenv
(venv)$ rhodecode-index --instance-name=enterprise-1
# Run the indexer
$ ./rcstack cli cmd rhodecode-index --instance-name=rcstack-instance --config=/etc/rhodecode/conf/.rhoderc
# Run indexer based on search_mapping.ini file using rhodecode-tools virtualenv
(venv)$ rhodecode-index --instance-name=rcstack-instance
# Index from the command line without creating
# the .rhoderc file
$ rhodecode-index --apikey=key --apihost=http://rhodecode.server \
--instance-name=enterprise-2 --save-config
# Create the indexing mapping file
$ ~/.rccontrol/enterprise-4/profile/bin/rhodecode-index \
--create-mapping search_mapping.ini --instance-name=enterprise-4
.. _tools-rhodecode-list-instance:
rhodecode-list-instances
------------------------
Use this command to list the instance details configured in the
:file:`~/.rhoderc` file.
.. code-block:: bash
$ .rccontrol/enterprise-1/profile/bin/rhodecode-list-instances
[instance:production] - Config only
API-HOST: https://some.url.com
API-KEY: some.auth.token
[instance:development] - Config only
API-HOST: http://some.ip.address
API-KEY: some.auth.token
$ rhodecode-index --apikey=key --apihost=http://rhodecode.server --instance-name=rcstack-instance --save-config
.. _tools-setup-config:

137
pyproject.toml Normal file
View file

@ -0,0 +1,137 @@
[build-system]
requires = ["setuptools>=61.0.0", "wheel", "pastescript"]
build-backend = "setuptools.build_meta"
[project]
name = "rhodecode-enterprise-ce"
description = "Enterprise Source Code Management Platform"
authors = [
{name = "RhodeCode GmbH", email = "support@rhodecode.com"},
]
keywords = [
'rhodecode', 'mercurial', 'git', 'svn',
'code review',
'repo groups', 'ldap', 'repository management', 'hgweb',
'hgwebdir', 'gitweb', 'serving hgweb',
]
license = {text = "GPL V3"}
requires-python = ">=3.10"
dynamic = ["version", "readme", "dependencies", "optional-dependencies"]
classifiers = [
'Development Status :: 6 - Mature',
'Intended Audience :: Developers',
'Operating System :: OS Independent',
'Topic :: Software Development :: Version Control',
'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)',
'Programming Language :: Python :: 3.11',
]
[project.entry-points."paste.app_factory"]
main = "rhodecode.config.middleware:make_pyramid_app"
[project.entry-points."pyramid.pshell_runner"]
ipython = "rhodecode.lib.pyramid_shell:ipython_shell_runner"
[project.entry-points."beaker.backends"]
memorylru_base="rhodecode.lib.memory_lru_dict:MemoryLRUNamespaceManagerBase"
memorylru_debug="rhodecode.lib.memory_lru_dict:MemoryLRUNamespaceManagerDebug"
[project.scripts]
rc-setup-app = "rhodecode.lib.rc_commands.setup_rc:main"
rc-upgrade-db = "rhodecode.lib.rc_commands.upgrade_db:main"
rc-ishell = "rhodecode.lib.rc_commands.ishell:main"
rc-add-artifact = "rhodecode.lib.rc_commands.add_artifact:main"
rc-migrate-artifact = "rhodecode.lib.rc_commands.migrate_artifact:main"
rc-ssh-wrapper = "rhodecode.apps.ssh_support.lib.ssh_wrapper_v1:main"
rc-ssh-wrapper-v2 = "rhodecode.apps.ssh_support.lib.ssh_wrapper_v2:main"
[tool.setuptools]
packages = ["rhodecode"]
include-package-data = true
[tools.setuptools.package-data]
"" = ['*.txt', '*.rst']
"configs" = ['*.ini']
"rhodecode" = ['VERSION', 'i18n/*/LC_MESSAGES/*.mo', ]
[tool.setuptools.exclude-package-data]
"rhodecode" = ["__pycache__"]
[tool.setuptools.dynamic]
readme = {file = ["README.rst"], content-type = "text/rst"}
version = {file = "rhodecode/VERSION"}
dependencies = {file = ["requirements.txt"]}
optional-dependencies.tests = {file = ["requirements_test.txt"]}
[tool.ruff]
# Line length max same as Black.
line-length = 120
# Assume Python 3.11
target-version = "py311"
[tool.ruff.lint]
select = [
# Pyflakes
"F",
# Pycodestyle
"E",
"W",
# isort
"I001"
]
ignore = [
"E501", # line too long, handled by black
]
[tool.ruff.lint.isort]
known-first-party = ["rhodecode"]
[tool.ruff.format]
# Like Black, use double quotes for strings.
quote-style = "double"
# Like Black, indent with spaces, rather than tabs.
indent-style = "space"
# Like Black, respect magic trailing commas.
skip-magic-trailing-comma = false
# Like Black, automatically detect the appropriate line ending.
line-ending = "auto"
[tool.bumpversion]
current_version = "5.4.0"
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
serialize = ["{major}.{minor}.{patch}"]
search = "{current_version}"
replace = "{new_version}"
regex = false
ignore_missing_version = false
ignore_missing_files = false
tag = false
sign_tags = false
tag_name = "v{new_version}"
tag_message = "release(version-bump): {current_version} → {new_version}"
allow_dirty = false
commit = false
message = "release(version-bump): {current_version} → {new_version}"
commit_args = ""
setup_hooks = []
pre_commit_hooks = []
post_commit_hooks = []
# message_extractors={
# 'rhodecode': [
# ('**.py', 'python', None),
# ('**.js', 'javascript', None),
# ('templates/**.mako', 'mako', {'input_encoding': 'utf-8'}),
# ('templates/**.html', 'mako', {'input_encoding': 'utf-8'}),
# ('public/**', 'ignore', None),
# ]
# },

View file

@ -4,8 +4,10 @@ norecursedirs = rhodecode/public rhodecode/templates tests/scripts
cache_dir = /tmp/.pytest_cache
pyramid_config = rhodecode/tests/rhodecode.ini
vcsserver_protocol = http
vcsserver_config_http = rhodecode/tests/vcsserver_http.ini
vcsserver_config = rhodecode/tests/vcsserver_http.ini
rhodecode_config = rhodecode/tests/rhodecode.ini
celery_config = rhodecode/tests/rhodecode.ini
addopts =
--pdbcls=IPython.terminal.debugger:TerminalPdb

View file

@ -1,39 +1,39 @@
# deps, generated via pipdeptree --exclude setuptools,wheel,pipdeptree,pip -f | tr '[:upper:]' '[:lower:]'
alembic==1.13.1
mako==1.2.4
markupsafe==2.1.2
mako==1.3.6
markupsafe==3.0.2
sqlalchemy==1.4.52
greenlet==3.0.3
greenlet==3.1.1
typing_extensions==4.12.2
async-timeout==4.0.3
babel==2.12.1
beaker==1.12.1
celery==5.3.6
billiard==4.2.0
click==8.1.3
click-didyoumean==0.3.0
click==8.1.3
beaker==1.13.0
celery==5.4.0
billiard==4.2.1
click==8.1.7
click-didyoumean==0.3.1
click==8.1.7
click-plugins==1.1.1
click==8.1.3
click-repl==0.2.0
click==8.1.3
prompt_toolkit==3.0.47
click==8.1.7
click-repl==0.3.0
click==8.1.7
prompt_toolkit==3.0.48
wcwidth==0.2.13
six==1.16.0
kombu==5.3.5
kombu==5.4.2
amqp==5.2.0
vine==5.1.0
tzdata==2024.2
vine==5.1.0
python-dateutil==2.8.2
python-dateutil==2.9.0.post0
six==1.16.0
tzdata==2024.1
tzdata==2024.2
vine==5.1.0
channelstream==0.7.1
gevent==24.2.1
greenlet==3.0.3
gevent==24.11.1
greenlet==3.1.1
zope.event==5.0.0
zope.interface==7.0.3
zope.interface==7.1.1
itsdangerous==1.1.0
marshmallow==2.18.0
pyramid==2.0.2
@ -43,14 +43,14 @@ channelstream==0.7.1
pastedeploy==3.1.0
plaster==1.1.2
translationstring==1.4
venusian==3.0.0
webob==1.8.7
venusian==3.1.0
webob==1.8.9
zope.deprecation==5.0.0
zope.interface==7.0.3
zope.interface==7.1.1
pyramid-jinja2==2.10
jinja2==3.1.2
markupsafe==2.1.2
markupsafe==2.1.2
jinja2==3.1.4
markupsafe==3.0.2
markupsafe==3.0.2
pyramid==2.0.2
hupper==1.12
plaster==1.1.2
@ -58,18 +58,18 @@ channelstream==0.7.1
pastedeploy==3.1.0
plaster==1.1.2
translationstring==1.4
venusian==3.0.0
webob==1.8.7
venusian==3.1.0
webob==1.8.9
zope.deprecation==5.0.0
zope.interface==7.0.3
zope.interface==7.1.1
zope.deprecation==5.0.0
python-dateutil==2.8.2
python-dateutil==2.9.0.post0
six==1.16.0
requests==2.28.2
certifi==2022.12.7
charset-normalizer==3.1.0
idna==3.4
urllib3==1.26.14
requests==2.32.3
certifi==2024.8.30
charset-normalizer==3.4.0
idna==3.10
urllib3==1.26.20
ws4py==0.5.1
deform==2.0.15
chameleon==3.10.2
@ -87,13 +87,13 @@ dogpile.cache==1.3.3
pbr==5.11.1
formencode==2.1.0
six==1.16.0
fsspec==2024.9.0
fsspec==2024.10.0
gunicorn==23.0.0
packaging==24.1
gevent==24.2.1
greenlet==3.0.3
gevent==24.11.1
greenlet==3.1.1
zope.event==5.0.0
zope.interface==7.0.3
zope.interface==7.1.1
ipython==8.26.0
decorator==5.1.1
jedi==0.19.1
@ -102,7 +102,7 @@ ipython==8.26.0
traitlets==5.14.3
pexpect==4.9.0
ptyprocess==0.7.0
prompt_toolkit==3.0.47
prompt_toolkit==3.0.48
wcwidth==0.2.13
pygments==2.18.0
stack-data==0.6.3
@ -113,7 +113,7 @@ ipython==8.26.0
traitlets==5.14.3
typing_extensions==4.12.2
markdown==3.4.3
msgpack==1.0.8
msgpack==1.1.0
mysqlclient==2.1.1
nbconvert==7.7.3
beautifulsoup4==4.12.3
@ -122,23 +122,23 @@ nbconvert==7.7.3
six==1.16.0
webencodings==0.5.1
defusedxml==0.7.1
jinja2==3.1.2
markupsafe==2.1.2
jinja2==3.1.4
markupsafe==3.0.2
jupyter_core==5.3.1
platformdirs==3.10.0
traitlets==5.14.3
jupyterlab-pygments==0.2.2
markupsafe==2.1.2
markupsafe==3.0.2
mistune==2.0.5
nbclient==0.8.0
jupyter_client==8.3.0
jupyter_core==5.3.1
platformdirs==3.10.0
traitlets==5.14.3
python-dateutil==2.8.2
python-dateutil==2.9.0.post0
six==1.16.0
pyzmq==25.0.0
tornado==6.2
pyzmq==26.2.0
tornado==6.4.2
traitlets==5.14.3
jupyter_core==5.3.1
platformdirs==3.10.0
@ -146,7 +146,7 @@ nbconvert==7.7.3
nbformat==5.9.2
fastjsonschema==2.18.0
jsonschema==4.18.6
attrs==22.2.0
attrs==24.2.0
pyrsistent==0.19.3
jupyter_core==5.3.1
platformdirs==3.10.0
@ -156,7 +156,7 @@ nbconvert==7.7.3
nbformat==5.9.2
fastjsonschema==2.18.0
jsonschema==4.18.6
attrs==22.2.0
attrs==24.2.0
pyrsistent==0.19.3
jupyter_core==5.3.1
platformdirs==3.10.0
@ -174,20 +174,20 @@ premailer==3.10.0
cssselect==1.2.0
cssutils==2.6.0
lxml==5.3.0
requests==2.28.2
certifi==2022.12.7
charset-normalizer==3.1.0
idna==3.4
urllib3==1.26.14
requests==2.32.3
certifi==2024.8.30
charset-normalizer==3.4.0
idna==3.10
urllib3==1.26.20
psutil==5.9.8
psycopg2==2.9.9
psycopg2==2.9.10
py-bcrypt==0.4
pycmarkgfm==1.2.0
cffi==1.16.0
pycparser==2.21
pycryptodome==3.17
cffi==1.17.1
pycparser==2.22
pycryptodome==3.21.0
pycurl==7.45.3
pymysql==1.0.3
pymysql==1.1.1
pyotp==2.8.0
pyparsing==3.1.1
pyramid-mailer==0.15.1
@ -198,19 +198,19 @@ pyramid-mailer==0.15.1
pastedeploy==3.1.0
plaster==1.1.2
translationstring==1.4
venusian==3.0.0
webob==1.8.7
venusian==3.1.0
webob==1.8.9
zope.deprecation==5.0.0
zope.interface==7.0.3
zope.interface==7.1.1
repoze.sendmail==4.4.1
transaction==5.0.0
zope.interface==7.0.3
zope.interface==7.0.3
zope.interface==7.1.1
zope.interface==7.1.1
transaction==5.0.0
zope.interface==7.0.3
zope.interface==7.1.1
pyramid-mako==1.1.0
mako==1.2.4
markupsafe==2.1.2
mako==1.3.6
markupsafe==3.0.2
pyramid==2.0.2
hupper==1.12
plaster==1.1.2
@ -218,16 +218,15 @@ pyramid-mako==1.1.0
pastedeploy==3.1.0
plaster==1.1.2
translationstring==1.4
venusian==3.0.0
webob==1.8.7
venusian==3.1.0
webob==1.8.9
zope.deprecation==5.0.0
zope.interface==7.0.3
zope.interface==7.1.1
python-ldap==3.4.3
pyasn1==0.4.8
pyasn1-modules==0.2.8
pyasn1==0.4.8
python-memcached==1.59
six==1.16.0
python-memcached==1.62
python-pam==2.0.2
python3-saml==1.16.0
isodate==0.6.1
@ -236,60 +235,66 @@ python3-saml==1.16.0
xmlsec==1.3.14
lxml==5.3.0
pyyaml==6.0.1
redis==5.1.0
redis==5.2.0
async-timeout==4.0.3
regex==2022.10.31
routes==2.5.1
repoze.lru==0.7
six==1.16.0
s3fs==2024.9.0
aiobotocore==2.13.0
aiohttp==3.9.5
s3fs==2024.10.0
aiobotocore==2.15.2
aiohttp==3.11.4
aiohappyeyeballs==2.4.3
aiosignal==1.3.1
frozenlist==1.4.1
attrs==22.2.0
frozenlist==1.4.1
multidict==6.0.5
yarl==1.9.4
idna==3.4
multidict==6.0.5
aioitertools==0.11.0
botocore==1.34.106
frozenlist==1.5.0
attrs==24.2.0
frozenlist==1.5.0
multidict==6.1.0
propcache==0.2.0
yarl==1.17.2
idna==3.10
multidict==6.1.0
propcache==0.2.0
aioitertools==0.12.0
botocore==1.35.36
jmespath==1.0.1
python-dateutil==2.8.2
python-dateutil==2.9.0.post0
six==1.16.0
urllib3==1.26.14
urllib3==1.26.20
wrapt==1.16.0
aiohttp==3.9.5
aiohttp==3.11.4
aiohappyeyeballs==2.4.3
aiosignal==1.3.1
frozenlist==1.4.1
attrs==22.2.0
frozenlist==1.4.1
multidict==6.0.5
yarl==1.9.4
idna==3.4
multidict==6.0.5
fsspec==2024.9.0
frozenlist==1.5.0
attrs==24.2.0
frozenlist==1.5.0
multidict==6.1.0
propcache==0.2.0
yarl==1.17.2
idna==3.10
multidict==6.1.0
propcache==0.2.0
fsspec==2024.10.0
simplejson==3.19.2
sshpubkeys==3.3.1
cryptography==40.0.2
cffi==1.16.0
pycparser==2.21
ecdsa==0.18.0
cryptography==43.0.3
cffi==1.17.1
pycparser==2.22
ecdsa==0.19.0
six==1.16.0
sqlalchemy==1.4.52
greenlet==3.0.3
greenlet==3.1.1
typing_extensions==4.12.2
supervisor==4.2.5
tzlocal==4.3
pytz-deprecation-shim==0.1.0.post0
tzdata==2024.1
tzdata==2024.2
tempita==0.5.2
unidecode==1.3.6
unidecode==1.3.8
urlobject==2.4.3
waitress==3.0.0
waitress==3.0.1
webhelpers2==2.1
markupsafe==2.1.2
markupsafe==3.0.2
six==1.16.0
whoosh==2.7.4
zope.cachedescriptors==5.0.0

View file

@ -15,10 +15,8 @@ pyramid-debugtoolbar
flake8
ruff
pipdeptree==2.7.1
pipdeptree
invoke==2.0.0
bumpversion==0.6.0
bump2version==1.0.1
docutils-stubs
types-redis

View file

@ -1,3 +1,3 @@
## rhodecode-tools, special case, use file://PATH.tar.gz#egg=rhodecode-tools==X.Y.Z, to test local version
rhodecode-tools @ https://code.rhodecode.com/_file_store/download/0-36d03a63-36f7-47af-a33c-d81c39f88251.0.0.tar.gz#egg=rhodecode-tools
rhodecode-tools==3.0.0
rhodecode-tools @ https://code.rhodecode.com/_file_store/download/0-51fb13c9-6175-480c-b9dc-630c7601d47c.1.0.tar.gz#egg=rhodecode-tools
rhodecode-tools==4.1.0

View file

@ -1,47 +1,54 @@
# test related requirements
mock==5.1.0
pytest-cov==4.1.0
coverage==7.4.3
pytest==8.1.1
iniconfig==2.0.0
packaging==24.1
pluggy==1.4.0
pytest-env==1.1.3
pytest==8.1.1
iniconfig==2.0.0
packaging==24.1
pluggy==1.4.0
pytest-profiling==1.7.0
gprof2dot==2022.7.29
pytest==8.1.1
iniconfig==2.0.0
packaging==24.1
pluggy==1.4.0
six==1.16.0
pytest-rerunfailures==13.0
pytest==8.3.3
iniconfig==2.0.0
packaging==24.1
pytest==8.1.1
pluggy==1.5.0
pytest-cov==5.0.0
coverage==7.6.4
pytest==8.3.3
iniconfig==2.0.0
packaging==24.1
pluggy==1.4.0
pluggy==1.5.0
pytest-env==1.1.5
pytest==8.3.3
iniconfig==2.0.0
packaging==24.1
pluggy==1.5.0
pytest-profiling==1.7.0
gprof2dot==2024.6.6
pytest==8.3.3
iniconfig==2.0.0
packaging==24.1
pluggy==1.5.0
six==1.16.0
pytest-rerunfailures==14.0
packaging==24.1
pytest==8.3.3
iniconfig==2.0.0
packaging==24.1
pluggy==1.5.0
pytest-runner==6.0.1
pytest-sugar==1.0.0
packaging==24.1
pytest==8.1.1
pytest==8.3.3
iniconfig==2.0.0
packaging==24.1
pluggy==1.4.0
termcolor==2.4.0
pluggy==1.5.0
termcolor==2.5.0
pytest-timeout==2.3.1
pytest==8.1.1
pytest==8.3.3
iniconfig==2.0.0
packaging==24.1
pluggy==1.4.0
webtest==3.0.0
pluggy==1.5.0
webtest==3.0.1
beautifulsoup4==4.12.3
soupsieve==2.5
waitress==3.0.0
webob==1.8.7
waitress==3.0.1
webob==1.8.9
# RhodeCode test-data
rc_testdata @ https://code.rhodecode.com/upstream/rc-testdata-dist/raw/77378e9097f700b4c1b9391b56199fe63566b5c9/rc_testdata-0.11.0.tar.gz#egg=rc_testdata

View file

@ -1,4 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@ -45,13 +45,20 @@ CELERY_EAGER = False
# link to config for pyramid
CONFIG = {}
class NotGivenMeta:
def __repr__(self):
return 'NotGivenObject()'
__str__ = __repr__
NotGiven = NotGivenMeta()
class ConfigGet:
NotGiven = object()
def _get_val_or_missing(self, key, missing):
@classmethod
def _get_val_or_missing(cls, key, missing):
if key not in CONFIG:
if missing == self.NotGiven:
if missing != NotGiven:
return missing
# we don't get key, we don't get missing value, return nothing similar as config.get(key)
return None
@ -74,6 +81,12 @@ class ConfigGet:
val = self._get_val_or_missing(key, missing)
return str2bool(val)
def get_list(self, key, missing=NotGiven):
from rhodecode.lib.type_utils import aslist
val = self._get_val_or_missing(key, missing)
return aslist(val, sep=',')
# Populated with the settings dictionary from application init in
# rhodecode.conf.environment.load_pyramid_environment
PYRAMID_SETTINGS = {}

View file

@ -1,4 +1,4 @@
# Copyright (C) 2011-2023 RhodeCode GmbH
# Copyright (C) 2011-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,4 +1,4 @@
# Copyright (C) 2011-2023 RhodeCode GmbH
# Copyright (C) 2011-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,4 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,4 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This 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,12 +21,12 @@ import pytest
from rhodecode.model.meta import Session
from rhodecode.model.user import UserModel
from rhodecode.model.auth_token import AuthTokenModel
from rhodecode.tests import TEST_USER_ADMIN_LOGIN
@pytest.fixture(scope="class")
def testuser_api(request, baseapp):
cls = request.cls
from rhodecode.tests import TEST_USER_ADMIN_LOGIN
# ADMIN USER
cls.usr = UserModel().get_by_username(TEST_USER_ADMIN_LOGIN)

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,4 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,4 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -0,0 +1,44 @@
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This 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 <http://www.gnu.org/licenses/>.
#
# 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.model.scm import ScmModel
from rhodecode.api.tests.utils import (
build_data, api_call, assert_ok, assert_error, crash)
@pytest.mark.usefixtures("testuser_api", "app")
class TestCleanupRepos(object):
def test_api_cleanup_repos(self):
id_, params = build_data(self.apikey, 'cleanup_repos')
response = api_call(self.app, params)
expected = {'removed': [], 'errors': []}
assert_ok(id_, expected, given=response.body)
def test_api_cleanup_repos_error(self):
id_, params = build_data(self.apikey, 'cleanup_repos', )
with mock.patch('rhodecode.lib.utils.repo2db_cleanup', side_effect=crash):
response = api_call(self.app, params)
expected = 'Error occurred during repo storage cleanup action'
assert_error(id_, expected, given=response.body)

View file

@ -1,4 +1,4 @@
# Copyright (C) 2017-2023 RhodeCode GmbH
# Copyright (C) 2017-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,4 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,4 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This 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 +23,7 @@ from rhodecode.model.db import Gist
from rhodecode.model.gist import GistModel
from rhodecode.api.tests.utils import (
build_data, api_call, assert_error, assert_ok, crash)
from rhodecode.tests.fixture import Fixture
from rhodecode.tests.fixtures.rc_fixture import Fixture
@pytest.mark.usefixtures("testuser_api", "app")

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This 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,7 +26,7 @@ from rhodecode.model.user import UserModel
from rhodecode.tests import TEST_USER_ADMIN_LOGIN
from rhodecode.api.tests.utils import (
build_data, api_call, assert_ok, assert_error, crash)
from rhodecode.tests.fixture import Fixture
from rhodecode.tests.fixtures.rc_fixture import Fixture
from rhodecode.lib.ext_json import json
from rhodecode.lib.str_utils import safe_str

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This 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,7 +25,7 @@ from rhodecode.model.user import UserModel
from rhodecode.tests import TEST_USER_ADMIN_LOGIN
from rhodecode.api.tests.utils import (
build_data, api_call, assert_ok, assert_error, crash)
from rhodecode.tests.fixture import Fixture
from rhodecode.tests.fixtures.rc_fixture import Fixture
fixture = Fixture()

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This 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,7 +25,7 @@ from rhodecode.tests import (
TEST_USER_ADMIN_LOGIN, TEST_USER_REGULAR_EMAIL)
from rhodecode.api.tests.utils import (
build_data, api_call, assert_ok, assert_error, jsonify, crash)
from rhodecode.tests.fixture import Fixture
from rhodecode.tests.fixtures.rc_fixture import Fixture
from rhodecode.model.db import RepoGroup

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This 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,7 +24,7 @@ from rhodecode.model.user import UserModel
from rhodecode.model.user_group import UserGroupModel
from rhodecode.api.tests.utils import (
build_data, api_call, assert_error, assert_ok, crash, jsonify)
from rhodecode.tests.fixture import Fixture
from rhodecode.tests.fixtures.rc_fixture import Fixture
@pytest.mark.usefixtures("testuser_api", "app")

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@ -28,7 +27,7 @@ from rhodecode.model.user import UserModel
from rhodecode.tests import TEST_USER_ADMIN_LOGIN
from rhodecode.api.tests.utils import (
build_data, api_call, assert_error, assert_ok, crash)
from rhodecode.tests.fixture import Fixture
from rhodecode.tests.fixtures.rc_fixture import Fixture
fixture = Fixture()

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This 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,6 +19,7 @@
import pytest
from rhodecode.lib.str_utils import safe_str
from rhodecode.model.db import User, ChangesetComment
from rhodecode.model.meta import Session
from rhodecode.model.comment import CommentsModel
@ -37,7 +37,7 @@ def make_repo_comments_factory(request):
commit = repo.scm_instance()[0]
commit_id = commit.raw_id
file_0 = commit.affected_files[0]
file_0 = safe_str(commit.affected_files[0])
comments = []
# general

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This 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 +19,6 @@
import mock
import pytest
from rhodecode.model.scm import ScmModel
from rhodecode.api.tests.utils import (
build_data, api_call, assert_ok, assert_error, crash)
@ -31,13 +29,14 @@ class TestRescanRepos(object):
id_, params = build_data(self.apikey, 'rescan_repos')
response = api_call(self.app, params)
expected = {'added': [], 'removed': []}
expected = {'added': [], 'errors': []}
assert_ok(id_, expected, given=response.body)
@mock.patch.object(ScmModel, 'repo_scan', crash)
def test_api_rescann_error(self):
def test_api_rescan_repos_error(self):
id_, params = build_data(self.apikey, 'rescan_repos', )
response = api_call(self.app, params)
with mock.patch('rhodecode.lib.utils.repo2db_mapper', side_effect=crash):
response = api_call(self.app, params)
expected = 'Error occurred during rescan repositories action'
assert_error(id_, expected, given=response.body)

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This 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,8 +24,8 @@ from rhodecode.model.scm import ScmModel
from rhodecode.tests import TEST_USER_ADMIN_LOGIN, TEST_USER_REGULAR_LOGIN
from rhodecode.api.tests.utils import (
build_data, api_call, assert_error, assert_ok, crash, jsonify)
from rhodecode.tests.fixture import Fixture
from rhodecode.tests.fixture_mods.fixture_utils import plain_http_host_only_stub
from rhodecode.tests.fixtures.rc_fixture import Fixture
from rhodecode.tests.fixtures.fixture_utils import plain_http_host_only_stub
fixture = Fixture()

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,5 +1,4 @@
# Copyright (C) 2010-2023 RhodeCode GmbH
# Copyright (C) 2010-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,4 +1,4 @@
# Copyright (C) 2014-2023 RhodeCode GmbH
# Copyright (C) 2014-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,4 +1,4 @@
# Copyright (C) 2015-2023 RhodeCode GmbH
# Copyright (C) 2015-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,4 +1,4 @@
# Copyright (C) 2011-2023 RhodeCode GmbH
# Copyright (C) 2011-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,4 +1,4 @@
# Copyright (C) 2011-2023 RhodeCode GmbH
# Copyright (C) 2011-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,4 +1,4 @@
# Copyright (C) 2011-2023 RhodeCode GmbH
# Copyright (C) 2011-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3

View file

@ -1,4 +1,4 @@
# Copyright (C) 2011-2023 RhodeCode GmbH
# Copyright (C) 2011-2024 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
@ -317,8 +317,7 @@ def get_repo_changeset(request, apiuser, repoid, revision,
','.join(_changes_details_types)))
vcs_repo = repo.scm_instance()
pre_load = ['author', 'branch', 'date', 'message', 'parents',
'status', '_commit', '_file_paths']
pre_load = ['author', 'branch', 'date', 'message', 'parents', 'status', '_commit']
try:
commit = repo.get_commit(commit_id=revision, pre_load=pre_load)
@ -376,8 +375,7 @@ def get_repo_changesets(request, apiuser, repoid, start_rev, limit,
','.join(_changes_details_types)))
limit = int(limit)
pre_load = ['author', 'branch', 'date', 'message', 'parents',
'status', '_commit', '_file_paths']
pre_load = ['author', 'branch', 'date', 'message', 'parents', 'status', '_commit']
vcs_repo = repo.scm_instance()
# SVN needs a special case to distinguish its index and commit id

Some files were not shown because too many files have changed in this diff Show more