Which user performs the hook after receiving on a Windows computer?

So, I have this hook post-receivein my bare repo, which should update the tickets in my trac setup (the hook taken from http://trac.edgewall.org/attachment/wiki/TracGit/post-receive-hook.py ).

The git repo is on disk G:, and the trac database is stored on F:\user\trac\myproject. I set up the original hook so that the paths are correct:

TRAC_ENV = 'F:\\User\\Trac\\myproject'
GIT_PATH = "C:\\Program Files (x86)\\Git\\bin\\git.exe"

Before I uploaded my hook to my server, I checked the correct syntax (backslash, etc.) on my local machine, where everything works fine.

Now I have loaded the hook in G:\git\myproject.git\hooks\post-receiveand I am clicking a few links. But this gives me an error message:

remote: Traceback (most recent call last):
remote:   File "hooks/post-receive", line 190, in <module>
remote:     env = open_environment(TRAC_ENV)
remote:   File "build\bdist.win-amd64\egg\trac\env.py", line 846, in open_environment
remote:   File "build\bdist.win-amd64\egg\trac\core.py", line 124, in __call__
remote:   File "build\bdist.win-amd64\egg\trac\env.py", line 283, in __init__
remote:   File "build\bdist.win-amd64\egg\trac\env.py", line 392, in verify
remote: trac.core.TracError: No Trac environment found at f:\user\trac\myproject
remote: [Errno 2] No such file or directory: 'f:\\user\\trac\\myproject\\VERSION'

, , , , hook post-receive, trac.

: , , trac, ?

+4
1

,

import getpass
print >> sys.stderr, getpass.getuser()

hook, , .

" ", , , , , . , , , trac trac.

0

All Articles