diff --git a/docs/api/methods/deprecated-methods.rst b/docs/api/methods/deprecated-methods.rst --- a/docs/api/methods/deprecated-methods.rst +++ b/docs/api/methods/deprecated-methods.rst @@ -38,7 +38,7 @@ changeset_comment Example error output: - .. code-block:: bash + .. code-block:: json { "id" : , diff --git a/docs/api/methods/pull-request-methods.rst b/docs/api/methods/pull-request-methods.rst --- a/docs/api/methods/pull-request-methods.rst +++ b/docs/api/methods/pull-request-methods.rst @@ -169,8 +169,14 @@ get_pull_request "commit_id": "", } }, - "shadow": { + "merge": { "clone_url": "", + "reference": + { + "name": "", + "type": "", + "commit_id": "", + } }, "author": , "reviewers": [ @@ -248,8 +254,14 @@ get_pull_requests "commit_id": "", } }, - "shadow": { + "merge": { "clone_url": "", + "reference": + { + "name": "", + "type": "", + "commit_id": "", + } }, "author": , "reviewers": [ @@ -294,7 +306,12 @@ merge_pull_request "executed": "", "failure_reason": "", "merge_commit_id": "", - "possible": "" + "possible": "", + "merge_ref": { + "commit_id": "", + "type": "", + "name": "" + } }, "error": null diff --git a/docs/api/methods/repo-group-methods.rst b/docs/api/methods/repo-group-methods.rst --- a/docs/api/methods/repo-group-methods.rst +++ b/docs/api/methods/repo-group-methods.rst @@ -6,19 +6,20 @@ repo_group methods create_repo_group ----------------- -.. py:function:: create_repo_group(apiuser, group_name, description=, owner=>, copy_permissions=) +.. py:function:: create_repo_group(apiuser, group_name, owner=>, description=, copy_permissions=) Creates a repository group. - * If the repository group name contains "/", all the required repository - groups will be created. + * If the repository group name contains "/", repository group will be + created inside a repository group or nested repository groups - For example "foo/bar/baz" will create |repo| groups "foo" and "bar" - (with "foo" as parent). It will also create the "baz" repository - with "bar" as |repo| group. + For example "foo/bar/group1" will create repository group called "group1" + inside group "foo/bar". You have to have permissions to access and + write to the last repository group ("bar" in this example) - This command can only be run using an |authtoken| with admin - permissions. + This command can only be run using an |authtoken| with at least + permissions to create repository groups, or admin permissions to + parent repository groups. :param apiuser: This is filled automatically from the |authtoken|. :type apiuser: AuthUser @@ -325,13 +326,22 @@ revoke_user_permission_from_repo_group update_repo_group ----------------- -.. py:function:: update_repo_group(apiuser, repogroupid, group_name=, description=, owner=>, parent=, enable_locking=) +.. py:function:: update_repo_group(apiuser, repogroupid, group_name=, description=, owner=>, enable_locking=) Updates repository group with the details given. This command can only be run using an |authtoken| with admin permissions. + * If the group_name name contains "/", repository group will be updated + accordingly with a repository group or nested repository groups + + For example repogroupid=group-test group_name="foo/bar/group-test" + will update repository group called "group-test" and place it + inside group "foo/bar". + You have to have permissions to access and write to the last repository + group ("bar" in this example) + :param apiuser: This is filled automatically from the |authtoken|. :type apiuser: AuthUser :param repogroupid: Set the ID of repository group. @@ -342,8 +352,6 @@ update_repo_group :type description: str :param owner: Set the |repo| group owner. :type owner: str - :param parent: Set the |repo| group parent. - :type parent: str or int :param enable_locking: Enable |repo| locking. The default is false. :type enable_locking: bool diff --git a/docs/api/methods/repo-methods.rst b/docs/api/methods/repo-methods.rst --- a/docs/api/methods/repo-methods.rst +++ b/docs/api/methods/repo-methods.rst @@ -48,7 +48,7 @@ comment_commit Example error output: - .. code-block:: bash + .. code-block:: json { "id" : , @@ -68,15 +68,16 @@ create_repo Creates a repository. - * If the repository name contains "/", all the required repository - groups will be created. + * If the repository name contains "/", repository will be created inside + a repository group or nested repository groups - For example "foo/bar/baz" will create |repo| groups "foo" and "bar" - (with "foo" as parent). It will also create the "baz" repository - with "bar" as |repo| group. + For example "foo/bar/repo1" will create |repo| called "repo1" inside + group "foo/bar". You have to have permissions to access and write to + the last repository group ("bar" in this example) This command can only be run using an |authtoken| with at least - write permissions to the |repo|. + permissions to create repositories, or write permissions to + parent repository groups. :param apiuser: This is filled automatically from the |authtoken|. :type apiuser: AuthUser @@ -88,9 +89,9 @@ create_repo :type owner: Optional(str) :param description: Set the repository description. :type description: Optional(str) - :param private: + :param private: set repository as private :type private: bool - :param clone_uri: + :param clone_uri: set clone_uri :type clone_uri: str :param landing_rev: : :type landing_rev: str @@ -164,25 +165,29 @@ delete_repo fork_repo --------- -.. py:function:: fork_repo(apiuser, repoid, fork_name, owner=>, description=, copy_permissions=, private=, landing_rev=) +.. py:function:: fork_repo(apiuser, repoid, fork_name, owner=>, description=, private=, clone_uri=, landing_rev=, copy_permissions=) Creates a fork of the specified |repo|. - * If using |RCE| with Celery this will immediately return a success - message, even though the fork will be created asynchronously. + * If the fork_name contains "/", fork will be created inside + a repository group or nested repository groups - This command can only be run using an |authtoken| with fork - permissions on the |repo|. + For example "foo/bar/fork-repo" will create fork called "fork-repo" + inside group "foo/bar". You have to have permissions to access and + write to the last repository group ("bar" in this example) + + This command can only be run using an |authtoken| with minimum + read permissions of the forked repo, create fork permissions for an user. :param apiuser: This is filled automatically from the |authtoken|. :type apiuser: AuthUser :param repoid: Set repository name or repository ID. :type repoid: str or int - :param fork_name: Set the fork name. + :param fork_name: Set the fork name, including it's repository group membership. :type fork_name: str :param owner: Set the fork owner. :type owner: str - :param description: Set the fork descripton. + :param description: Set the fork description. :type description: str :param copy_permissions: Copy permissions from parent |repo|. The default is False. @@ -923,24 +928,31 @@ strip update_repo ----------- -.. py:function:: update_repo(apiuser, repoid, name=, owner=>, group=, fork_of=, description=, private=, clone_uri=, landing_rev=, enable_statistics=, enable_locking=, enable_downloads=, fields=) +.. py:function:: update_repo(apiuser, repoid, repo_name=, owner=>, description=, private=, clone_uri=, landing_rev=, fork_of=, enable_statistics=, enable_locking=, enable_downloads=, fields=) Updates a repository with the given information. This command can only be run using an |authtoken| with at least - write permissions to the |repo|. + admin permissions to the |repo|. + + * If the repository name contains "/", repository will be updated + accordingly with a repository group or nested repository groups + + For example repoid=repo-test name="foo/bar/repo-test" will update |repo| + called "repo-test" and place it inside group "foo/bar". + You have to have permissions to access and write to the last repository + group ("bar" in this example) :param apiuser: This is filled automatically from the |authtoken|. :type apiuser: AuthUser :param repoid: repository name or repository ID. :type repoid: str or int - :param name: Update the |repo| name. - :type name: str + :param repo_name: Update the |repo| name, including the + repository group it's in. + :type repo_name: str :param owner: Set the |repo| owner. :type owner: str - :param group: Set the |repo| group the |repo| belongs to. - :type group: str - :param fork_of: Set the master |repo| name. + :param fork_of: Set the |repo| as fork of another |repo|. :type fork_of: str :param description: Update the |repo| description. :type description: str @@ -948,16 +960,13 @@ update_repo :type private: bool :param clone_uri: Update the |repo| clone URI. :type clone_uri: str - :param landing_rev: Set the |repo| landing revision. Default is - ``tip``. + :param landing_rev: Set the |repo| landing revision. Default is ``rev:tip``. :type landing_rev: str - :param enable_statistics: Enable statistics on the |repo|, - (True | False). + :param enable_statistics: Enable statistics on the |repo|, (True | False). :type enable_statistics: bool :param enable_locking: Enable |repo| locking. :type enable_locking: bool - :param enable_downloads: Enable downloads from the |repo|, - (True | False). + :param enable_downloads: Enable downloads from the |repo|, (True | False). :type enable_downloads: bool :param fields: Add extra fields to the |repo|. Use the following example format: ``field_key=field_val,field_key2=fieldval2``. diff --git a/docs/api/methods/user-methods.rst b/docs/api/methods/user-methods.rst --- a/docs/api/methods/user-methods.rst +++ b/docs/api/methods/user-methods.rst @@ -6,7 +6,7 @@ user methods create_user ----------- -.. py:function:: create_user(apiuser, username, email, password=, firstname=, lastname=, active=, admin=, extern_name=, extern_type=, force_password_change=) +.. py:function:: create_user(apiuser, username, email, password=, firstname=, lastname=, active=, admin=, extern_name=, extern_type=, force_password_change=, create_personal_repo_group=) Creates a new user and returns the new user object. @@ -39,7 +39,8 @@ create_user :param force_password_change: Force the new user to change password on next login. :type force_password_change: Optional(``True`` | ``False``) - + :param create_personal_repo_group: Create personal repo group for this user + :type create_personal_repo_group: Optional(``True`` | ``False``) Example output: .. code-block:: bash @@ -163,6 +164,7 @@ get_user "usergroup.read", "hg.repogroup.create.false", "hg.create.none", + "hg.password_reset.enabled", "hg.extern_activate.manual", "hg.create.write_on_repogroup.false", "hg.usergroup.create.false",