Show More
@@ -1,38 +1,28 b'' | |||
|
1 | 1 | .. _locking: |
|
2 | 2 | |
|
3 |
================== |
|
|
4 |
|
|
|
5 |
================== |
|
|
3 | ================== | |
|
4 | Repository locking | |
|
5 | ================== | |
|
6 | 6 | |
|
7 | ||
|
8 | The scenario for repos with `locking function` enabled is that | |
|
9 | every initial clone and every pull gives users (with write permission) | |
|
7 | Kallithea has a ``repository locking`` feature, disabled by default. When | |
|
8 | enabled, every initial clone and every pull gives users (with write permission) | |
|
10 | 9 | the exclusive right to do a push. |
|
11 | 10 | |
|
12 | Each repo can be manually unlocked by an admin from the repo settings menu. | |
|
13 | ||
|
14 | | Repos with **locking function=disabled** is the default, that's how repos work | |
|
15 | today. | |
|
16 | | Repos with **locking function=enabled** behaves like follows: | |
|
11 | When repository locking is enabled, repositories get a ``locked`` state that | |
|
12 | can be true or false. The hg/git commands ``hg/git clone``, ``hg/git pull``, | |
|
13 | and ``hg/git push`` influence this state: | |
|
17 | 14 | |
|
18 | Repos have a state called ``locked`` that can be true or false. | |
|
19 | The hg/git commands ``hg/git clone``, ``hg/git pull``, and ``hg/git push`` | |
|
20 | influence this state: | |
|
21 | ||
|
22 | - The command ``hg/git pull <repo>`` will lock that repo (``locked=true``) | |
|
23 | if the user has write/admin permissions on this repo | |
|
15 | - A ``clone`` or ``pull`` action on the repository locks it (``locked=true``) | |
|
16 | if the user has write/admin permissions on this repository. | |
|
24 | 17 | |
|
25 | - The command ``hg/git clone <repo>`` will lock that repo (``locked=true``) if the | |
|
26 | user has write/admin permissions on this repo | |
|
27 | ||
|
28 | ||
|
29 | Kallithea will remember the user who locked the repo so | |
|
30 | only this specific user can unlock the repo (``locked=false``) by calling | |
|
18 | - Kallithea will remember the user who locked the repository so only this | |
|
19 | specific user can unlock the repo (``locked=false``) by performing a ``push`` | |
|
20 | command. | |
|
31 | 21 | |
|
32 | - ``hg/git push <repo>`` | |
|
22 | - Every other command on a locked repository from this user and every command | |
|
23 | from any other user will result in an HTTP return code 423 (Locked). | |
|
24 | Additionally, the HTTP error includes the <user> that locked the repository | |
|
25 | (e.g., “repository <repo> locked by user <user>”). | |
|
33 | 26 | |
|
34 | Every other command on that repo from this user and | |
|
35 | every command from any other user will result in an http return code 423 (locked). | |
|
36 | ||
|
37 | Additionally, the http error includes the <user> that locked the repo | |
|
38 | (e.g., “repository <repo> locked by user <user>”). | |
|
27 | Each repository can be manually unlocked by an administrator from the | |
|
28 | repository settings menu. |
General Comments 0
You need to be logged in to leave comments.
Login now