# HG changeset patch # User Paul Crowley # Date 1315303351 -3600 # Node ID 3cbde66305e47aece61daac2306b3a07edbda998 # Parent 38c222727017f1eeef74781fd98390fc31abaf2a Fix white space diff -r 38c222727017 -r 3cbde66305e4 NEWS --- a/NEWS Tue Sep 06 11:00:24 2011 +0100 +++ b/NEWS Tue Sep 06 11:02:31 2011 +0100 @@ -40,7 +40,7 @@ * Belatedly added NEWS file :-) Upgrading: move the paths/hgrc entry in .mercurial-server to env/HGRCPATH, -and add an entry under paths that reads +and add an entry under paths that reads "authorized_keys = ~/.ssh/authorized_keys" ==================== @@ -89,4 +89,3 @@ ==================== * First numbered release - diff -r 38c222727017 -r 3cbde66305e4 README --- a/README Tue Sep 06 11:00:24 2011 +0100 +++ b/README Tue Sep 06 11:02:31 2011 +0100 @@ -2,7 +2,7 @@ mercurial-server gives your developers remote read/write access to centralized Mercurial repositories using SSH public key authentication; it -provides convenient and fine-grained key management and access control. +provides convenient and fine-grained key management and access control. http://www.lshift.net/mercurial-server.html @@ -25,7 +25,7 @@ Though mercurial-server is currently targeted at Debian-based systems such as Ubuntu, other users have reported success getting it running on other Unix-based systems such as Red Hat. Running it on a non-Unix system such as -Windows is not supported. You will need root privileges to install it. +Windows is not supported. You will need root privileges to install it. The best way to install mercurial-server is using your package management system - there are pre-built .deb files on the website. However, there is @@ -41,4 +41,3 @@ See doc/manual.docbook for the rest of the documentation. Paul Crowley, paul@lshift.net, 2010 - diff -r 38c222727017 -r 3cbde66305e4 dev/chroot-test/action/go --- a/dev/chroot-test/action/go Tue Sep 06 11:00:24 2011 +0100 +++ b/dev/chroot-test/action/go Tue Sep 06 11:02:31 2011 +0100 @@ -33,4 +33,3 @@ /etc/init.d/ssh stop #touch results - diff -r 38c222727017 -r 3cbde66305e4 dev/chroot-test/action/install-installables --- a/dev/chroot-test/action/install-installables Tue Sep 06 11:00:24 2011 +0100 +++ b/dev/chroot-test/action/install-installables Tue Sep 06 11:02:31 2011 +0100 @@ -1,6 +1,5 @@ aptitude --allow-untrusted --quiet --without-recommends --assume-yes install \ make mercurial xsltproc docbook-xsl openssh-server \ - python python-support adduser + python python-support adduser cd mercurial-server make setup-adduser - diff -r 38c222727017 -r 3cbde66305e4 dev/chroot-test/copy-installables --- a/dev/chroot-test/copy-installables Tue Sep 06 11:00:24 2011 +0100 +++ b/dev/chroot-test/copy-installables Tue Sep 06 11:02:31 2011 +0100 @@ -1,4 +1,3 @@ hg st -mac0n -X '.hg*' -X 'dev/**' \ | cpio -p -0 -d $BACKING/action/mercurial-server - diff -r 38c222727017 -r 3cbde66305e4 dev/chroot-test/run-test --- a/dev/chroot-test/run-test Tue Sep 06 11:00:24 2011 +0100 +++ b/dev/chroot-test/run-test Tue Sep 06 11:02:31 2011 +0100 @@ -61,4 +61,3 @@ chroot $MOUNT ./action/go echo "Completed successfully" - diff -r 38c222727017 -r 3cbde66305e4 doc/manual.docbook --- a/doc/manual.docbook Tue Sep 06 11:00:24 2011 +0100 +++ b/doc/manual.docbook Tue Sep 06 11:02:31 2011 +0100 @@ -45,7 +45,7 @@ spoon and you have installed mercurial-server on jeeves using the package management system (see the README for more on installation). We assume that you have created your SSH public key, set up your SSH agent with this key, and that this key gives you access to jeeves. +class="systemname">jeeves. jay@spoon:~$ ssh -A jeeves jay@jeeves:~$ ssh-add -L > my-key @@ -532,4 +532,3 @@ - diff -r 38c222727017 -r 3cbde66305e4 setup.py --- a/setup.py Tue Sep 06 11:00:24 2011 +0100 +++ b/setup.py Tue Sep 06 11:02:31 2011 +0100 @@ -14,10 +14,9 @@ scripts = ['src/hg-ssh', 'src/refresh-auth'], data_files = [ ('init', [ - 'src/init/hginit', - 'src/init/dot-mercurial-server', + 'src/init/hginit', + 'src/init/dot-mercurial-server', 'src/init/hgadmin-hgrc' ]), ], ) - diff -r 38c222727017 -r 3cbde66305e4 src/init/conf/remote-hgrc.d/access.rc --- a/src/init/conf/remote-hgrc.d/access.rc Tue Sep 06 11:00:24 2011 +0100 +++ b/src/init/conf/remote-hgrc.d/access.rc Tue Sep 06 11:02:31 2011 +0100 @@ -2,4 +2,3 @@ [hooks] pretxnchangegroup.access = python:mercurialserver.access.hook - diff -r 38c222727017 -r 3cbde66305e4 src/init/hginit --- a/src/init/hginit Tue Sep 06 11:00:24 2011 +0100 +++ b/src/init/hginit Tue Sep 06 11:02:31 2011 +0100 @@ -14,4 +14,3 @@ cd repos/hgadmin hg init . cp $1/init/hgadmin-hgrc .hg/hgrc - diff -r 38c222727017 -r 3cbde66305e4 src/mercurialserver/access.py --- a/src/mercurialserver/access.py Tue Sep 06 11:00:24 2011 +0100 +++ b/src/mercurialserver/access.py Tue Sep 06 11:02:31 2011 +0100 @@ -25,4 +25,3 @@ if not allow(ctx): raise mercurial.util.Abort(_('%s: access denied for changeset %s') % (__name__, mercurial.node.short(ctx.node()))) - diff -r 38c222727017 -r 3cbde66305e4 src/mercurialserver/refreshauth.py --- a/src/mercurialserver/refreshauth.py Tue Sep 06 11:00:24 2011 +0100 +++ b/src/mercurialserver/refreshauth.py Tue Sep 06 11:02:31 2011 +0100 @@ -39,7 +39,7 @@ if not goodkey.match(keyname): # Encode it for safe quoting keyname = "--base64 " + base64.b64encode(keyname) - p = subprocess.Popen(("ssh-keygen", "-i", "-f", ffn), + p = subprocess.Popen(("ssh-keygen", "-i", "-f", ffn), stdout=subprocess.PIPE, stderr=subprocess.PIPE) newkey = p.communicate()[0] if p.wait() == 0: @@ -57,7 +57,6 @@ akeys.close() os.chmod(akeyfile + "_new", stat.S_IRUSR) os.rename(akeyfile + "_new", akeyfile) - + def hook(ui, repo, hooktype, node=None, source=None, **kwargs): refreshAuth() - diff -r 38c222727017 -r 3cbde66305e4 src/mercurialserver/ruleset.py --- a/src/mercurialserver/ruleset.py Tue Sep 06 11:00:24 2011 +0100 +++ b/src/mercurialserver/ruleset.py Tue Sep 06 11:02:31 2011 +0100 @@ -35,7 +35,7 @@ class Ruleset(object): '''Class representing the rules in a rule file''' - + levels = ["init", "write", "read", "deny"] def __init__(self): @@ -44,7 +44,7 @@ def set(self, **kw): self.preset.update(kw) - + def get(self, k): return self.preset.get(k, None) @@ -62,7 +62,7 @@ if a <= levelindex: return True return False - + def readfile(self, fn): f = open(fn) try: @@ -76,10 +76,9 @@ ix = self.levels.index(l[0]) else: ix = len(self.levels) - self.rules.append((ix, + self.rules.append((ix, rule([c.split("=", 1) for c in l[1:]]))) finally: f.close() rules = Ruleset() - diff -r 38c222727017 -r 3cbde66305e4 src/mercurialserver/servelog.py --- a/src/mercurialserver/servelog.py Tue Sep 06 11:00:24 2011 +0100 +++ b/src/mercurialserver/servelog.py Tue Sep 06 11:02:31 2011 +0100 @@ -10,10 +10,10 @@ import time import fcntl -try: +try: import json json.log -except ImportError: +except ImportError: import simplejson as json from mercurialserver import ruleset, changes @@ -41,4 +41,3 @@ ))) finally: log.close() -