# HG changeset patch # User Paul Crowley # Date 1236344796 0 # Node ID e6a35b0f853cef89b58c47a169c98148ce794805 # Parent 5af89523a9d3f14b1d059f8f5cbb14a74d623396 Abolish wrapper around refresh-auth diff -r 5af89523a9d3 -r e6a35b0f853c doc/PLAN --- a/doc/PLAN Fri Mar 06 13:03:46 2009 +0000 +++ b/doc/PLAN Fri Mar 06 13:06:36 2009 +0000 @@ -8,10 +8,10 @@ - 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 +- abolish refresh-auth shell script and rename do-refresh-auth to refresh-auth Todo: -- 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 - add comment check and -f flag to refresh-auth diff -r 5af89523a9d3 -r e6a35b0f853c install --- a/install Fri Mar 06 13:03:46 2009 +0000 +++ b/install Fri Mar 06 13:06:36 2009 +0000 @@ -5,7 +5,7 @@ install -o root -g root -d /usr/local/lib/mercurial-server install -o root -g root -t /usr/local/lib/mercurial-server \ src/hg-ssh \ - src/do-refresh-auth + src/refresh-auth install -o root -g root -d /usr/local/lib/mercurial-server/mercurialserver install -o root -g root -t /usr/local/lib/mercurial-server/mercurialserver -m 644 \ src/mercurialserver/__init__.py \ @@ -22,8 +22,7 @@ src/init/hgadmin-hgrc install -o root -g root -d /etc/mercurial-server install -o root -g root -t /etc/mercurial-server \ - src/init/conf/hg-ssh-wrapper \ - src/init/conf/refresh-auth + src/init/conf/hg-ssh-wrapper install -o root -g root -t /etc/mercurial-server -m 644 \ src/init/conf/remote-hgrc \ src/init/conf/access.conf diff -r 5af89523a9d3 -r e6a35b0f853c src/do-refresh-auth --- a/src/do-refresh-auth Fri Mar 06 13:03:46 2009 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,16 +0,0 @@ -#!/usr/bin/env python -# Copyright 2008-2009 LShift Ltd - -# WARNING -# This script completely destroys your ~/.ssh/authorized_keys -# file every time it is run -# WARNING - -import sys -from mercurialserver import refreshauth - -if len(sys.argv) != 1: - sys.stderr.write("refresh-auth: must be called with no arguments (%s)\n" % sys.argv) - sys.exit(-1) - -refreshauth.refreshAuth() diff -r 5af89523a9d3 -r e6a35b0f853c src/init/conf/refresh-auth --- a/src/init/conf/refresh-auth Fri Mar 06 13:03:46 2009 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ -#!/bin/sh -# Copyright 2008-2009 LShift Ltd - -# This file should live in /etc/mercurial-server. - -exec /usr/local/lib/mercurial-server/do-refresh-auth - diff -r 5af89523a9d3 -r e6a35b0f853c src/refresh-auth --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/refresh-auth Fri Mar 06 13:06:36 2009 +0000 @@ -0,0 +1,16 @@ +#!/usr/bin/env python +# Copyright 2008-2009 LShift Ltd + +# WARNING +# This script completely destroys your ~/.ssh/authorized_keys +# file every time it is run +# WARNING + +import sys +from mercurialserver import refreshauth + +if len(sys.argv) != 1: + sys.stderr.write("refresh-auth: must be called with no arguments (%s)\n" % sys.argv) + sys.exit(-1) + +refreshauth.refreshAuth()