annotate docs/usage/locking.rst @ 4845:3a3ec35466e7

templates: move site branding in page title to base template Instead of repeating the same three lines in each and every template, move it to the base template.
author Thomas De Schampheleire <thomas.de_schampheleire@alcatel-lucent.com>
date Mon, 23 Feb 2015 22:11:38 +0100
parents e73a69cb98dc
children 03bbd33bc084
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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 ===================================
4192
e73a69cb98dc Rename some strings examples and commands in documentation
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 3224
diff changeset
4 Kallithea repository locking system
2726
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
4192
e73a69cb98dc Rename some strings examples and commands in documentation
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 3224
diff changeset
23 Kallithea 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.