Mercurial > kallithea
comparison docs/api/api.rst @ 7672:99edd97366e3
locking: drop the pull-to-lock / push-to-unlock functionality
The feature is not worth the maintenance cost. The locking is too coarse and
unflexible with insufficient UI and UX. The implementation is also quite
invasive in tricky areas of the code, and thus high maintenance.
Dropping this will enable other cleanup ... or at least make it easier.
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Wed, 16 Jan 2019 02:32:35 +0100 |
parents | b3289fef0daa |
children | 0e3e0864f210 |
comparison
equal
deleted
inserted
replaced
7671:b8f77a47d485 | 7672:99edd97366e3 |
---|---|
158 | 158 |
159 OUTPUT:: | 159 OUTPUT:: |
160 | 160 |
161 id : <id_given_in_input> | 161 id : <id_given_in_input> |
162 result : "Caches of repository `<reponame>`" | 162 result : "Caches of repository `<reponame>`" |
163 error : null | |
164 | |
165 lock | |
166 ^^^^ | |
167 | |
168 Set the locking state on the given repository by the given user. | |
169 If the param ``userid`` is skipped, it is set to the ID of the user who is calling this method. | |
170 If param ``locked`` is skipped, the current lock state of the repository is returned. | |
171 This command can only be executed using the api_key of a user with admin rights, or that of a regular user with admin or write access to the repository. | |
172 | |
173 INPUT:: | |
174 | |
175 id : <id_for_response> | |
176 api_key : "<api_key>" | |
177 method : "lock" | |
178 args : { | |
179 "repoid" : "<reponame or repo_id>" | |
180 "userid" : "<user_id or username = Optional(=apiuser)>", | |
181 "locked" : "<bool true|false = Optional(=None)>" | |
182 } | |
183 | |
184 OUTPUT:: | |
185 | |
186 id : <id_given_in_input> | |
187 result : { | |
188 "repo": "<reponame>", | |
189 "locked": "<bool true|false>", | |
190 "locked_since": "<float lock_time>", | |
191 "locked_by": "<username>", | |
192 "msg": "User `<username>` set lock state for repo `<reponame>` to `<false|true>`" | |
193 } | |
194 error : null | 163 error : null |
195 | 164 |
196 get_ip | 165 get_ip |
197 ^^^^^^ | 166 ^^^^^^ |
198 | 167 |
599 "repo_id" : "<repo_id>", | 568 "repo_id" : "<repo_id>", |
600 "repo_name" : "<reponame>" | 569 "repo_name" : "<reponame>" |
601 "repo_type" : "<repo_type>", | 570 "repo_type" : "<repo_type>", |
602 "clone_uri" : "<clone_uri>", | 571 "clone_uri" : "<clone_uri>", |
603 "enable_downloads": "<bool>", | 572 "enable_downloads": "<bool>", |
604 "enable_locking": "<bool>", | |
605 "enable_statistics": "<bool>", | 573 "enable_statistics": "<bool>", |
606 "private": "<bool>", | 574 "private": "<bool>", |
607 "created_on" : "<date_time_created>", | 575 "created_on" : "<date_time_created>", |
608 "description" : "<description>", | 576 "description" : "<description>", |
609 "landing_rev": "<landing_rev>", | 577 "landing_rev": "<landing_rev>", |
753 "description" : "<description>", | 721 "description" : "<description>", |
754 "landing_rev": "<landing_rev>", | 722 "landing_rev": "<landing_rev>", |
755 "owner": "<repo_owner>", | 723 "owner": "<repo_owner>", |
756 "fork_of": "<name_of_fork_parent>", | 724 "fork_of": "<name_of_fork_parent>", |
757 "enable_downloads": "<bool>", | 725 "enable_downloads": "<bool>", |
758 "enable_locking": "<bool>", | |
759 "enable_statistics": "<bool>", | 726 "enable_statistics": "<bool>", |
760 }, | 727 }, |
761 … | 728 … |
762 ] | 729 ] |
763 error: null | 730 error: null |
818 "description" : "<description> = Optional('')", | 785 "description" : "<description> = Optional('')", |
819 "private" : "<bool> = Optional(False)", | 786 "private" : "<bool> = Optional(False)", |
820 "clone_uri" : "<clone_uri> = Optional(None)", | 787 "clone_uri" : "<clone_uri> = Optional(None)", |
821 "landing_rev" : "<landing_rev> = Optional('tip')", | 788 "landing_rev" : "<landing_rev> = Optional('tip')", |
822 "enable_downloads": "<bool> = Optional(False)", | 789 "enable_downloads": "<bool> = Optional(False)", |
823 "enable_locking": "<bool> = Optional(False)", | |
824 "enable_statistics": "<bool> = Optional(False)", | 790 "enable_statistics": "<bool> = Optional(False)", |
825 } | 791 } |
826 | 792 |
827 OUTPUT:: | 793 OUTPUT:: |
828 | 794 |
839 "description" : "<description>", | 805 "description" : "<description>", |
840 "landing_rev": "<landing_rev>", | 806 "landing_rev": "<landing_rev>", |
841 "owner": "<username or user_id>", | 807 "owner": "<username or user_id>", |
842 "fork_of": "<name_of_fork_parent>", | 808 "fork_of": "<name_of_fork_parent>", |
843 "enable_downloads": "<bool>", | 809 "enable_downloads": "<bool>", |
844 "enable_locking": "<bool>", | |
845 "enable_statistics": "<bool>", | 810 "enable_statistics": "<bool>", |
846 }, | 811 }, |
847 } | 812 } |
848 error: null | 813 error: null |
849 | 814 |
868 "description" : "<description> = Optional('')", | 833 "description" : "<description> = Optional('')", |
869 "private" : "<bool> = Optional(False)", | 834 "private" : "<bool> = Optional(False)", |
870 "clone_uri" : "<clone_uri> = Optional(None)", | 835 "clone_uri" : "<clone_uri> = Optional(None)", |
871 "landing_rev" : "<landing_rev> = Optional('tip')", | 836 "landing_rev" : "<landing_rev> = Optional('tip')", |
872 "enable_downloads": "<bool> = Optional(False)", | 837 "enable_downloads": "<bool> = Optional(False)", |
873 "enable_locking": "<bool> = Optional(False)", | |
874 "enable_statistics": "<bool> = Optional(False)", | 838 "enable_statistics": "<bool> = Optional(False)", |
875 } | 839 } |
876 | 840 |
877 OUTPUT:: | 841 OUTPUT:: |
878 | 842 |
889 "description" : "<description>", | 853 "description" : "<description>", |
890 "landing_rev": "<landing_rev>", | 854 "landing_rev": "<landing_rev>", |
891 "owner": "<username or user_id>", | 855 "owner": "<username or user_id>", |
892 "fork_of": "<name_of_fork_parent>", | 856 "fork_of": "<name_of_fork_parent>", |
893 "enable_downloads": "<bool>", | 857 "enable_downloads": "<bool>", |
894 "enable_locking": "<bool>", | |
895 "enable_statistics": "<bool>", | 858 "enable_statistics": "<bool>", |
896 "last_changeset": { | 859 "last_changeset": { |
897 "author": "<full_author>", | 860 "author": "<full_author>", |
898 "date": "<date_time_of_commit>", | 861 "date": "<date_time_of_commit>", |
899 "message": "<commit_message>", | 862 "message": "<commit_message>", |
900 "raw_id": "<raw_id>", | 863 "raw_id": "<raw_id>", |
901 "revision": "<numeric_revision>", | 864 "revision": "<numeric_revision>", |
902 "short_id": "<short_id>" | 865 "short_id": "<short_id>" |
903 } | 866 } |
904 "locked_by": "<username>", | |
905 "locked_date": "<float lock_time>", | |
906 }, | 867 }, |
907 } | 868 } |
908 error: null | 869 error: null |
909 | 870 |
910 fork_repo | 871 fork_repo |