src/logging.py
changeset 56 9ea9a30cd060
parent 55 2661b21688d4
equal deleted inserted replaced
55:2661b21688d4 56:9ea9a30cd060
    23         raise mercurial.util.Abort(_('logging installed as wrong hook type,'
    23         raise mercurial.util.Abort(_('logging installed as wrong hook type,'
    24             ' must be changegroup or outgoing but is %s') % hooktype)
    24             ' must be changegroup or outgoing but is %s') % hooktype)
    25     t = time.strftime("%Y-%m-%d_%H:%M:%S", time.gmtime())
    25     t = time.strftime("%Y-%m-%d_%H:%M:%S", time.gmtime())
    26     user = os.environ['REMOTE_USER']
    26     user = os.environ['REMOTE_USER']
    27     # FIXME: lock it
    27     # FIXME: lock it
    28     log = open(repo.join("push-log"), "a+")
    28     log = open(repo.join("serve-log"), "a+")
    29     try:
    29     try:
    30         for ctx in changes.changes(repo, node):
    30         for ctx in changes.changes(repo, node):
    31             log.write("%s %s key=%s changeset=%s\n" % 
    31             log.write("%s %s key=%s changeset=%s\n" % 
    32                 (t, op, user, mercurial.node.hex(ctx.node())))
    32                 (t, op, user, mercurial.node.hex(ctx.node())))
    33     finally:
    33     finally: