minor changes to README and script
authorHubert Plociniczak <hubert@lshift.net>
Fri, 18 Apr 2008 12:36:36 +0100
changeset 15 f3654416d178
parent 14 e7d5254cd0ca
child 16 9fac559c3d55
minor changes to README and script
README
hg-ssh
refresh-auth
--- a/README	Fri Apr 18 10:18:35 2008 +0100
+++ b/README	Fri Apr 18 12:36:36 2008 +0100
@@ -76,7 +76,7 @@
      --gecos "Mercurial repositories" hg
    sudo -u hg -H -s
    cd
-   mkdir -p admin repos/hgadmin/keys/admin
+   mkdir -p admin repos/hgadmin/keys/admin .ssh
    cd admin
    hg clone http://hg.opensource.lshift.net/hg-admin-tools
    cp hg-admin-tools/hg-ssh-wrapper ~
@@ -85,9 +85,9 @@
    echo "init admin/* *" > hg-ssh-access.conf
    cp /tmp/my-ssh-public-key keys/admin/myname
    hg add
-   hg commit
+   hg commit -m "initial commit"
    cp ~/admin/hg-admin-tools/hgadmin-hgrc .hg/hgrc
-   ../../admin/hg-admin-tools/refresh-auth
+   ../../admin/hg-admin-tools/refresh-auth ./hg-ssh-wrapper
    exit
    exit
 
--- a/hg-ssh	Fri Apr 18 10:18:35 2008 +0100
+++ b/hg-ssh	Fri Apr 18 12:36:36 2008 +0100
@@ -69,9 +69,9 @@
             if globmatch(rk, keyname) and globmatch(rp, path):
                 #logfile.write("Used rule: %s\n" % l)
                 return rule in applicable
-        return False
     finally:
         f.close()
+    return False
 
 def get_cmd(rulefile, keyname, cmd):
     if cmd.startswith('hg -R ') and cmd.endswith(' serve --stdio'):
--- a/refresh-auth	Fri Apr 18 10:18:35 2008 +0100
+++ b/refresh-auth	Fri Apr 18 12:36:36 2008 +0100
@@ -35,6 +35,7 @@
                 akeys.write("%s %s\n" % (prefix, l.strip()))
         finally:
             kf.close()
+akeys.close()
 
 os.rename(akeyfile + "_new", akeyfile)