--- a/doc/PLAN Fri Mar 06 12:51:07 2009 +0000
+++ b/doc/PLAN Fri Mar 06 13:03:46 2009 +0000
@@ -7,10 +7,10 @@
- reduce hg-ssh-wrapper to nothing by moving all functionality into hg-ssh
- same for refresh-auth
- move most of do-refresh-auth into a module
+- give that module a hook, and call the hook instead of the exe
Todo:
-- give that module a hook, and call the hook instead of the exe
- abolish refresh-auth shell script and rename do-refresh-auth to refresh-auth
- replace env vars with Python globals
- change refresh-auth to refer to hg-ssh directly, abolish hg-ssh-wrapper
--- a/src/init/conf/remote-hgrc Fri Mar 06 12:51:07 2009 +0000
+++ b/src/init/conf/remote-hgrc Fri Mar 06 13:03:46 2009 +0000
@@ -1,9 +1,5 @@
# hgrc to use for all remote users
-#[extensions]
-#access = /usr/local/lib/mercurial-server/mercurialserver/access.py
-#servelog = /usr/local/lib/mercurial-server/servelog.py
-
[hooks]
pretxnchangegroup.access = python:mercurialserver.access.hook
changegroup.aaaaa_servelog = python:mercurialserver.servelog.hook
--- a/src/init/hgadmin-hgrc Fri Mar 06 12:51:07 2009 +0000
+++ b/src/init/hgadmin-hgrc Fri Mar 06 13:03:46 2009 +0000
@@ -4,4 +4,4 @@
[hooks]
changegroup.aaaab_update = hg update -C default > /dev/null
changegroup.aaaac_purge = hg purge --all > /dev/null
-changegroup.refreshauth = /etc/mercurial-server/refresh-auth
+changegroup.refreshauth = python:mercurialserver.refreshauth.hook
--- a/src/mercurialserver/refreshauth.py Fri Mar 06 12:51:07 2009 +0000
+++ b/src/mercurialserver/refreshauth.py Fri Mar 06 13:03:46 2009 +0000
@@ -66,3 +66,7 @@
akeys.close()
os.rename(akeyfile + "_new", akeyfile)
+
+def hook(ui, repo, hooktype, node=None, source=None, **kwargs):
+ refreshAuth()
+