src/mercurialserver/servelog.py
changeset 311 3cbde66305e4
parent 307 9009a37ad45b
child 312 4e65f8242c0b
equal deleted inserted replaced
310:38c222727017 311:3cbde66305e4
     8 
     8 
     9 import os
     9 import os
    10 import time
    10 import time
    11 import fcntl
    11 import fcntl
    12 
    12 
    13 try: 
    13 try:
    14     import json
    14     import json
    15     json.log
    15     json.log
    16 except ImportError: 
    16 except ImportError:
    17     import simplejson as json
    17     import simplejson as json
    18 
    18 
    19 from mercurialserver import ruleset, changes
    19 from mercurialserver import ruleset, changes
    20 
    20 
    21 def hook(ui, repo, hooktype, node=None, source=None, **kwargs):
    21 def hook(ui, repo, hooktype, node=None, source=None, **kwargs):
    39             nodes=[mercurial.node.hex(ctx.node())
    39             nodes=[mercurial.node.hex(ctx.node())
    40                 for ctx in changes.changes(repo, node)],
    40                 for ctx in changes.changes(repo, node)],
    41          )))
    41          )))
    42     finally:
    42     finally:
    43         log.close()
    43         log.close()
    44