diff -r e8c4f88126c1 -r f06d9816272d doc/manual.docbook
--- a/doc/manual.docbook Wed Sep 14 13:11:25 2011 +0100
+++ b/doc/manual.docbook Tue Sep 27 16:48:55 2011 +0100
@@ -4,7 +4,7 @@
Sharing Mercurial repositories with mercurial-server
PaulCrowley
- 2008-2010Paul Crowley, LShift Ltd
+ 2008-2011Paul Crowley, LShift Ltd
About mercurial-server
@@ -65,19 +65,24 @@
To store a repository on the server, clone it over.
-jay@spoon:~$ cd myproj
+jay@spoon:~$ hg init myproj
+jay@spoon:~$ cd myproj
+jay@spoon:~/myproj$ editor program.c ...create project files here...
+jay@spoon:~/myproj$ hg add
+adding program.c
+jay@spoon:~/myproj$ hg commit -m "Initial checkin"
jay@spoon:~/myproj$ hg clone . ssh://hg@jeeves/jays/project
searching for changes
remote: adding changesets
remote: adding manifests
remote: adding file changes
-remote: added 119 changesets with 284 changes to 61 files
+remote: added 1 changesets with 1 changes to 1 files
jay@spoon:~/myproj$ hg pull ssh://hg@jeeves/jays/project
pulling from ssh://hg@jeeves/jays/project
searching for changes
no changes found
-jay@spoon:~/myproj$ cd ..
-jay@spoon:~$
+jay@spoon:~/myproj$ cd ..
+jay@spoon:~$
Adding other users
@@ -154,6 +159,13 @@
class='directory'>widget repository as soon as we add, commit, and push these files.
+Placing the same key in multiple directories will not
+grant that user multiple powers. One of the locations will be used for
+all permission checks, while any others will be ignored. Instead, put each
+key under the keys directory only once, and use
+access.conf to give permissions to the key.
+
+
Each line of access.conf has the following syntax:
rule condition condition...
@@ -499,6 +511,81 @@
By creating such a file with suitable entries, you can run mercurial-server as a user other than hg, or install it without root privileges; however I strongly recommend that if you need to do this, you use a user account that is used for no other purpose, and take the time to thoroughly understand how mercurial-server works before you attempt it.
+
+At install time the following ~hg/.mercurial-server file is used:
+
+# WARNING: a .mercurial-server file in your home directory means
+# that refresh-auth can and will trash your ~/.ssh/authorized_keys file.
+
+[paths]
+repos = ~/repos
+authorized_keys = ~/.ssh/authorized_keys
+keys = /etc/mercurial-server/keys:~/repos/hgadmin/keys
+access = /etc/mercurial-server/access.conf:~/repos/hgadmin/access.conf
+
+[exceptions]
+# Allow the creation of mq repositories by default
+allowdots = .hg/patches
+
+[env]
+# Use a different hgrc for remote pulls - this way you can set
+# up access.py for everything at once without affecting local operations
+
+HGRCPATH = /etc/mercurial-server/remote-hgrc.d
+
+
+The meaning of the entries are:
+
+
+
+[paths]
+
+
+repos: directory under which all repositories are
+found. No remote user can reference any repo not under this directory.
+Here and throughout this section, where a path begins with
+~/ the home directory is substituted - ie the
+directory in which the .mercurial-server file
+was found.
+
+
+authorized_keys: this is the file that will be rewritten
+by refresh-auth, or whenever a checkin to the hgadmin repository is pushed.
+
+
+keys: directories to scan for keys when rewriting
+authorized_keys.
+
+
+access: files to read to determine the access rules.
+The files are effectively concatenated together in the order given.
+
+
+
+
+[exceptions]
+
+
+allowdots: paths to allow even though they
+begin with dots. Dots at the start of a pathname component are
+disallowed unless they exactly match one of the tails given in this
+colon-separated list. The given exception allows MQ repositories
+to be pushed.
+
+
+
+
+[env]: all entries in here are added to the Unix environment
+when users connect. The keys are converted to all-upper-case.
+
+
+HGRCPATH: set the path that Mercurial uses to search for
+configuration files. At install time config files are placed on this path
+which set up access control and logging.
+
+
+
+
License
@@ -527,7 +614,7 @@
it.
-Paul Crowley, paul@lshift.net, 2010
+Paul Crowley, paul@lshift.net, 2011