Mercurial > kallithea
annotate docs/usage/locking.rst @ 5979:0bb4fa32a75a
tests: Mercurial hooks must use ui.status for messages sent to the client
Mercurial changed so sys.stdout and sys.stderr now are intercepted instead of
being sent to the client. That caused a regression that
manual_test_vcs_operations.py test_push_new_file_hg caught - we no longer
reported 'Repository size' to the user.
The issue was introduced by a Mercurial change, but the fix is backwards
compatible with Mercurial 2.9.
The fix is to use ui.status everywhere. ui is a Mercurial thing, but
handle_git_receive also creates a ui object for Git hooks so ui.status can be
used there too.
author | domruf <dominikruf@gmail.com> |
---|---|
date | Tue, 03 May 2016 00:12:55 +0200 |
parents | 5ae8e644aa88 |
children |
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 |
4973
8d065db04909
docs/usage: rework section 'repository locking'
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
4955
diff
changeset
|
3 ================== |
8d065db04909
docs/usage: rework section 'repository locking'
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
4955
diff
changeset
|
4 Repository locking |
8d065db04909
docs/usage: rework section 'repository locking'
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
4955
diff
changeset
|
5 ================== |
2726
aa17c7a1b8a5
Implemented basic locking functionality.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
6 |
5425
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
4973
diff
changeset
|
7 Kallithea has a *repository locking* feature, disabled by default. When |
4973
8d065db04909
docs/usage: rework section 'repository locking'
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
4955
diff
changeset
|
8 enabled, every initial clone and every pull gives users (with write permission) |
4902 | 9 the exclusive right to do a push. |
10 | |
5425
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
4973
diff
changeset
|
11 When repository locking is enabled, repositories get a ``locked`` flag. |
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
4973
diff
changeset
|
12 The hg/git commands ``hg/git clone``, ``hg/git pull``, |
4973
8d065db04909
docs/usage: rework section 'repository locking'
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
4955
diff
changeset
|
13 and ``hg/git push`` influence this state: |
2726
aa17c7a1b8a5
Implemented basic locking functionality.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
14 |
5425
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
4973
diff
changeset
|
15 - A ``clone`` or ``pull`` action locks the target repository |
4973
8d065db04909
docs/usage: rework section 'repository locking'
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
4955
diff
changeset
|
16 if the user has write/admin permissions on this repository. |
2726
aa17c7a1b8a5
Implemented basic locking functionality.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
17 |
4973
8d065db04909
docs/usage: rework section 'repository locking'
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
4955
diff
changeset
|
18 - Kallithea will remember the user who locked the repository so only this |
5425
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
4973
diff
changeset
|
19 specific user can unlock the repo by performing a ``push`` |
4973
8d065db04909
docs/usage: rework section 'repository locking'
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
4955
diff
changeset
|
20 command. |
2726
aa17c7a1b8a5
Implemented basic locking functionality.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
21 |
4973
8d065db04909
docs/usage: rework section 'repository locking'
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
4955
diff
changeset
|
22 - Every other command on a locked repository from this user and every command |
8d065db04909
docs/usage: rework section 'repository locking'
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
4955
diff
changeset
|
23 from any other user will result in an HTTP return code 423 (Locked). |
5425
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
4973
diff
changeset
|
24 Additionally, the HTTP error will mention the user that locked the repository |
4973
8d065db04909
docs/usage: rework section 'repository locking'
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
4955
diff
changeset
|
25 (e.g., “repository <repo> locked by user <user>”). |
2726
aa17c7a1b8a5
Implemented basic locking functionality.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
26 |
4973
8d065db04909
docs/usage: rework section 'repository locking'
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
4955
diff
changeset
|
27 Each repository can be manually unlocked by an administrator from the |
8d065db04909
docs/usage: rework section 'repository locking'
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
4955
diff
changeset
|
28 repository settings menu. |