문제

SVNPerms를 저장소로 구현하려고 노력하고 있지만 몇 가지가 어려움을 겪고 있습니다.

사전 커밋에는 실행 권한이 있습니다.

-rwxrwxr-x   1 svnadm     svn           3018 May 27 10:11 pre-commit

이것은 사전 커밋 내에서 svnperms에 대한 나의 부름입니다.

# Check that the author of this commit has the rights to perform
# the commit on the files and directories being modified.
SVNPERMS=/usr/local/svn/scripts/svnperms.py
$SVNPERMS -r $REPOS -t $TXN || exit 1

지정된 위치에 svnperms.py가 설치되어 있습니다.

# ls -l /usr/local/svn/scripts
total 24
-rwxrwxr-x   1 svnadm     svn          11840 May 25 07:48 svnperms.py

svnperms.py는 Unix 형식으로 - No ^m line 결말입니다.

tortoisesvn은 다음과 함께 다시 온다.

Command: Commit  
Modified: C:\projects\Sandbox\Trunk\Test.txt  
Sending content: C:\projects\Sandbox\Trunk\Test.txt  
Error: Commit failed (details follow):  
Error: 'pre-commit' hook failed with error output:  
Error: No such file or directory: python  

매개 변수가없는 svnperms를 호출하는 것은 다음과 같습니다.

/usr/local/svn/scripts/svnperms.py
missing required option(s): repository, either transaction or a revision
Usage: svnperms.py OPTIONS

Options:
    -r PATH    Use repository at PATH to check transactions
    -t TXN     Query transaction TXN for commit information
    -f PATH    Use PATH as configuration file (default is repository
               path + /conf/svnperms.conf)
    -s NAME    Use section NAME as permission section (default is
               repository name, extracted from repository path)
    -R REV     Query revision REV for commit information (for tests)
    -A AUTHOR  Check commit as if AUTHOR had commited it (for tests)
    -h         Show this message

UNIX 관리자는 최근 Python을 설치했지만 모든 종속성이 있는지 확실하지 않았습니다. 그것이 문제라면, Python이 위의 출력을 기반으로 작동하는 것처럼 보이기 때문에 그것을 결정하는 방법을 잘 모르겠습니다.

내가 무엇을 놓치고 있습니까?

도움이 되었습니까?

해결책

내 생각 엔의 위치는 python 이진이 없습니다 $PATH SVN 서버의 경우. Shabang 라인 svnperms.py 읽기 :

#!/usr/bin/env python

그러나 그것은 실행 파일이 $PATH 발신자의. Subversion Server의 런타임 환경을 수정할 권한이없는 경우 교체 해보십시오. python Shabang에서 주어진 경로와 함께 which python 상호 작용할 때.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top