Advertisement
Guest User

Untitled

a guest
Dec 29th, 2014
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. call %~dp0trac-post-commit-hook.cmd %1 %2
  2.  
  3. @ECHO OFF
  4. ::
  5. :: Trac post-commit-hook script for Windows
  6. ::
  7. :: Contributed by markus, modified by cboos.
  8.  
  9. :: Usage:
  10. ::
  11. :: 1) Insert the following line in your post-commit.bat script
  12. ::
  13. :: call %~dp0trac-post-commit-hook.cmd %1 %2
  14. ::
  15. :: 2) Check the 'Modify paths' section below, be sure to set at least TRAC_ENV
  16.  
  17.  
  18. :: ----------------------------------------------------------
  19. :: Modify paths here:
  20.  
  21. :: -- this one *must* be set
  22. SET TRAC_ENV=C:UsersMartinTractest_svn
  23.  
  24. :: -- set if Python is not in the system path
  25. SET PYTHON_PATH=
  26.  
  27. :: -- set to the folder containing trac/ if installed in a non-standard location
  28. SET TRAC_PATH=
  29. :: ----------------------------------------------------------
  30.  
  31. :: Do not execute hook if trac environment does not exist
  32. IF NOT EXIST %TRAC_ENV% GOTO :EOF
  33.  
  34. set PATH=%PYTHON_PATH%;%PATH%
  35. set PYTHONPATH=%TRAC_PATH%;%PYTHONPATH%
  36.  
  37. SET REV=%2
  38.  
  39. Python "%~dp0trac-post-commit-hook" -p "%TRAC_ENV%" -r "%REV%"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement