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