Mercurial > kallithea
annotate docs/usage/locking.rst @ 4040:d415621fa7c5
compare: handle revisions and ancestor of empty range in _get_changesets
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Wed, 26 Jun 2013 00:20:17 +0200 |
parents | 8b8edfc25856 |
children | e73a69cb98dc |
rev | line source |
---|---|
2726
aa17c7a1b8a5
Implemented basic locking functionality.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
1 .. _locking: |
aa17c7a1b8a5
Implemented basic locking functionality.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
2 |
aa17c7a1b8a5
Implemented basic locking functionality.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
3 =================================== |
aa17c7a1b8a5
Implemented basic locking functionality.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
4 RhodeCode repository locking system |
aa17c7a1b8a5
Implemented basic locking functionality.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
5 =================================== |
aa17c7a1b8a5
Implemented basic locking functionality.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
6 |
aa17c7a1b8a5
Implemented basic locking functionality.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
7 |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2726
diff
changeset
|
8 | Repos with **locking function=disabled** is the default, that's how repos work |
2726
aa17c7a1b8a5
Implemented basic locking functionality.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
9 today. |
aa17c7a1b8a5
Implemented basic locking functionality.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
10 | Repos with **locking function=enabled** behaves like follows: |
aa17c7a1b8a5
Implemented basic locking functionality.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
11 |
aa17c7a1b8a5
Implemented basic locking functionality.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
12 Repos have a state called `locked` that can be true or false. |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2726
diff
changeset
|
13 The hg/git commands `hg/git clone`, `hg/git pull`, and `hg/git push` |
2726
aa17c7a1b8a5
Implemented basic locking functionality.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
14 influence this state: |
aa17c7a1b8a5
Implemented basic locking functionality.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
15 |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2726
diff
changeset
|
16 - The command `hg/git pull <repo>` will lock that repo (locked=true) |
2726
aa17c7a1b8a5
Implemented basic locking functionality.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
17 if the user has write/admin permissions on this repo |
aa17c7a1b8a5
Implemented basic locking functionality.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
18 |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2726
diff
changeset
|
19 - The command `hg/git clone <repo>` will lock that repo (locked=true) if the |
2726
aa17c7a1b8a5
Implemented basic locking functionality.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
20 user has write/admin permissions on this repo |
aa17c7a1b8a5
Implemented basic locking functionality.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
21 |
aa17c7a1b8a5
Implemented basic locking functionality.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
22 |
aa17c7a1b8a5
Implemented basic locking functionality.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
23 RhodeCode will remember the user id who locked the repo |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2726
diff
changeset
|
24 only this specific user can unlock the repo (locked=false) by calling |
2726
aa17c7a1b8a5
Implemented basic locking functionality.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
25 |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2726
diff
changeset
|
26 - `hg/git push <repo>` |
2726
aa17c7a1b8a5
Implemented basic locking functionality.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
27 |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2726
diff
changeset
|
28 every other command on that repo from this user and |
2726
aa17c7a1b8a5
Implemented basic locking functionality.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
29 every command from any other user will result in http return code 423 (locked) |
aa17c7a1b8a5
Implemented basic locking functionality.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
30 |
aa17c7a1b8a5
Implemented basic locking functionality.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
31 |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2726
diff
changeset
|
32 additionally the http error includes the <user> that locked the repo |
2726
aa17c7a1b8a5
Implemented basic locking functionality.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
33 (e.g. “repository <repo> locked by user <user>”) |
aa17c7a1b8a5
Implemented basic locking functionality.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
34 |
aa17c7a1b8a5
Implemented basic locking functionality.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
35 |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2726
diff
changeset
|
36 So the scenario of use for repos with `locking function` enabled is that |
2726
aa17c7a1b8a5
Implemented basic locking functionality.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
37 every initial clone and every pull gives users (with write permission) |
aa17c7a1b8a5
Implemented basic locking functionality.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
38 the exclusive right to do a push. |
aa17c7a1b8a5
Implemented basic locking functionality.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
39 |
aa17c7a1b8a5
Implemented basic locking functionality.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
40 |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2726
diff
changeset
|
41 Each repo can be manually unlocked by admin from the repo settings menu. |