locking.rst
41 lines
| 1.3 KiB
| text/x-rst
|
RstLexer
r2726 | .. _locking: | |||
=================================== | ||||
RhodeCode repository locking system | ||||
=================================== | ||||
r3224 | | Repos with **locking function=disabled** is the default, that's how repos work | |||
r2726 | today. | |||
| Repos with **locking function=enabled** behaves like follows: | ||||
Repos have a state called `locked` that can be true or false. | ||||
r3224 | The hg/git commands `hg/git clone`, `hg/git pull`, and `hg/git push` | |||
r2726 | influence this state: | |||
r3224 | - The command `hg/git pull <repo>` will lock that repo (locked=true) | |||
r2726 | if the user has write/admin permissions on this repo | |||
r3224 | - The command `hg/git clone <repo>` will lock that repo (locked=true) if the | |||
r2726 | user has write/admin permissions on this repo | |||
RhodeCode will remember the user id who locked the repo | ||||
r3224 | only this specific user can unlock the repo (locked=false) by calling | |||
r2726 | ||||
r3224 | - `hg/git push <repo>` | |||
r2726 | ||||
r3224 | every other command on that repo from this user and | |||
r2726 | every command from any other user will result in http return code 423 (locked) | |||
r3224 | additionally the http error includes the <user> that locked the repo | |||
r2726 | (e.g. “repository <repo> locked by user <user>”) | |||
r3224 | So the scenario of use for repos with `locking function` enabled is that | |||
r2726 | every initial clone and every pull gives users (with write permission) | |||
the exclusive right to do a push. | ||||
r3224 | Each repo can be manually unlocked by admin from the repo settings menu. | |||