# HG changeset patch # User Mads Kiilerich # Date 1684091978 -7200 # Node ID 439bc130e0932250b47fc356d7d270e1e99d9447 # Parent 3fff648ffdd4a69284efa28c7d1d88024427760f# Parent 36a36ebdf4bbc4da77c41cabdbdf4a688e8fbeea Merge from stable diff -r 3fff648ffdd4 -r 439bc130e093 CONTRIBUTORS --- a/CONTRIBUTORS Tue Feb 14 15:22:17 2023 +0100 +++ b/CONTRIBUTORS Sun May 14 21:19:38 2023 +0200 @@ -1,9 +1,11 @@ List of contributors to Kallithea project: - Mads Kiilerich 2016-2022 + Mads Kiilerich 2016-2023 + Manuel Jacob 2019-2020 2022-2023 + Mathias De Mare 2023 Asterios Dimitriou 2016-2017 2020 2022 - Manuel Jacob 2019-2020 2022 Jaime Marquínez Ferrándiz 2022 + Louis Bertrand 2022 toras9000 2022 yzqzss 2022 МАН69К 2022 diff -r 3fff648ffdd4 -r 439bc130e093 Jenkinsfile --- a/Jenkinsfile Tue Feb 14 15:22:17 2023 +0100 +++ b/Jenkinsfile Sun May 14 21:19:38 2023 +0200 @@ -28,7 +28,7 @@ def virtualenvscript = """$createvirtualenv $activatevirtualenv python -m pip install --upgrade pip - pip install --upgrade setuptools + pip install --upgrade "setuptools<67" pip install --upgrade pylint pip install --upgrade pytest-cov """ diff -r 3fff648ffdd4 -r 439bc130e093 docs/api/api.rst --- a/docs/api/api.rst Tue Feb 14 15:22:17 2023 +0100 +++ b/docs/api/api.rst Sun May 14 21:19:38 2023 +0200 @@ -23,7 +23,7 @@ Clients must send JSON encoded JSON-RPC requests:: { - "id: "", + "id": "", "api_key": "", "method": "", "args": {"": ""} @@ -489,7 +489,7 @@ add_user_to_user_group ^^^^^^^^^^^^^^^^^^^^^^ -Adds a user to a user group. If the user already is in that group, success will be +Add a user to a user group. If the user already is in that group, success will be ``false``. This command can only be executed using the api_key of a user with admin rights. @@ -540,6 +540,167 @@ } error : null +get_repo_group +^^^^^^^^^^^^^^ + +Get an existing repository group. +This command can only be executed using the api_key of a user with admin rights. + +INPUT:: + + id : + api_key : "" + method : "get_repo_group" + args : { + "repogroupid" : "" + } + +OUTPUT:: + + id : + result : + { + "group_id" : "", + "group_name" : "", + "group_description" : "", + "parent_group" : ""|null, + "repositories" : "", + "owner" : "", + "members" : [ + { + "name" : "", + "type" : "user", + "permission" : "group.(none|read|write|admin)" + }, + { + "name" : "", + "type" : "user_group", + "permission" : "group.(none|read|write|admin)" + }, + … + ] + + }, + error : null + +get_repo_groups +^^^^^^^^^^^^^^^ + +List all existing repository groups. +This command can only be executed using the api_key of a user with admin rights. + +INPUT:: + + id : + api_key : "" + method : "get_repo_groups" + args : { } + +OUTPUT:: + + id : + result : [ + { + "group_id" : "", + "group_name" : "", + "group_description" : "", + "parent_group" : ""|null, + "repositories" : "", + "owner" : "" + }, + … + ] + error : null + +create_repo_group +^^^^^^^^^^^^^^^^^ + +Create a new repository group. +This command can only be executed using the api_key of a user with admin rights. + +INPUT:: + + id : + api_key : "" + method : "create_repo_group" + args : { + "group_name" : "", + "description" : " = Optional("")", + "owner" : " = Optional(None)", + "parent" : " = Optional(None)", + "copy_permissions" : " = Optional(False)" + } + +OUTPUT:: + + id : + result : { + "msg" : "created new repo group ``", + "repo_group" : { + "group_id" : , + "group_name" : "/", + "group_description" : "", + "parent_group" : |null, + "repositories" : , + "owner" : "" + } + +update_repo_group +^^^^^^^^^^^^^^^^^ + +Update a repository group. +This command can only be executed using the api_key of a user with admin rights. + +INPUT:: + + id : + api_key : "" + method : "update_repo_group" + args : { + "repogroupid" : "", + "group_name" : " = Optional(None)", + "description" : " = Optional(None)", + "owner" : " = Optional(None)", + "parent" : " = Optional(None)" + } + +OUTPUT:: + + id : + result : { + "msg" : "updated repository group ID: ", + "repo_group" : { + "group_id" : , + "group_name" : "/", + "group_description" : "", + "parent_group" : |null, + "repositories" : , + "owner" : "" + } + +delete_repo_group +^^^^^^^^^^^^^^^^^ + +Delete a repository group. +This command can only be executed using the api_key of a user with admin rights. + +INPUT:: + + id : + api_key : "" + method : "delete_repo_group" + args : { + "repogroupid" : "" + } + +OUTPUT:: + + id : + result : { + "msg" : "deleted repo group ID: ", + "repo_group" : null + } + get_repo ^^^^^^^^ diff -r 3fff648ffdd4 -r 439bc130e093 docs/conf.py --- a/docs/conf.py Tue Feb 14 15:22:17 2023 +0100 +++ b/docs/conf.py Sun May 14 21:19:38 2023 +0200 @@ -47,7 +47,7 @@ # General information about the project. project = 'Kallithea' -copyright = '2010-2022 by various authors, licensed as GPLv3.' +copyright = '2010-2023 by various authors, licensed as GPLv3.' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the diff -r 3fff648ffdd4 -r 439bc130e093 docs/contributing.rst --- a/docs/contributing.rst Tue Feb 14 15:22:17 2023 +0100 +++ b/docs/contributing.rst Sun May 14 21:19:38 2023 +0200 @@ -33,7 +33,7 @@ cd kallithea python3 -m venv venv . venv/bin/activate - pip install --upgrade pip setuptools + pip install --upgrade pip "setuptools<67" pip install --upgrade -e . -r dev_requirements.txt python-ldap python-pam kallithea-cli config-create my.ini kallithea-cli db-create -c my.ini --user=user --email=user@example.com --password=password --repos=/tmp diff -r 3fff648ffdd4 -r 439bc130e093 docs/installation.rst --- a/docs/installation.rst Tue Feb 14 15:22:17 2023 +0100 +++ b/docs/installation.rst Sun May 14 21:19:38 2023 +0200 @@ -55,7 +55,7 @@ cd kallithea python3 -m venv venv . venv/bin/activate - pip install --upgrade pip setuptools + pip install --upgrade pip "setuptools<67" pip install --upgrade -e . python3 setup.py compile_catalog # for translation of the UI @@ -98,7 +98,7 @@ bash shell:: . /srv/kallithea/venv/bin/activate - pip install --upgrade pip setuptools + pip install --upgrade pip "setuptools<67" .. note:: You can't use UNIX ``sudo`` to source the ``activate`` script; it will "activate" a shell that terminates immediately. diff -r 3fff648ffdd4 -r 439bc130e093 docs/installation_win.rst --- a/docs/installation_win.rst Tue Feb 14 15:22:17 2023 +0100 +++ b/docs/installation_win.rst Sun May 14 21:19:38 2023 +0200 @@ -104,7 +104,7 @@ cd C:\Kallithea\Env\Scripts activate - pip install --upgrade pip setuptools + pip install --upgrade pip "setuptools<67" The prompt will change into "(Env) C:\\Kallithea\\Env\\Scripts" or similar (depending of your folder structure). Then type:: diff -r 3fff648ffdd4 -r 439bc130e093 docs/installation_win_old.rst --- a/docs/installation_win_old.rst Tue Feb 14 15:22:17 2023 +0100 +++ b/docs/installation_win_old.rst Sun May 14 21:19:38 2023 +0200 @@ -170,7 +170,7 @@ cd C:\Kallithea\Env\Scripts (or similar) activate - pip install --upgrade pip setuptools + pip install --upgrade pip "setuptools<67" The prompt will change into "(Env) C:\\Kallithea\\Env\\Scripts" or similar (depending of your folder structure). Then type:: diff -r 3fff648ffdd4 -r 439bc130e093 kallithea/config/app_cfg.py --- a/kallithea/config/app_cfg.py Tue Feb 14 15:22:17 2023 +0100 +++ b/kallithea/config/app_cfg.py Sun May 14 21:19:38 2023 +0200 @@ -78,6 +78,10 @@ # Set the default i18n source language so TG doesn't search beyond 'en' in Accept-Language. 'i18n.lang': 'en', + + # For TurboGears 2.4.3, define the native language for translations to + # prevent fall-through to languages requested with lower priority. + 'i18n.native': ['en', 'en_US', 'en_GB'], }) # DebugBar, a debug toolbar for TurboGears2. diff -r 3fff648ffdd4 -r 439bc130e093 kallithea/controllers/admin/repo_groups.py --- a/kallithea/controllers/admin/repo_groups.py Tue Feb 14 15:22:17 2023 +0100 +++ b/kallithea/controllers/admin/repo_groups.py Sun May 14 21:19:38 2023 +0200 @@ -90,13 +90,6 @@ return data - def _revoke_perms_on_yourself(self, form_result): - _up = [u for u in form_result['perms_updates'] if request.authuser.username == u[0]] - _new = [u for u in form_result['perms_new'] if request.authuser.username == u[0]] - if _new and _new[0][1] != 'group.admin' or _up and _up[0][1] != 'group.admin': - return True - return False - def index(self, format='html'): _list = db.RepoGroup.query(sorted=True).all() group_iter = RepoGroupList(_list, perm_level='admin') @@ -349,11 +342,6 @@ c.repo_group = db.RepoGroup.guess_instance(group_name) valid_recursive_choices = ['none', 'repos', 'groups', 'all'] form_result = RepoGroupPermsForm(valid_recursive_choices)().to_python(request.POST) - if not request.authuser.is_admin: - if self._revoke_perms_on_yourself(form_result): - msg = _('Cannot revoke permission for yourself as admin') - webutils.flash(msg, category='warning') - raise HTTPFound(location=url('edit_repo_group_perms', group_name=group_name)) recursive = form_result['recursive'] # iterate over all members(if in recursive mode) of this groups and # set the permissions ! @@ -379,11 +367,6 @@ elif obj_type == 'user_group': obj_id = safe_int(request.POST.get('user_group_id')) - if not request.authuser.is_admin: - if obj_type == 'user' and request.authuser.user_id == obj_id: - msg = _('Cannot revoke permission for yourself as admin') - webutils.flash(msg, category='warning') - raise Exception('revoke admin permission on self') recursive = request.POST.get('recursive', 'none') if obj_type == 'user': RepoGroupModel().delete_permission(repo_group=group_name, diff -r 3fff648ffdd4 -r 439bc130e093 kallithea/controllers/api/api.py --- a/kallithea/controllers/api/api.py Tue Feb 14 15:22:17 2023 +0100 +++ b/kallithea/controllers/api/api.py Sun May 14 21:19:38 2023 +0200 @@ -65,8 +65,6 @@ def get_user_or_error(userid): """ Get user by id or name or return JsonRPCError if not found - - :param userid: """ user = UserModel().get_user(userid) if user is None: @@ -77,8 +75,6 @@ def get_repo_or_error(repoid): """ Get repo by id or name or return JsonRPCError if not found - - :param repoid: """ repo = RepoModel().get_repo(repoid) if repo is None: @@ -89,8 +85,6 @@ def get_repo_group_or_error(repogroupid): """ Get repo group by id or name or return JsonRPCError if not found - - :param repogroupid: """ repo_group = db.RepoGroup.guess_instance(repogroupid) if repo_group is None: @@ -102,8 +96,6 @@ def get_user_group_or_error(usergroupid): """ Get user group by id or name or return JsonRPCError if not found - - :param usergroupid: """ user_group = UserGroupModel().get_group(usergroupid) if user_group is None: @@ -114,8 +106,6 @@ def get_perm_or_error(permid, prefix=None): """ Get permission by id or name or return JsonRPCError if not found - - :param permid: """ perm = db.Permission.get_by_key(permid) if perm is None: @@ -130,8 +120,6 @@ def get_gist_or_error(gistid): """ Get gist by id or gist_access_id or return JsonRPCError if not found - - :param gistid: """ gist = GistModel().get_gist(gistid) if gist is None: @@ -165,11 +153,6 @@ automatically keep remote repos up to date. This command can be executed only using api_key belonging to user with admin rights - :param repoid: repository name or repository id - :type repoid: str or int - :param clone_uri: repository URI to pull from (optional) - :type clone_uri: str - OUTPUT:: id : @@ -178,14 +161,6 @@ "repository" : "" } error : null - - ERROR OUTPUT:: - - id : - result : null - error : { - "Unable to pull changes from ``" - } """ repo = get_repo_or_error(repoid) @@ -212,10 +187,6 @@ aka "clean zombies". This command can be executed only using api_key belonging to user with admin rights. - :param remove_obsolete: deletes repositories from - database that are not found on the filesystem - :type remove_obsolete: Optional(bool) - OUTPUT:: id : @@ -224,14 +195,6 @@ 'removed': [,...] } error : null - - ERROR OUTPUT:: - - id : - result : null - error : { - 'Error occurred during rescan repositories action' - } """ try: rm_obsolete = remove_obsolete @@ -250,9 +213,6 @@ This command can be executed only using api_key belonging to user with admin rights or regular user that have write or admin or write access to repository. - :param repoid: repository name or repository id - :type repoid: str or int - OUTPUT:: id : @@ -261,14 +221,6 @@ 'repository': } error : null - - ERROR OUTPUT:: - - id : - result : null - error : { - 'Error occurred during cache invalidation action' - } """ repo = get_repo_or_error(repoid) if not HasPermissionAny('hg.admin')(): @@ -296,9 +248,6 @@ This command can be executed only using api_key belonging to user with admin rights. - :param userid: username to show ips for - :type userid: Optional(str or int) - OUTPUT:: id : @@ -354,9 +303,6 @@ belonging to user with admin rights, or regular users that cannot specify different userid than theirs - :param userid: user to get data for - :type userid: Optional(str or int) - OUTPUT:: id : @@ -426,25 +372,6 @@ Creates new user. Returns new user object. This command can be executed only using api_key belonging to user with admin rights. - :param username: new username - :type username: str or int - :param email: email - :type email: str - :param password: password - :type password: Optional(str) - :param firstname: firstname - :type firstname: str - :param lastname: lastname - :type lastname: str - :param active: active - :type active: Optional(bool) - :param admin: admin - :type admin: Optional(bool) - :param extern_name: name of extern - :type extern_name: Optional(str) - :param extern_type: extern_type - :type extern_type: Optional(str) - OUTPUT:: id : @@ -453,18 +380,6 @@ "user" : } error : null - - ERROR OUTPUT:: - - id : - result : null - error : { - "user `` already exist" - or - "email `` already exist" - or - "failed to create user ``" - } """ if db.User.get_by_username(username): raise JSONRPCError("user `%s` already exist" % (username,)) @@ -503,27 +418,6 @@ updates given user if such user exists. This command can be executed only using api_key belonging to user with admin rights. - :param userid: userid to update - :type userid: str or int - :param username: new username - :type username: Optional(str or int) - :param email: email - :type email: Optional(str) - :param password: password - :type password: Optional(str) - :param firstname: firstname - :type firstname: Optional(str) - :param lastname: lastname - :type lastname: Optional(str) - :param active: active - :type active: Optional(bool) - :param admin: admin - :type admin: Optional(bool) - :param extern_name: - :type extern_name: Optional(str) - :param extern_type: - :type extern_type: Optional(str) - OUTPUT:: id : @@ -532,14 +426,6 @@ "user" : } error : null - - ERROR OUTPUT:: - - id : - result : null - error : { - "failed to update user ``" - } """ user = get_user_or_error(userid) @@ -577,9 +463,6 @@ deletes given user if such user exists. This command can be executed only using api_key belonging to user with admin rights. - :param userid: user to delete - :type userid: str or int - OUTPUT:: id : @@ -588,14 +471,6 @@ "user" : null } error : null - - ERROR OUTPUT:: - - id : - result : null - error : { - "failed to delete user ID: " - } """ user = get_user_or_error(userid) @@ -619,9 +494,6 @@ belonging to user with admin rights or user who has at least read access to user group. - :param usergroupid: id of user_group to edit - :type usergroupid: str or int - OUTPUT:: id : @@ -670,15 +542,6 @@ belonging to user with admin rights or an user who has create user group permission - :param group_name: name of new user group - :type group_name: str - :param description: group description - :type description: Optional(str) - :param owner: owner of group. If not passed apiuser is the owner - :type owner: Optional(str or int) - :param active: group is active - :type active: Optional(bool) - OUTPUT:: id : @@ -687,16 +550,6 @@ "user_group" : } error : null - - ERROR OUTPUT:: - - id : - result : null - error : { - "user group `` already exist" - or - "failed to create group ``" - } """ if UserGroupModel().get_by_name(group_name): raise JSONRPCError("user group `%s` already exist" % (group_name,)) @@ -725,17 +578,6 @@ Updates given usergroup. This command can be executed only using api_key belonging to user with admin rights or an admin of given user group - :param usergroupid: id of user group to update - :type usergroupid: str or int - :param group_name: name of new user group - :type group_name: str - :param description: group description - :type description: str - :param owner: owner of group. - :type owner: Optional(str or int) - :param active: group is active - :type active: Optional(bool) - OUTPUT:: id : @@ -744,14 +586,6 @@ "user_group" : } error : null - - ERROR OUTPUT:: - - id : - result : null - error : { - "failed to update user group ``" - } """ user_group = get_user_group_or_error(usergroupid) if not HasPermissionAny('hg.admin')(): @@ -785,9 +619,6 @@ This command can be executed only using api_key belonging to user with admin rights or an admin of given user group - :param usergroupid: - :type usergroupid: str or int - OUTPUT:: id : @@ -795,16 +626,6 @@ "msg" : "deleted user group ID: " } error : null - - ERROR OUTPUT:: - - id : - result : null - error : { - "failed to delete user group ID: " - or - "RepoGroup assigned to " - } """ user_group = get_user_group_or_error(usergroupid) if not HasPermissionAny('hg.admin')(): @@ -836,11 +657,6 @@ `false`. This command can be executed only using api_key belonging to user with admin rights or an admin of a given user group - :param usergroupid: - :type usergroupid: str or int - :param userid: - :type userid: str or int - OUTPUT:: id : @@ -850,14 +666,6 @@ User is already in that group" } error : null - - ERROR OUTPUT:: - - id : - result : null - error : { - "failed to add member to user group ``" - } """ user = get_user_or_error(userid) user_group = get_user_group_or_error(usergroupid) @@ -893,9 +701,6 @@ be `false`. This command can be executed only using api_key belonging to user with admin rights or an admin of given user group - :param usergroupid: - :param userid: - OUTPUT:: id : @@ -938,9 +743,6 @@ executed only using api_key belonging to user with admin rights or regular user that have at least read access to repository. - :param repoid: repository name or repository id - :type repoid: str or int - OUTPUT:: id : @@ -1082,15 +884,6 @@ `dirs`. This command can be executed only using api_key belonging to user with admin rights or regular user that have at least read access to repository. - :param repoid: repository name or repository id - :type repoid: str or int - :param revision: revision for which listing should be done - :type revision: str - :param root_path: path from which start displaying - :type root_path: str - :param ret_type: return type 'all|files|dirs' nodes - :type ret_type: Optional(str) - OUTPUT:: id : @@ -1144,28 +937,6 @@ belonging to user with admin rights or regular user that have create repository permission. Regular users cannot specify owner parameter - :param repo_name: repository name - :type repo_name: str - :param owner: user_id or username - :type owner: Optional(str) - :param repo_type: 'hg' or 'git' - :type repo_type: Optional(str) - :param description: repository description - :type description: Optional(str) - :param private: - :type private: bool - :param clone_uri: - :type clone_uri: str - :param landing_rev: : - :type landing_rev: str - :param enable_downloads: - :type enable_downloads: bool - :param enable_statistics: - :type enable_statistics: bool - :param copy_permissions: Copy permission from group that repository is - being created. - :type copy_permissions: bool - OUTPUT:: id : @@ -1174,14 +945,6 @@ "success" : true } error : null - - ERROR OUTPUT:: - - id : - result : null - error : { - 'failed to create repository `` - } """ group_name = None repo_name_parts = repo_name.split('/') @@ -1257,18 +1020,6 @@ enable_downloads=None): """ Updates repo - - :param repoid: repository name or repository id - :type repoid: str or int - :param name: - :param owner: - :param group: - :param description: - :param private: - :param clone_uri: - :param landing_rev: - :param enable_statistics: - :param enable_downloads: """ repo = get_repo_or_error(repoid) if not HasPermissionAny('hg.admin')(): @@ -1328,15 +1079,6 @@ user with admin rights or regular user that have fork permission, and at least read access to forking repository. Regular users cannot specify owner parameter. - :param repoid: repository name or repository id - :type repoid: str or int - :param fork_name: - :param owner: - :param description: - :param copy_permissions: - :param private: - :param landing_rev: - INPUT:: id : @@ -1434,11 +1176,6 @@ When `forks` param is set it's possible to detach or delete forks of deleting repository - :param repoid: repository name or repository id - :type repoid: str or int - :param forks: `detach` or `delete`, what do do with attached forks for repo - :type forks: Optional(str) - OUTPUT:: id : @@ -1487,12 +1224,6 @@ if found. This command can be executed only using api_key belonging to user with admin rights. - :param repoid: repository name or repository id - :type repoid: str or int - :param userid: - :param perm: (repository.(none|read|write|admin)) - :type perm: str - OUTPUT:: id : @@ -1531,10 +1262,6 @@ Revoke permission for user on given repository. This command can be executed only using api_key belonging to user with admin rights. - :param repoid: repository name or repository id - :type repoid: str or int - :param userid: - OUTPUT:: id : @@ -1570,13 +1297,6 @@ existing one if found. This command can be executed only using api_key belonging to user with admin rights. - :param repoid: repository name or repository id - :type repoid: str or int - :param usergroupid: id of usergroup - :type usergroupid: str or int - :param perm: (repository.(none|read|write|admin)) - :type perm: str - OUTPUT:: id : @@ -1585,14 +1305,6 @@ "success" : true } error : null - - ERROR OUTPUT:: - - id : - result : null - error : { - "failed to edit permission for user group: `` in repo ``' - } """ repo = get_repo_or_error(repoid) perm = get_perm_or_error(perm) @@ -1632,10 +1344,6 @@ Revoke permission for user group on given repository. This command can be executed only using api_key belonging to user with admin rights. - :param repoid: repository name or repository id - :type repoid: str or int - :param usergroupid: - OUTPUT:: id : @@ -1679,9 +1387,6 @@ """ Returns given repo group together with permissions, and repositories inside the group - - :param repogroupid: id/name of repository group - :type repogroupid: str or int """ repo_group = get_repo_group_or_error(repogroupid) @@ -1729,17 +1434,6 @@ Creates a repository group. This command can be executed only using api_key belonging to user with admin rights. - :param group_name: - :type group_name: - :param description: - :type description: - :param owner: - :type owner: - :param parent: - :type parent: - :param copy_permissions: - :type copy_permissions: - OUTPUT:: id : @@ -1748,14 +1442,6 @@ "repo_group" : } error : null - - ERROR OUTPUT:: - - id : - result : null - error : { - failed to create repo group `` - } """ if db.RepoGroup.get_by_group_name(group_name): raise JSONRPCError("repo group `%s` already exist" % (group_name,)) @@ -1790,6 +1476,9 @@ description=None, owner=None, parent=None): + """ + TODO + """ repo_group = get_repo_group_or_error(repogroupid) parent_repo_group_id = None if parent is None else get_repo_group_or_error(parent).group_id @@ -1814,9 +1503,6 @@ @HasPermissionAnyDecorator('hg.admin') def delete_repo_group(self, repogroupid): """ - :param repogroupid: name or id of repository group - :type repogroupid: str or int - OUTPUT:: id : @@ -1825,14 +1511,6 @@ 'repo_group' : null } error : null - - ERROR OUTPUT:: - - id : - result : null - error : { - "failed to delete repo group ID: " - } """ repo_group = get_repo_group_or_error(repogroupid) @@ -1859,14 +1537,6 @@ to user with admin rights, or user who has admin right to given repository group. - :param repogroupid: name or id of repository group - :type repogroupid: str or int - :param userid: - :param perm: (group.(none|read|write|admin)) - :type perm: str - :param apply_to_children: 'none', 'repos', 'groups', 'all' - :type apply_to_children: str - OUTPUT:: id : @@ -1875,14 +1545,6 @@ "success" : true } error : null - - ERROR OUTPUT:: - - id : - result : null - error : { - "failed to edit permission for user: `` in repo group: ``" - } """ repo_group = get_repo_group_or_error(repogroupid) @@ -1920,13 +1582,6 @@ be executed only using api_key belonging to user with admin rights, or user who has admin right to given repository group. - :param repogroupid: name or id of repository group - :type repogroupid: str or int - :param userid: - :type userid: - :param apply_to_children: 'none', 'repos', 'groups', 'all' - :type apply_to_children: str - OUTPUT:: id : @@ -1935,14 +1590,6 @@ "success" : true } error : null - - ERROR OUTPUT:: - - id : - result : null - error : { - "failed to edit permission for user: `` in repo group: ``" - } """ repo_group = get_repo_group_or_error(repogroupid) @@ -1981,15 +1628,6 @@ api_key belonging to user with admin rights, or user who has admin right to given repository group. - :param repogroupid: name or id of repository group - :type repogroupid: str or int - :param usergroupid: id of usergroup - :type usergroupid: str or int - :param perm: (group.(none|read|write|admin)) - :type perm: str - :param apply_to_children: 'none', 'repos', 'groups', 'all' - :type apply_to_children: str - OUTPUT:: id : @@ -1998,14 +1636,6 @@ "success" : true } error : null - - ERROR OUTPUT:: - - id : - result : null - error : { - "failed to edit permission for user group: `` in repo group: ``" - } """ repo_group = get_repo_group_or_error(repogroupid) perm = get_perm_or_error(perm, prefix='group.') @@ -2051,12 +1681,6 @@ executed only using api_key belonging to user with admin rights, or user who has admin right to given repository group. - :param repogroupid: name or id of repository group - :type repogroupid: str or int - :param usergroupid: - :param apply_to_children: 'none', 'repos', 'groups', 'all' - :type apply_to_children: str - OUTPUT:: id : @@ -2065,14 +1689,6 @@ "success" : true } error : null - - ERROR OUTPUT:: - - id : - result : null - error : { - "failed to edit permission for user group: `` in repo group: ``" - } """ repo_group = get_repo_group_or_error(repogroupid) user_group = get_user_group_or_error(usergroupid) @@ -2108,9 +1724,6 @@ def get_gist(self, gistid): """ Get given gist by id - - :param gistid: id of private or public gist - :type gistid: str """ gist = get_gist_or_error(gistid) if not HasPermissionAny('hg.admin')(): @@ -2122,9 +1735,6 @@ """ Get all gists for given user. If userid is empty returned gists are for user who called the api - - :param userid: user to get gists for - :type userid: Optional(str or int) """ if not HasPermissionAny('hg.admin')(): # make sure normal user does not pass someone else userid, @@ -2153,19 +1763,6 @@ """ Creates new Gist - :param files: files to be added to gist - {'filename': {'content':'...', 'lexer': null}, - 'filename2': {'content':'...', 'lexer': null}} - :type files: dict - :param owner: gist owner, defaults to api method caller - :type owner: Optional(str or int) - :param gist_type: type of gist 'public' or 'private' - :type gist_type: Optional(str) - :param lifetime: time in minutes of gist lifetime - :type lifetime: Optional(int) - :param description: gist description - :type description: str - OUTPUT:: id : @@ -2174,14 +1771,6 @@ "gist" : } error : null - - ERROR OUTPUT:: - - id : - result : null - error : { - "failed to create gist" - } """ try: if owner is None: @@ -2209,9 +1798,6 @@ """ Deletes existing gist - :param gistid: id of gist to delete - :type gistid: str - OUTPUT:: id : @@ -2220,14 +1806,6 @@ "gist" : null } error : null - - ERROR OUTPUT:: - - id : - result : null - error : { - "failed to delete gist ID:" - } """ gist = get_gist_or_error(gistid) if not HasPermissionAny('hg.admin')(): @@ -2249,6 +1827,9 @@ # permission check inside def get_changesets(self, repoid, start=None, end=None, start_date=None, end_date=None, branch_name=None, reverse=False, with_file_list=False, max_revisions=None): + """ + TODO + """ repo = get_repo_or_error(repoid) if not HasRepoPermissionLevel('read')(repo.repo_name): raise JSONRPCError('Access denied to repo %s' % repo.repo_name) @@ -2266,7 +1847,10 @@ raise JSONRPCError('Repository is empty') # permission check inside - def get_changeset(self, repoid, raw_id, with_reviews=False): + def get_changeset(self, repoid, raw_id, with_reviews=False, with_comments=False, with_inline_comments=False): + """ + TODO + """ repo = get_repo_or_error(repoid) if not HasRepoPermissionLevel('read')(repo.repo_name): raise JSONRPCError('Access denied to repo %s' % repo.repo_name) @@ -2278,9 +1862,19 @@ if with_reviews: reviews = ChangesetStatusModel().get_statuses( - repo.repo_name, raw_id) + repo.repo_name, changeset.raw_id) info["reviews"] = reviews + if with_comments: + comments = ChangesetCommentsModel().get_comments( + repo.repo_id, changeset.raw_id) + info["comments"] = comments + + if with_inline_comments: + inline_comments = ChangesetCommentsModel().get_inline_comments( + repo.repo_id, changeset.raw_id) + info["inline_comments"] = inline_comments + return info # permission check inside diff -r 3fff648ffdd4 -r 439bc130e093 kallithea/controllers/pullrequests.py --- a/kallithea/controllers/pullrequests.py Tue Feb 14 15:22:17 2023 +0100 +++ b/kallithea/controllers/pullrequests.py Sun May 14 21:19:38 2023 +0200 @@ -35,6 +35,7 @@ from tg.i18n import ugettext as _ from webob.exc import HTTPBadRequest, HTTPForbidden, HTTPFound, HTTPNotFound +import kallithea import kallithea.lib.helpers as h from kallithea.controllers import base from kallithea.controllers.changeset import create_cs_pr_comment, delete_cs_pr_comment @@ -494,6 +495,8 @@ except IndexError: # probably because c.cs_ranges is empty, probably because revisions are missing pass + rev_limit = safe_int(kallithea.CONFIG.get('next_iteration_rev_limit'), 0) + avail_revs = set() avail_show = [] c.cs_branch_name = c.cs_ref_name @@ -563,6 +566,14 @@ except ChangesetDoesNotExistError: c.update_msg = _('Error: some changesets not found when displaying pull request from %s.') % c.cs_rev + if rev_limit: + if len(avail_revs) - 1 > rev_limit: + c.update_msg = _('%d additional changesets are not shown.') % (len(avail_revs) - 1) + avail_show = [] + elif len(avail_show) - 1 > rev_limit: + c.update_msg = _('%d changesets available for merging are not shown.') % (len(avail_show) - len(avail_revs)) + avail_show = sorted(avail_revs, reverse=True) + c.avail_revs = avail_revs c.avail_cs = [org_scm_instance.get_changeset(r) for r in avail_show] c.avail_jsdata = graph_data(org_scm_instance, avail_show) diff -r 3fff648ffdd4 -r 439bc130e093 kallithea/i18n/be/LC_MESSAGES/kallithea.po --- a/kallithea/i18n/be/LC_MESSAGES/kallithea.po Tue Feb 14 15:22:17 2023 +0100 +++ b/kallithea/i18n/be/LC_MESSAGES/kallithea.po Sun May 14 21:19:38 2023 +0200 @@ -5,7 +5,7 @@ msgstr "" "Project-Id-Version: Kallithea 0.3\n" "Report-Msgid-Bugs-To: translations@kallithea-scm.org\n" -"POT-Creation-Date: 2022-12-12 23:01+0100\n" +"POT-Creation-Date: 2023-05-14 21:19+0200\n" "PO-Revision-Date: 2017-08-20 10:44+0000\n" "Last-Translator: Viktar Vauchkevich \n" "Language-Team: Belarusian \n" "Language-Team: Czech \n" "Language-Team: Danish \n" "Language-Team: German \n" "Language-Team: Greek \n" @@ -27,7 +27,7 @@ msgstr "" #: kallithea/controllers/base.py:587 kallithea/controllers/changelog.py:67 -#: kallithea/controllers/pullrequests.py:249 +#: kallithea/controllers/pullrequests.py:250 msgid "There are no changesets yet" msgstr "Aún no hay cambios" @@ -251,12 +251,12 @@ msgstr "Cambios" #: kallithea/controllers/files.py:718 -#: kallithea/controllers/pullrequests.py:176 kallithea/model/scm.py:627 +#: kallithea/controllers/pullrequests.py:177 kallithea/model/scm.py:627 msgid "Branches" msgstr "Ramas" #: kallithea/controllers/files.py:719 -#: kallithea/controllers/pullrequests.py:177 kallithea/model/scm.py:638 +#: kallithea/controllers/pullrequests.py:178 kallithea/model/scm.py:638 msgid "Tags" msgstr "Etiquetas" @@ -340,129 +340,139 @@ msgid "Successfully updated password" msgstr "Contraseña actualizada correctamente" -#: kallithea/controllers/pullrequests.py:66 +#: kallithea/controllers/pullrequests.py:67 #, python-format msgid "Invalid reviewer \"%s\" specified" msgstr "El validador \"%s\" no es correcto" -#: kallithea/controllers/pullrequests.py:122 +#: kallithea/controllers/pullrequests.py:123 #, python-format msgid "%s (closed)" msgstr "%s (cerrado)" -#: kallithea/controllers/pullrequests.py:149 +#: kallithea/controllers/pullrequests.py:150 #: kallithea/templates/changeset/changeset.html:12 msgid "Changeset" msgstr "Cambio" -#: kallithea/controllers/pullrequests.py:173 +#: kallithea/controllers/pullrequests.py:174 msgid "Special" msgstr "Especial" -#: kallithea/controllers/pullrequests.py:174 +#: kallithea/controllers/pullrequests.py:175 #, fuzzy msgid "Peer branches" msgstr "Ramas de los pares" -#: kallithea/controllers/pullrequests.py:175 kallithea/model/scm.py:633 +#: kallithea/controllers/pullrequests.py:176 kallithea/model/scm.py:633 msgid "Bookmarks" msgstr "Marcadores" -#: kallithea/controllers/pullrequests.py:317 +#: kallithea/controllers/pullrequests.py:318 #, python-format msgid "Error creating pull request: %s" msgstr "Error al crear la petición de pull: %s" -#: kallithea/controllers/pullrequests.py:344 -#: kallithea/controllers/pullrequests.py:367 +#: kallithea/controllers/pullrequests.py:345 +#: kallithea/controllers/pullrequests.py:368 msgid "Error occurred while creating pull request" msgstr "Ocurrió un error al crear la petición de pull" -#: kallithea/controllers/pullrequests.py:349 +#: kallithea/controllers/pullrequests.py:350 msgid "Successfully opened new pull request" msgstr "La petición de pull se ha creado correctamente" -#: kallithea/controllers/pullrequests.py:372 +#: kallithea/controllers/pullrequests.py:373 #, fuzzy #| msgid "Pull request update created" msgid "New pull request iteration created" msgstr "Nueva iteración de la petición pull creada" -#: kallithea/controllers/pullrequests.py:400 +#: kallithea/controllers/pullrequests.py:401 #, python-format msgid "Meanwhile, the following reviewers have been added: %s" msgstr "" -#: kallithea/controllers/pullrequests.py:404 +#: kallithea/controllers/pullrequests.py:405 #, python-format msgid "Meanwhile, the following reviewers have been removed: %s" msgstr "" -#: kallithea/controllers/pullrequests.py:420 +#: kallithea/controllers/pullrequests.py:421 #: kallithea/model/pull_request.py:230 msgid "No description" msgstr "No hay descripción" -#: kallithea/controllers/pullrequests.py:429 +#: kallithea/controllers/pullrequests.py:430 msgid "Pull request updated" msgstr "Petición pull actualizada" -#: kallithea/controllers/pullrequests.py:442 +#: kallithea/controllers/pullrequests.py:443 msgid "Successfully deleted pull request" msgstr "Petición pull eliminada correctamente" -#: kallithea/controllers/pullrequests.py:478 +#: kallithea/controllers/pullrequests.py:479 #, python-format msgid "Revision %s not found in %s" msgstr "No se ha encontrado la revisión %s en %s" -#: kallithea/controllers/pullrequests.py:506 +#: kallithea/controllers/pullrequests.py:509 #, fuzzy, python-format #| msgid "No changesets found for updating this pull request." msgid "Error: changesets not found when displaying pull request from %s." msgstr "No se encontraron cambios para actualizar la petición pull." -#: kallithea/controllers/pullrequests.py:520 +#: kallithea/controllers/pullrequests.py:523 #, python-format msgid "This pull request has already been merged to %s." msgstr "La petición pull ya ha sido incluida a %s." -#: kallithea/controllers/pullrequests.py:522 +#: kallithea/controllers/pullrequests.py:525 msgid "This pull request has been closed and can not be updated." msgstr "La petición pull esta cerrada y no se puede actualizar." -#: kallithea/controllers/pullrequests.py:541 +#: kallithea/controllers/pullrequests.py:544 #, fuzzy, python-format #| msgid "The following changes are available on %s:" msgid "The following additional changes are available on %s:" msgstr "Los siguientes cambios están disponibles en %s:" -#: kallithea/controllers/pullrequests.py:543 -#: kallithea/controllers/pullrequests.py:547 +#: kallithea/controllers/pullrequests.py:546 +#: kallithea/controllers/pullrequests.py:550 #, fuzzy #| msgid "No changesets found for updating this pull request." msgid "No additional changesets found for iterating on this pull request." msgstr "No se encontraron cambios para actualizar la petición pull." -#: kallithea/controllers/pullrequests.py:555 +#: kallithea/controllers/pullrequests.py:558 #, fuzzy, python-format msgid "Note: Branch %s has another head: %s." msgstr "Nota: la rama %s tiene otro head: %s." -#: kallithea/controllers/pullrequests.py:562 +#: kallithea/controllers/pullrequests.py:565 #, fuzzy #| msgid "Git pull requests don't support updates yet." msgid "Git pull requests don't support iterating yet." msgstr "La peticiones pull de Git aún no soportan actualizaciones." -#: kallithea/controllers/pullrequests.py:564 +#: kallithea/controllers/pullrequests.py:567 #, fuzzy, python-format #| msgid "No changesets found for updating this pull request." msgid "" "Error: some changesets not found when displaying pull request from %s." msgstr "No se encontraron cambios para actualizar la petición pull." -#: kallithea/controllers/pullrequests.py:586 +#: kallithea/controllers/pullrequests.py:571 +#, python-format +msgid "%d additional changesets are not shown." +msgstr "" + +#: kallithea/controllers/pullrequests.py:574 +#, python-format +msgid "%d changesets available for merging are not shown." +msgstr "" + +#: kallithea/controllers/pullrequests.py:597 msgid "The diff can't be shown - the PR revisions could not be found." msgstr "" @@ -725,57 +735,51 @@ msgid "Error occurred during update of permissions" msgstr "" -#: kallithea/controllers/admin/repo_groups.py:165 +#: kallithea/controllers/admin/repo_groups.py:158 #, python-format msgid "Error occurred during creation of repository group %s" msgstr "" -#: kallithea/controllers/admin/repo_groups.py:172 +#: kallithea/controllers/admin/repo_groups.py:165 #, python-format msgid "Created repository group %s" msgstr "" -#: kallithea/controllers/admin/repo_groups.py:225 +#: kallithea/controllers/admin/repo_groups.py:218 #, python-format msgid "Updated repository group %s" msgstr "" -#: kallithea/controllers/admin/repo_groups.py:241 +#: kallithea/controllers/admin/repo_groups.py:234 #, python-format msgid "Error occurred during update of repository group %s" msgstr "" +#: kallithea/controllers/admin/repo_groups.py:245 +#, python-format +msgid "This group contains %s repositories and cannot be deleted" +msgstr "" + #: kallithea/controllers/admin/repo_groups.py:252 #, python-format -msgid "This group contains %s repositories and cannot be deleted" -msgstr "" - -#: kallithea/controllers/admin/repo_groups.py:259 -#, python-format msgid "This group contains %s subgroups and cannot be deleted" msgstr "" -#: kallithea/controllers/admin/repo_groups.py:265 +#: kallithea/controllers/admin/repo_groups.py:258 #, python-format msgid "Removed repository group %s" msgstr "" -#: kallithea/controllers/admin/repo_groups.py:270 +#: kallithea/controllers/admin/repo_groups.py:263 #, python-format msgid "Error occurred during deletion of repository group %s" msgstr "" -#: kallithea/controllers/admin/repo_groups.py:354 +#: kallithea/controllers/admin/repo_groups.py:357 +msgid "Repository group permissions updated" +msgstr "" + #: kallithea/controllers/admin/repo_groups.py:384 -#: kallithea/controllers/admin/user_groups.py:288 -msgid "Cannot revoke permission for yourself as admin" -msgstr "" - -#: kallithea/controllers/admin/repo_groups.py:369 -msgid "Repository group permissions updated" -msgstr "" - -#: kallithea/controllers/admin/repo_groups.py:401 #: kallithea/controllers/admin/repos.py:334 #: kallithea/controllers/admin/user_groups.py:300 msgid "An error occurred during revoking of permission" @@ -995,6 +999,10 @@ msgid "User group permissions updated" msgstr "" +#: kallithea/controllers/admin/user_groups.py:288 +msgid "Cannot revoke permission for yourself as admin" +msgstr "" + #: kallithea/controllers/admin/user_groups.py:382 #: kallithea/controllers/admin/users.py:337 msgid "Updated permissions" @@ -1044,11 +1052,11 @@ msgid "Removed IP address from user whitelist" msgstr "" -#: kallithea/lib/auth.py:549 +#: kallithea/lib/auth.py:552 msgid "You need to be a registered user to perform this action" msgstr "" -#: kallithea/lib/auth.py:577 +#: kallithea/lib/auth.py:580 msgid "You need to be signed in to view this page" msgstr "" @@ -1452,19 +1460,19 @@ msgid "User registration with automatic account activation" msgstr "" -#: kallithea/model/db.py:1943 +#: kallithea/model/db.py:1944 msgid "Not reviewed" msgstr "" -#: kallithea/model/db.py:1944 -msgid "Under review" -msgstr "" - #: kallithea/model/db.py:1945 -msgid "Not approved" +msgid "Under review" msgstr "" #: kallithea/model/db.py:1946 +msgid "Not approved" +msgstr "" + +#: kallithea/model/db.py:1947 msgid "Approved" msgstr "" diff -r 3fff648ffdd4 -r 439bc130e093 kallithea/i18n/fr/LC_MESSAGES/kallithea.po --- a/kallithea/i18n/fr/LC_MESSAGES/kallithea.po Tue Feb 14 15:22:17 2023 +0100 +++ b/kallithea/i18n/fr/LC_MESSAGES/kallithea.po Sun May 14 21:19:38 2023 +0200 @@ -4,7 +4,7 @@ msgstr "" "Project-Id-Version: Kallithea 0.3\n" "Report-Msgid-Bugs-To: translations@kallithea-scm.org\n" -"POT-Creation-Date: 2022-12-12 23:01+0100\n" +"POT-Creation-Date: 2023-05-14 21:19+0200\n" "PO-Revision-Date: 2021-05-15 17:32+0000\n" "Last-Translator: Étienne Gilli \n" "Language-Team: French \n" "Language-Team: Hungarian \n" "Language-Team: Japanese , 2022. +# FIRST AUTHOR , 2023. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Kallithea 0.7.0\n" "Report-Msgid-Bugs-To: translations@kallithea-scm.org\n" -"POT-Creation-Date: 2022-12-12 23:01+0100\n" +"POT-Creation-Date: 2023-05-14 21:19+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -26,7 +26,7 @@ msgstr "" #: kallithea/controllers/base.py:587 kallithea/controllers/changelog.py:67 -#: kallithea/controllers/pullrequests.py:249 +#: kallithea/controllers/pullrequests.py:250 msgid "There are no changesets yet" msgstr "" @@ -239,12 +239,12 @@ msgid "Changesets" msgstr "" -#: kallithea/controllers/files.py:718 kallithea/controllers/pullrequests.py:176 +#: kallithea/controllers/files.py:718 kallithea/controllers/pullrequests.py:177 #: kallithea/model/scm.py:627 msgid "Branches" msgstr "" -#: kallithea/controllers/files.py:719 kallithea/controllers/pullrequests.py:177 +#: kallithea/controllers/files.py:719 kallithea/controllers/pullrequests.py:178 #: kallithea/model/scm.py:638 msgid "Tags" msgstr "" @@ -327,118 +327,128 @@ msgid "Successfully updated password" msgstr "" -#: kallithea/controllers/pullrequests.py:66 +#: kallithea/controllers/pullrequests.py:67 #, python-format msgid "Invalid reviewer \"%s\" specified" msgstr "" -#: kallithea/controllers/pullrequests.py:122 +#: kallithea/controllers/pullrequests.py:123 #, python-format msgid "%s (closed)" msgstr "" -#: kallithea/controllers/pullrequests.py:149 +#: kallithea/controllers/pullrequests.py:150 #: kallithea/templates/changeset/changeset.html:12 msgid "Changeset" msgstr "" -#: kallithea/controllers/pullrequests.py:173 -msgid "Special" -msgstr "" - #: kallithea/controllers/pullrequests.py:174 +msgid "Special" +msgstr "" + +#: kallithea/controllers/pullrequests.py:175 msgid "Peer branches" msgstr "" -#: kallithea/controllers/pullrequests.py:175 kallithea/model/scm.py:633 +#: kallithea/controllers/pullrequests.py:176 kallithea/model/scm.py:633 msgid "Bookmarks" msgstr "" -#: kallithea/controllers/pullrequests.py:317 +#: kallithea/controllers/pullrequests.py:318 #, python-format msgid "Error creating pull request: %s" msgstr "" -#: kallithea/controllers/pullrequests.py:344 -#: kallithea/controllers/pullrequests.py:367 +#: kallithea/controllers/pullrequests.py:345 +#: kallithea/controllers/pullrequests.py:368 msgid "Error occurred while creating pull request" msgstr "" -#: kallithea/controllers/pullrequests.py:349 +#: kallithea/controllers/pullrequests.py:350 msgid "Successfully opened new pull request" msgstr "" -#: kallithea/controllers/pullrequests.py:372 +#: kallithea/controllers/pullrequests.py:373 msgid "New pull request iteration created" msgstr "" -#: kallithea/controllers/pullrequests.py:400 +#: kallithea/controllers/pullrequests.py:401 #, python-format msgid "Meanwhile, the following reviewers have been added: %s" msgstr "" -#: kallithea/controllers/pullrequests.py:404 +#: kallithea/controllers/pullrequests.py:405 #, python-format msgid "Meanwhile, the following reviewers have been removed: %s" msgstr "" -#: kallithea/controllers/pullrequests.py:420 +#: kallithea/controllers/pullrequests.py:421 #: kallithea/model/pull_request.py:230 msgid "No description" msgstr "" -#: kallithea/controllers/pullrequests.py:429 +#: kallithea/controllers/pullrequests.py:430 msgid "Pull request updated" msgstr "" -#: kallithea/controllers/pullrequests.py:442 +#: kallithea/controllers/pullrequests.py:443 msgid "Successfully deleted pull request" msgstr "" -#: kallithea/controllers/pullrequests.py:478 +#: kallithea/controllers/pullrequests.py:479 #, python-format msgid "Revision %s not found in %s" msgstr "" -#: kallithea/controllers/pullrequests.py:506 +#: kallithea/controllers/pullrequests.py:509 #, python-format msgid "Error: changesets not found when displaying pull request from %s." msgstr "" -#: kallithea/controllers/pullrequests.py:520 +#: kallithea/controllers/pullrequests.py:523 #, python-format msgid "This pull request has already been merged to %s." msgstr "" -#: kallithea/controllers/pullrequests.py:522 +#: kallithea/controllers/pullrequests.py:525 msgid "This pull request has been closed and can not be updated." msgstr "" -#: kallithea/controllers/pullrequests.py:541 +#: kallithea/controllers/pullrequests.py:544 #, python-format msgid "The following additional changes are available on %s:" msgstr "" -#: kallithea/controllers/pullrequests.py:543 -#: kallithea/controllers/pullrequests.py:547 +#: kallithea/controllers/pullrequests.py:546 +#: kallithea/controllers/pullrequests.py:550 msgid "No additional changesets found for iterating on this pull request." msgstr "" -#: kallithea/controllers/pullrequests.py:555 +#: kallithea/controllers/pullrequests.py:558 #, python-format msgid "Note: Branch %s has another head: %s." msgstr "" -#: kallithea/controllers/pullrequests.py:562 +#: kallithea/controllers/pullrequests.py:565 msgid "Git pull requests don't support iterating yet." msgstr "" -#: kallithea/controllers/pullrequests.py:564 +#: kallithea/controllers/pullrequests.py:567 #, python-format msgid "Error: some changesets not found when displaying pull request from %s." msgstr "" -#: kallithea/controllers/pullrequests.py:586 +#: kallithea/controllers/pullrequests.py:571 +#, python-format +msgid "%d additional changesets are not shown." +msgstr "" + +#: kallithea/controllers/pullrequests.py:574 +#, python-format +msgid "%d changesets available for merging are not shown." +msgstr "" + +#: kallithea/controllers/pullrequests.py:597 msgid "The diff can't be shown - the PR revisions could not be found." msgstr "" @@ -699,57 +709,51 @@ msgid "Error occurred during update of permissions" msgstr "" -#: kallithea/controllers/admin/repo_groups.py:165 +#: kallithea/controllers/admin/repo_groups.py:158 #, python-format msgid "Error occurred during creation of repository group %s" msgstr "" -#: kallithea/controllers/admin/repo_groups.py:172 +#: kallithea/controllers/admin/repo_groups.py:165 #, python-format msgid "Created repository group %s" msgstr "" -#: kallithea/controllers/admin/repo_groups.py:225 +#: kallithea/controllers/admin/repo_groups.py:218 #, python-format msgid "Updated repository group %s" msgstr "" -#: kallithea/controllers/admin/repo_groups.py:241 +#: kallithea/controllers/admin/repo_groups.py:234 #, python-format msgid "Error occurred during update of repository group %s" msgstr "" +#: kallithea/controllers/admin/repo_groups.py:245 +#, python-format +msgid "This group contains %s repositories and cannot be deleted" +msgstr "" + #: kallithea/controllers/admin/repo_groups.py:252 #, python-format -msgid "This group contains %s repositories and cannot be deleted" -msgstr "" - -#: kallithea/controllers/admin/repo_groups.py:259 -#, python-format msgid "This group contains %s subgroups and cannot be deleted" msgstr "" -#: kallithea/controllers/admin/repo_groups.py:265 +#: kallithea/controllers/admin/repo_groups.py:258 #, python-format msgid "Removed repository group %s" msgstr "" -#: kallithea/controllers/admin/repo_groups.py:270 +#: kallithea/controllers/admin/repo_groups.py:263 #, python-format msgid "Error occurred during deletion of repository group %s" msgstr "" -#: kallithea/controllers/admin/repo_groups.py:354 +#: kallithea/controllers/admin/repo_groups.py:357 +msgid "Repository group permissions updated" +msgstr "" + #: kallithea/controllers/admin/repo_groups.py:384 -#: kallithea/controllers/admin/user_groups.py:288 -msgid "Cannot revoke permission for yourself as admin" -msgstr "" - -#: kallithea/controllers/admin/repo_groups.py:369 -msgid "Repository group permissions updated" -msgstr "" - -#: kallithea/controllers/admin/repo_groups.py:401 #: kallithea/controllers/admin/repos.py:334 #: kallithea/controllers/admin/user_groups.py:300 msgid "An error occurred during revoking of permission" @@ -966,6 +970,10 @@ msgid "User group permissions updated" msgstr "" +#: kallithea/controllers/admin/user_groups.py:288 +msgid "Cannot revoke permission for yourself as admin" +msgstr "" + #: kallithea/controllers/admin/user_groups.py:382 #: kallithea/controllers/admin/users.py:337 msgid "Updated permissions" @@ -1015,11 +1023,11 @@ msgid "Removed IP address from user whitelist" msgstr "" -#: kallithea/lib/auth.py:549 +#: kallithea/lib/auth.py:552 msgid "You need to be a registered user to perform this action" msgstr "" -#: kallithea/lib/auth.py:577 +#: kallithea/lib/auth.py:580 msgid "You need to be signed in to view this page" msgstr "" @@ -1416,19 +1424,19 @@ msgid "User registration with automatic account activation" msgstr "" -#: kallithea/model/db.py:1943 +#: kallithea/model/db.py:1944 msgid "Not reviewed" msgstr "" -#: kallithea/model/db.py:1944 -msgid "Under review" -msgstr "" - #: kallithea/model/db.py:1945 -msgid "Not approved" +msgid "Under review" msgstr "" #: kallithea/model/db.py:1946 +msgid "Not approved" +msgstr "" + +#: kallithea/model/db.py:1947 msgid "Approved" msgstr "" diff -r 3fff648ffdd4 -r 439bc130e093 kallithea/i18n/lb/LC_MESSAGES/kallithea.po --- a/kallithea/i18n/lb/LC_MESSAGES/kallithea.po Tue Feb 14 15:22:17 2023 +0100 +++ b/kallithea/i18n/lb/LC_MESSAGES/kallithea.po Sun May 14 21:19:38 2023 +0200 @@ -3,7 +3,7 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: translations@kallithea-scm.org\n" -"POT-Creation-Date: 2022-12-12 23:01+0100\n" +"POT-Creation-Date: 2023-05-14 21:19+0200\n" "PO-Revision-Date: 2020-04-13 19:42+0000\n" "Last-Translator: Dennis Fink \n" "Language: lb\n" @@ -23,7 +23,7 @@ msgstr "" #: kallithea/controllers/base.py:587 kallithea/controllers/changelog.py:67 -#: kallithea/controllers/pullrequests.py:249 +#: kallithea/controllers/pullrequests.py:250 msgid "There are no changesets yet" msgstr "Et sinn nach keng Ännerungen do" @@ -238,12 +238,12 @@ msgstr "Ännerungen" #: kallithea/controllers/files.py:718 -#: kallithea/controllers/pullrequests.py:176 kallithea/model/scm.py:627 +#: kallithea/controllers/pullrequests.py:177 kallithea/model/scm.py:627 msgid "Branches" msgstr "Äascht" #: kallithea/controllers/files.py:719 -#: kallithea/controllers/pullrequests.py:177 kallithea/model/scm.py:638 +#: kallithea/controllers/pullrequests.py:178 kallithea/model/scm.py:638 msgid "Tags" msgstr "" @@ -326,119 +326,129 @@ msgid "Successfully updated password" msgstr "Passwuert erfollegräich erneiert" -#: kallithea/controllers/pullrequests.py:66 +#: kallithea/controllers/pullrequests.py:67 #, python-format msgid "Invalid reviewer \"%s\" specified" msgstr "" -#: kallithea/controllers/pullrequests.py:122 +#: kallithea/controllers/pullrequests.py:123 #, python-format msgid "%s (closed)" msgstr "%s (Zou)" -#: kallithea/controllers/pullrequests.py:149 +#: kallithea/controllers/pullrequests.py:150 #: kallithea/templates/changeset/changeset.html:12 msgid "Changeset" msgstr "Ännerung" -#: kallithea/controllers/pullrequests.py:173 +#: kallithea/controllers/pullrequests.py:174 msgid "Special" msgstr "Spezial" -#: kallithea/controllers/pullrequests.py:174 +#: kallithea/controllers/pullrequests.py:175 msgid "Peer branches" msgstr "" -#: kallithea/controllers/pullrequests.py:175 kallithea/model/scm.py:633 +#: kallithea/controllers/pullrequests.py:176 kallithea/model/scm.py:633 msgid "Bookmarks" msgstr "Lieszeechen" -#: kallithea/controllers/pullrequests.py:317 +#: kallithea/controllers/pullrequests.py:318 #, python-format msgid "Error creating pull request: %s" msgstr "" -#: kallithea/controllers/pullrequests.py:344 -#: kallithea/controllers/pullrequests.py:367 +#: kallithea/controllers/pullrequests.py:345 +#: kallithea/controllers/pullrequests.py:368 msgid "Error occurred while creating pull request" msgstr "" -#: kallithea/controllers/pullrequests.py:349 +#: kallithea/controllers/pullrequests.py:350 msgid "Successfully opened new pull request" msgstr "" -#: kallithea/controllers/pullrequests.py:372 +#: kallithea/controllers/pullrequests.py:373 msgid "New pull request iteration created" msgstr "" -#: kallithea/controllers/pullrequests.py:400 +#: kallithea/controllers/pullrequests.py:401 #, python-format msgid "Meanwhile, the following reviewers have been added: %s" msgstr "" -#: kallithea/controllers/pullrequests.py:404 +#: kallithea/controllers/pullrequests.py:405 #, python-format msgid "Meanwhile, the following reviewers have been removed: %s" msgstr "" -#: kallithea/controllers/pullrequests.py:420 +#: kallithea/controllers/pullrequests.py:421 #: kallithea/model/pull_request.py:230 msgid "No description" msgstr "Keng Beschreiwung" -#: kallithea/controllers/pullrequests.py:429 +#: kallithea/controllers/pullrequests.py:430 msgid "Pull request updated" msgstr "" -#: kallithea/controllers/pullrequests.py:442 +#: kallithea/controllers/pullrequests.py:443 msgid "Successfully deleted pull request" msgstr "" -#: kallithea/controllers/pullrequests.py:478 +#: kallithea/controllers/pullrequests.py:479 #, python-format msgid "Revision %s not found in %s" msgstr "" -#: kallithea/controllers/pullrequests.py:506 +#: kallithea/controllers/pullrequests.py:509 #, python-format msgid "Error: changesets not found when displaying pull request from %s." msgstr "" -#: kallithea/controllers/pullrequests.py:520 +#: kallithea/controllers/pullrequests.py:523 #, python-format msgid "This pull request has already been merged to %s." msgstr "" -#: kallithea/controllers/pullrequests.py:522 +#: kallithea/controllers/pullrequests.py:525 msgid "This pull request has been closed and can not be updated." msgstr "" -#: kallithea/controllers/pullrequests.py:541 +#: kallithea/controllers/pullrequests.py:544 #, python-format msgid "The following additional changes are available on %s:" msgstr "" -#: kallithea/controllers/pullrequests.py:543 -#: kallithea/controllers/pullrequests.py:547 +#: kallithea/controllers/pullrequests.py:546 +#: kallithea/controllers/pullrequests.py:550 msgid "No additional changesets found for iterating on this pull request." msgstr "" -#: kallithea/controllers/pullrequests.py:555 +#: kallithea/controllers/pullrequests.py:558 #, python-format msgid "Note: Branch %s has another head: %s." msgstr "" -#: kallithea/controllers/pullrequests.py:562 +#: kallithea/controllers/pullrequests.py:565 msgid "Git pull requests don't support iterating yet." msgstr "" -#: kallithea/controllers/pullrequests.py:564 +#: kallithea/controllers/pullrequests.py:567 #, python-format msgid "" "Error: some changesets not found when displaying pull request from %s." msgstr "" -#: kallithea/controllers/pullrequests.py:586 +#: kallithea/controllers/pullrequests.py:571 +#, python-format +msgid "%d additional changesets are not shown." +msgstr "" + +#: kallithea/controllers/pullrequests.py:574 +#, python-format +msgid "%d changesets available for merging are not shown." +msgstr "" + +#: kallithea/controllers/pullrequests.py:597 msgid "The diff can't be shown - the PR revisions could not be found." msgstr "" @@ -699,57 +709,51 @@ msgid "Error occurred during update of permissions" msgstr "" -#: kallithea/controllers/admin/repo_groups.py:165 +#: kallithea/controllers/admin/repo_groups.py:158 #, python-format msgid "Error occurred during creation of repository group %s" msgstr "" -#: kallithea/controllers/admin/repo_groups.py:172 +#: kallithea/controllers/admin/repo_groups.py:165 #, python-format msgid "Created repository group %s" msgstr "" -#: kallithea/controllers/admin/repo_groups.py:225 +#: kallithea/controllers/admin/repo_groups.py:218 #, python-format msgid "Updated repository group %s" msgstr "" -#: kallithea/controllers/admin/repo_groups.py:241 +#: kallithea/controllers/admin/repo_groups.py:234 #, python-format msgid "Error occurred during update of repository group %s" msgstr "" +#: kallithea/controllers/admin/repo_groups.py:245 +#, python-format +msgid "This group contains %s repositories and cannot be deleted" +msgstr "" + #: kallithea/controllers/admin/repo_groups.py:252 #, python-format -msgid "This group contains %s repositories and cannot be deleted" -msgstr "" - -#: kallithea/controllers/admin/repo_groups.py:259 -#, python-format msgid "This group contains %s subgroups and cannot be deleted" msgstr "" -#: kallithea/controllers/admin/repo_groups.py:265 +#: kallithea/controllers/admin/repo_groups.py:258 #, python-format msgid "Removed repository group %s" msgstr "" -#: kallithea/controllers/admin/repo_groups.py:270 +#: kallithea/controllers/admin/repo_groups.py:263 #, python-format msgid "Error occurred during deletion of repository group %s" msgstr "" -#: kallithea/controllers/admin/repo_groups.py:354 +#: kallithea/controllers/admin/repo_groups.py:357 +msgid "Repository group permissions updated" +msgstr "" + #: kallithea/controllers/admin/repo_groups.py:384 -#: kallithea/controllers/admin/user_groups.py:288 -msgid "Cannot revoke permission for yourself as admin" -msgstr "" - -#: kallithea/controllers/admin/repo_groups.py:369 -msgid "Repository group permissions updated" -msgstr "" - -#: kallithea/controllers/admin/repo_groups.py:401 #: kallithea/controllers/admin/repos.py:334 #: kallithea/controllers/admin/user_groups.py:300 msgid "An error occurred during revoking of permission" @@ -966,6 +970,10 @@ msgid "User group permissions updated" msgstr "" +#: kallithea/controllers/admin/user_groups.py:288 +msgid "Cannot revoke permission for yourself as admin" +msgstr "" + #: kallithea/controllers/admin/user_groups.py:382 #: kallithea/controllers/admin/users.py:337 msgid "Updated permissions" @@ -1015,11 +1023,11 @@ msgid "Removed IP address from user whitelist" msgstr "" -#: kallithea/lib/auth.py:549 +#: kallithea/lib/auth.py:552 msgid "You need to be a registered user to perform this action" msgstr "" -#: kallithea/lib/auth.py:577 +#: kallithea/lib/auth.py:580 msgid "You need to be signed in to view this page" msgstr "" @@ -1423,19 +1431,19 @@ msgid "User registration with automatic account activation" msgstr "" -#: kallithea/model/db.py:1943 +#: kallithea/model/db.py:1944 msgid "Not reviewed" msgstr "" -#: kallithea/model/db.py:1944 -msgid "Under review" -msgstr "" - #: kallithea/model/db.py:1945 -msgid "Not approved" +msgid "Under review" msgstr "" #: kallithea/model/db.py:1946 +msgid "Not approved" +msgstr "" + +#: kallithea/model/db.py:1947 msgid "Approved" msgstr "" diff -r 3fff648ffdd4 -r 439bc130e093 kallithea/i18n/nb_NO/LC_MESSAGES/kallithea.po --- a/kallithea/i18n/nb_NO/LC_MESSAGES/kallithea.po Tue Feb 14 15:22:17 2023 +0100 +++ b/kallithea/i18n/nb_NO/LC_MESSAGES/kallithea.po Sun May 14 21:19:38 2023 +0200 @@ -4,7 +4,7 @@ msgstr "" "Project-Id-Version: Kallithea 0.3.99\n" "Report-Msgid-Bugs-To: translations@kallithea-scm.org\n" -"POT-Creation-Date: 2022-12-12 23:01+0100\n" +"POT-Creation-Date: 2023-05-14 21:19+0200\n" "PO-Revision-Date: 2020-08-11 11:32+0000\n" "Last-Translator: Allan Nordhøy \n" "Language-Team: Norwegian Bokmål \n" "Language-Team: Flemish \n" "Language-Team: Polish \n" "Language-Team: none\n" @@ -29,7 +29,7 @@ msgstr "" #: kallithea/controllers/base.py:587 kallithea/controllers/changelog.py:67 -#: kallithea/controllers/pullrequests.py:249 +#: kallithea/controllers/pullrequests.py:250 msgid "There are no changesets yet" msgstr "Não há nenhum changeset ainda" @@ -248,12 +248,12 @@ msgstr "Conjuntos de mudanças" #: kallithea/controllers/files.py:718 -#: kallithea/controllers/pullrequests.py:176 kallithea/model/scm.py:627 +#: kallithea/controllers/pullrequests.py:177 kallithea/model/scm.py:627 msgid "Branches" msgstr "Ramos" #: kallithea/controllers/files.py:719 -#: kallithea/controllers/pullrequests.py:177 kallithea/model/scm.py:638 +#: kallithea/controllers/pullrequests.py:178 kallithea/model/scm.py:638 msgid "Tags" msgstr "Etiquetas" @@ -336,119 +336,129 @@ msgid "Successfully updated password" msgstr "" -#: kallithea/controllers/pullrequests.py:66 +#: kallithea/controllers/pullrequests.py:67 #, python-format msgid "Invalid reviewer \"%s\" specified" msgstr "" -#: kallithea/controllers/pullrequests.py:122 +#: kallithea/controllers/pullrequests.py:123 #, python-format msgid "%s (closed)" msgstr "" -#: kallithea/controllers/pullrequests.py:149 +#: kallithea/controllers/pullrequests.py:150 #: kallithea/templates/changeset/changeset.html:12 msgid "Changeset" msgstr "Conjunto de Mudanças" -#: kallithea/controllers/pullrequests.py:173 +#: kallithea/controllers/pullrequests.py:174 msgid "Special" msgstr "Especial" -#: kallithea/controllers/pullrequests.py:174 +#: kallithea/controllers/pullrequests.py:175 msgid "Peer branches" msgstr "Ramos pares" -#: kallithea/controllers/pullrequests.py:175 kallithea/model/scm.py:633 +#: kallithea/controllers/pullrequests.py:176 kallithea/model/scm.py:633 msgid "Bookmarks" msgstr "Marcadores" -#: kallithea/controllers/pullrequests.py:317 +#: kallithea/controllers/pullrequests.py:318 #, python-format msgid "Error creating pull request: %s" msgstr "" -#: kallithea/controllers/pullrequests.py:344 -#: kallithea/controllers/pullrequests.py:367 +#: kallithea/controllers/pullrequests.py:345 +#: kallithea/controllers/pullrequests.py:368 msgid "Error occurred while creating pull request" msgstr "" -#: kallithea/controllers/pullrequests.py:349 +#: kallithea/controllers/pullrequests.py:350 msgid "Successfully opened new pull request" msgstr "Novo pull request criado com sucesso" -#: kallithea/controllers/pullrequests.py:372 +#: kallithea/controllers/pullrequests.py:373 msgid "New pull request iteration created" msgstr "" -#: kallithea/controllers/pullrequests.py:400 +#: kallithea/controllers/pullrequests.py:401 #, python-format msgid "Meanwhile, the following reviewers have been added: %s" msgstr "" -#: kallithea/controllers/pullrequests.py:404 +#: kallithea/controllers/pullrequests.py:405 #, python-format msgid "Meanwhile, the following reviewers have been removed: %s" msgstr "" -#: kallithea/controllers/pullrequests.py:420 +#: kallithea/controllers/pullrequests.py:421 #: kallithea/model/pull_request.py:230 msgid "No description" msgstr "" -#: kallithea/controllers/pullrequests.py:429 +#: kallithea/controllers/pullrequests.py:430 msgid "Pull request updated" msgstr "" -#: kallithea/controllers/pullrequests.py:442 +#: kallithea/controllers/pullrequests.py:443 msgid "Successfully deleted pull request" msgstr "Pull request apagado com sucesso" -#: kallithea/controllers/pullrequests.py:478 +#: kallithea/controllers/pullrequests.py:479 #, python-format msgid "Revision %s not found in %s" msgstr "" -#: kallithea/controllers/pullrequests.py:506 +#: kallithea/controllers/pullrequests.py:509 #, python-format msgid "Error: changesets not found when displaying pull request from %s." msgstr "" -#: kallithea/controllers/pullrequests.py:520 +#: kallithea/controllers/pullrequests.py:523 #, python-format msgid "This pull request has already been merged to %s." msgstr "" -#: kallithea/controllers/pullrequests.py:522 +#: kallithea/controllers/pullrequests.py:525 msgid "This pull request has been closed and can not be updated." msgstr "" -#: kallithea/controllers/pullrequests.py:541 +#: kallithea/controllers/pullrequests.py:544 #, python-format msgid "The following additional changes are available on %s:" msgstr "" -#: kallithea/controllers/pullrequests.py:543 -#: kallithea/controllers/pullrequests.py:547 +#: kallithea/controllers/pullrequests.py:546 +#: kallithea/controllers/pullrequests.py:550 msgid "No additional changesets found for iterating on this pull request." msgstr "" -#: kallithea/controllers/pullrequests.py:555 +#: kallithea/controllers/pullrequests.py:558 #, python-format msgid "Note: Branch %s has another head: %s." msgstr "" -#: kallithea/controllers/pullrequests.py:562 +#: kallithea/controllers/pullrequests.py:565 msgid "Git pull requests don't support iterating yet." msgstr "" -#: kallithea/controllers/pullrequests.py:564 +#: kallithea/controllers/pullrequests.py:567 #, python-format msgid "" "Error: some changesets not found when displaying pull request from %s." msgstr "" -#: kallithea/controllers/pullrequests.py:586 +#: kallithea/controllers/pullrequests.py:571 +#, python-format +msgid "%d additional changesets are not shown." +msgstr "" + +#: kallithea/controllers/pullrequests.py:574 +#, python-format +msgid "%d changesets available for merging are not shown." +msgstr "" + +#: kallithea/controllers/pullrequests.py:597 msgid "The diff can't be shown - the PR revisions could not be found." msgstr "" @@ -710,57 +720,51 @@ msgid "Error occurred during update of permissions" msgstr "Ocorreu um erro durante a atualização das permissões" -#: kallithea/controllers/admin/repo_groups.py:165 +#: kallithea/controllers/admin/repo_groups.py:158 #, python-format msgid "Error occurred during creation of repository group %s" msgstr "Ocorreu um erro durante a criação do grupo de repositórios %s" -#: kallithea/controllers/admin/repo_groups.py:172 +#: kallithea/controllers/admin/repo_groups.py:165 #, python-format msgid "Created repository group %s" msgstr "Grupo de repositórios %s criado" -#: kallithea/controllers/admin/repo_groups.py:225 +#: kallithea/controllers/admin/repo_groups.py:218 #, python-format msgid "Updated repository group %s" msgstr "Grupo de repositórios %s atualizado" -#: kallithea/controllers/admin/repo_groups.py:241 +#: kallithea/controllers/admin/repo_groups.py:234 #, python-format msgid "Error occurred during update of repository group %s" msgstr "Ocorreu um erro durante a atualização do grupo de repositórios %s" -#: kallithea/controllers/admin/repo_groups.py:252 +#: kallithea/controllers/admin/repo_groups.py:245 #, python-format msgid "This group contains %s repositories and cannot be deleted" msgstr "Esse grupo contém %s repositórios e não pode ser apagado" -#: kallithea/controllers/admin/repo_groups.py:259 +#: kallithea/controllers/admin/repo_groups.py:252 #, python-format msgid "This group contains %s subgroups and cannot be deleted" msgstr "Este grupo contém %s subgrupos e não pode ser apagado" -#: kallithea/controllers/admin/repo_groups.py:265 +#: kallithea/controllers/admin/repo_groups.py:258 #, python-format msgid "Removed repository group %s" msgstr "Grupo de repositórios %s apagado" -#: kallithea/controllers/admin/repo_groups.py:270 +#: kallithea/controllers/admin/repo_groups.py:263 #, python-format msgid "Error occurred during deletion of repository group %s" msgstr "Ocorreu um erro durante a exclusão do grupo de repositórios %s" -#: kallithea/controllers/admin/repo_groups.py:354 -#: kallithea/controllers/admin/repo_groups.py:384 -#: kallithea/controllers/admin/user_groups.py:288 -msgid "Cannot revoke permission for yourself as admin" -msgstr "Não pode revocar sua própria permissão de administrador" - -#: kallithea/controllers/admin/repo_groups.py:369 +#: kallithea/controllers/admin/repo_groups.py:357 msgid "Repository group permissions updated" msgstr "Permissões atualizadas do Grupo de Repositórios" -#: kallithea/controllers/admin/repo_groups.py:401 +#: kallithea/controllers/admin/repo_groups.py:384 #: kallithea/controllers/admin/repos.py:334 #: kallithea/controllers/admin/user_groups.py:300 msgid "An error occurred during revoking of permission" @@ -979,6 +983,10 @@ msgid "User group permissions updated" msgstr "Permissões do Grupo de Utilizadores atualizadas" +#: kallithea/controllers/admin/user_groups.py:288 +msgid "Cannot revoke permission for yourself as admin" +msgstr "Não pode revocar sua própria permissão de administrador" + #: kallithea/controllers/admin/user_groups.py:382 #: kallithea/controllers/admin/users.py:337 msgid "Updated permissions" @@ -1028,11 +1036,11 @@ msgid "Removed IP address from user whitelist" msgstr "" -#: kallithea/lib/auth.py:549 +#: kallithea/lib/auth.py:552 msgid "You need to be a registered user to perform this action" msgstr "Precisa ser um utilizador registado para realizar essa ação" -#: kallithea/lib/auth.py:577 +#: kallithea/lib/auth.py:580 msgid "You need to be signed in to view this page" msgstr "Precisa estar logado para ver essa página" @@ -1438,19 +1446,19 @@ msgid "User registration with automatic account activation" msgstr "" -#: kallithea/model/db.py:1943 +#: kallithea/model/db.py:1944 msgid "Not reviewed" msgstr "" -#: kallithea/model/db.py:1944 -msgid "Under review" -msgstr "" - #: kallithea/model/db.py:1945 -msgid "Not approved" +msgid "Under review" msgstr "" #: kallithea/model/db.py:1946 +msgid "Not approved" +msgstr "" + +#: kallithea/model/db.py:1947 msgid "Approved" msgstr "Aprovado" diff -r 3fff648ffdd4 -r 439bc130e093 kallithea/i18n/pt_BR/LC_MESSAGES/kallithea.po --- a/kallithea/i18n/pt_BR/LC_MESSAGES/kallithea.po Tue Feb 14 15:22:17 2023 +0100 +++ b/kallithea/i18n/pt_BR/LC_MESSAGES/kallithea.po Sun May 14 21:19:38 2023 +0200 @@ -4,7 +4,7 @@ msgstr "" "Project-Id-Version: Kallithea 0.3\n" "Report-Msgid-Bugs-To: translations@kallithea-scm.org\n" -"POT-Creation-Date: 2022-12-12 23:01+0100\n" +"POT-Creation-Date: 2023-05-14 21:19+0200\n" "PO-Revision-Date: 2014-02-13 14:34+0000\n" "Last-Translator: Marcin Kuźmiński \n" "Language-Team: Portuguese (Brazil) \n" "Language-Team: Russian \n" "Language-Team: Slovak \n" "Language-Team: Turkish \n" "Language-Team: Ukrainian \n" "Language-Team: Chinese (Simplified) \n" "Language-Team: Chinese (Traditional)
    -
  • Copyright © 2012–2022, Mads Kiilerich
  • +
  • Copyright © 2012–2023, Mads Kiilerich
  • +
  • Copyright © 2019–2020, 2022–2023, Manuel Jacob
  • +
  • Copyright © 2023, Mathias De Mare
  • Copyright © 2016–2017, 2020, 2022, Asterios Dimitriou
  • -
  • Copyright © 2019–2020, 2022, Manuel Jacob
  • Copyright © 2022, Jaime Marquínez Ferrándiz
  • +
  • Copyright © 2022, Louis Bertrand
  • Copyright © 2022, toras9000
  • Copyright © 2022, yzqzss
  • Copyright © 2022, МАН69К
  • diff -r 3fff648ffdd4 -r 439bc130e093 kallithea/templates/admin/repo_groups/repo_group_edit_perms.html --- a/kallithea/templates/admin/repo_groups/repo_group_edit_perms.html Tue Feb 14 15:22:17 2023 +0100 +++ b/kallithea/templates/admin/repo_groups/repo_group_edit_perms.html Sun May 14 21:19:38 2023 +0200 @@ -12,9 +12,7 @@ ## USERS %for r2p in c.repo_group.repo_group_to_perm: - ##forbid revoking permission from yourself, except if you're an super admin - %if request.authuser.user_id != r2p.user.user_id or request.authuser.is_admin: ${h.radio('u_perm_%s' % r2p.user.username,'group.none')} ${h.radio('u_perm_%s' % r2p.user.username,'group.read')} ${h.radio('u_perm_%s' % r2p.user.username,'group.write')} @@ -34,17 +32,6 @@ %endif - %else: - ${h.radio('u_perm_%s' % r2p.user.username,'group.none', disabled="disabled")} - ${h.radio('u_perm_%s' % r2p.user.username,'group.read', disabled="disabled")} - ${h.radio('u_perm_%s' % r2p.user.username,'group.write', disabled="disabled")} - ${h.radio('u_perm_%s' % r2p.user.username,'group.admin', disabled="disabled")} - - ${h.gravatar(r2p.user.email, cls="perm-gravatar", size=14)} - ${r2p.user.username if r2p.user.username != 'default' else _('Default')} - - ${_('Admin')} - %endif %endfor diff -r 3fff648ffdd4 -r 439bc130e093 kallithea/templates/base/base.html --- a/kallithea/templates/base/base.html Tue Feb 14 15:22:17 2023 +0100 +++ b/kallithea/templates/base/base.html Sun May 14 21:19:38 2023 +0200 @@ -23,7 +23,7 @@ Kallithea, %endif which is - © 2010–2022 by various authors & licensed under GPLv3. + © 2010–2023 by various authors & licensed under GPLv3. %if c.issues_url: – ${_('Support')} %endif diff -r 3fff648ffdd4 -r 439bc130e093 kallithea/tests/api/api_base.py --- a/kallithea/tests/api/api_base.py Tue Feb 14 15:22:17 2023 +0100 +++ b/kallithea/tests/api/api_base.py Sun May 14 21:19:38 2023 +0200 @@ -2478,6 +2478,8 @@ result = ext_json.loads(response.body)["result"] assert result["raw_id"] == self.TEST_REVISION assert "reviews" not in result + assert "comments" not in result + assert "inline_comments" not in result def test_api_get_changeset_with_reviews(self): reviewobjs = fixture.review_changeset(self.REPO, self.TEST_REVISION, "approved") @@ -2488,6 +2490,8 @@ result = ext_json.loads(response.body)["result"] assert result["raw_id"] == self.TEST_REVISION assert "reviews" in result + assert "comments" not in result + assert "inline_comments" not in result assert len(result["reviews"]) == 1 review = result["reviews"][0] expected = { @@ -2497,6 +2501,49 @@ } assert review == expected + def test_api_get_changeset_with_comments(self): + commentobj = fixture.add_changeset_comment(self.REPO, self.TEST_REVISION, "example changeset comment") + id_, params = _build_data(self.apikey, 'get_changeset', + repoid=self.REPO, raw_id=self.TEST_REVISION, + with_comments=True) + response = api_call(self, params) + result = ext_json.loads(response.body)["result"] + assert result["raw_id"] == self.TEST_REVISION + assert "reviews" not in result + assert "comments" in result + assert "inline_comments" not in result + comment = result["comments"][-1] + expected = { + 'comment_id': commentobj.comment_id, + 'text': 'example changeset comment', + 'username': 'test_admin', + 'created_on': commentobj.created_on.replace(microsecond=0).isoformat(), + } + assert comment == expected + + def test_api_get_changeset_with_inline_comments(self): + commentobj = fixture.add_changeset_comment(self.REPO, self.TEST_REVISION, "example inline comment", f_path='vcs/__init__.py', line_no="n3") + id_, params = _build_data(self.apikey, 'get_changeset', + repoid=self.REPO, raw_id=self.TEST_REVISION, + with_inline_comments=True) + response = api_call(self, params) + result = ext_json.loads(response.body)["result"] + assert result["raw_id"] == self.TEST_REVISION + assert "reviews" not in result + assert "comments" not in result + assert "inline_comments" in result + expected = [ + ['vcs/__init__.py', { + 'n3': [{ + 'comment_id': commentobj.comment_id, + 'text': 'example inline comment', + 'username': 'test_admin', + 'created_on': commentobj.created_on.replace(microsecond=0).isoformat(), + }] + }] + ] + assert result["inline_comments"] == expected + def test_api_get_changeset_that_does_not_exist(self): """ Fetch changeset status for non-existant changeset. revision id is the above git hash used in the test above with the @@ -2539,7 +2586,8 @@ "org_ref_parts": ["branch", "stable", self.TEST_PR_SRC], "other_ref_parts": ["branch", "default", self.TEST_PR_DST], "comments": [{"username": base.TEST_USER_ADMIN_LOGIN, "text": "", - "comment_id": pullrequest.comments[0].comment_id}], + "comment_id": pullrequest.comments[0].comment_id, + "created_on": "2000-01-01T00:00:00"}], "owner": base.TEST_USER_ADMIN_LOGIN, "statuses": [{"status": "under_review", "reviewer": base.TEST_USER_ADMIN_LOGIN, "modified_at": "2000-01-01T00:00:00"} for i in range(0, len(self.TEST_PR_REVISIONS))], "title": "get test", diff -r 3fff648ffdd4 -r 439bc130e093 kallithea/tests/fixture.py --- a/kallithea/tests/fixture.py Tue Feb 14 15:22:17 2023 +0100 +++ b/kallithea/tests/fixture.py Sun May 14 21:19:38 2023 +0200 @@ -329,6 +329,11 @@ meta.Session().commit() return csm + def add_changeset_comment(self, repo, revision, text, author=TEST_USER_ADMIN_LOGIN, f_path=None, line_no=None): + comment = ChangesetCommentsModel().create(text, repo, author, revision=revision, f_path=f_path, line_no=line_no, send_email=False) + meta.Session().commit() + return comment + def create_pullrequest(self, testcontroller, repo_name, pr_src_rev, pr_dst_rev, title='title'): org_ref = 'branch:stable:%s' % pr_src_rev other_ref = 'branch:default:%s' % pr_dst_rev diff -r 3fff648ffdd4 -r 439bc130e093 kallithea/tests/other/test_vcs_operations.py --- a/kallithea/tests/other/test_vcs_operations.py Tue Feb 14 15:22:17 2023 +0100 +++ b/kallithea/tests/other/test_vcs_operations.py Sun May 14 21:19:38 2023 +0200 @@ -150,6 +150,12 @@ testenv['LANGUAGE'] = 'en_US:en' testenv['HGPLAIN'] = '' testenv['HGRCPATH'] = '' + testenv['GIT_CONFIG_SYSTEM'] = '/dev/null' + testenv['GIT_CONFIG_GLOBAL'] = '/dev/null' + testenv['GIT_COMMITTER_NAME'] = base.TEST_USER_ADMIN_LOGIN + testenv['GIT_COMMITTER_EMAIL'] = base.TEST_USER_ADMIN_EMAIL + testenv['GIT_AUTHOR_NAME'] = base.TEST_USER_REGULAR_LOGIN + testenv['GIT_AUTHOR_EMAIL'] = base.TEST_USER_REGULAR_EMAIL testenv.update(environ) p = Popen(command, shell=True, stdout=PIPE, stderr=PIPE, cwd=self.cwd, env=testenv) stdout, stderr = p.communicate() @@ -195,8 +201,7 @@ cmd = """git commit -m "committed new %s" --author "%s" "%s" """ % ( i, author_str, added_file ) - # git commit needs EMAIL on some machines - Command(dest_dir).execute(cmd, EMAIL=email) + Command(dest_dir).execute(cmd) def _add_files_and_push(webserver, vt, dest_dir, clone_url, ignoreReturnCode=False, files_no=3): _add_files(vt.repo_type, dest_dir, files_no=files_no) @@ -618,7 +623,7 @@ # add submodule stdout, stderr = Command(base.TESTS_TMP_PATH).execute('git clone', fork_url, dest_dir) stdout, stderr = Command(dest_dir).execute('git submodule add', clone_url, 'testsubmodule') - stdout, stderr = Command(dest_dir).execute('git commit -am "added testsubmodule pointing to', clone_url, '"', EMAIL=base.TEST_USER_ADMIN_EMAIL) + stdout, stderr = Command(dest_dir).execute('git commit -am "added testsubmodule pointing to', clone_url, '"') stdout, stderr = Command(dest_dir).execute('git push', fork_url, 'master') # check for testsubmodule link in files page diff -r 3fff648ffdd4 -r 439bc130e093 scripts/dbmigrate-test --- a/scripts/dbmigrate-test Tue Feb 14 15:22:17 2023 +0100 +++ b/scripts/dbmigrate-test Sun May 14 21:19:38 2023 +0200 @@ -94,7 +94,7 @@ ( cd "$prefix" . "$prefix-env/bin/activate" - pip install --quiet --upgrade pip setuptools mercurial $EXTRA + pip install --quiet --upgrade pip "setuptools<67" mercurial $EXTRA pip install --quiet -e . ) } diff -r 3fff648ffdd4 -r 439bc130e093 scripts/validate-commits --- a/scripts/validate-commits Tue Feb 14 15:22:17 2023 +0100 +++ b/scripts/validate-commits Sun May 14 21:19:38 2023 +0200 @@ -42,7 +42,7 @@ cleanup python3 -m venv "$venv" source "$venv/bin/activate" - pip install --upgrade pip setuptools + pip install --upgrade pip "setuptools<67" pip install -e . -r dev_requirements.txt python-ldap python-pam # run-all-cleanup diff -r 3fff648ffdd4 -r 439bc130e093 scripts/validate-minimum-dependency-versions --- a/scripts/validate-minimum-dependency-versions Tue Feb 14 15:22:17 2023 +0100 +++ b/scripts/validate-minimum-dependency-versions Sun May 14 21:19:38 2023 +0200 @@ -30,7 +30,7 @@ python3 -m venv "$venv" source "$venv/bin/activate" -pip install --upgrade pip setuptools +pip install --upgrade pip "setuptools<67" pip install -e . -r "$min_requirements" python-ldap python-pam 2> >(tee "$log" >&2) # Treat any message on stderr as a problem, for the caller to interpret. diff -r 3fff648ffdd4 -r 439bc130e093 setup.py --- a/setup.py Tue Feb 14 15:22:17 2023 +0100 +++ b/setup.py Sun May 14 21:19:38 2023 +0200 @@ -75,6 +75,8 @@ "pip >= 20.0, < 999", "chardet >= 3", ] +if sys.version_info < (3, 8): + requirements.append("importlib-metadata < 5") dependency_links = [ ]