--- a/src/mercurialserver/servelog.py Fri Mar 06 13:26:35 2009 +0000
+++ b/src/mercurialserver/servelog.py Fri Mar 06 13:30:37 2009 +0000
@@ -12,8 +12,8 @@
import os
import time
-from mercurialserver import changes
-
+from mercurialserver import ruleset, changes
+
def hook(ui, repo, hooktype, node=None, source=None, **kwargs):
if hooktype == 'changegroup':
op = "push"
@@ -23,7 +23,7 @@
raise mercurial.util.Abort(_('servelog installed as wrong hook type,'
' must be changegroup or outgoing but is %s') % hooktype)
t = time.strftime("%Y-%m-%d_%H:%M:%S", time.gmtime())
- user = os.environ['REMOTE_USER']
+ user = ruleset.rules.get('user')
# FIXME: lock it
log = open(repo.join("serve-log"), "a+")
try: