Ticket #6370: fix-postcommit-quotes-in-tracenv-on-windows.patch
| File fix-postcommit-quotes-in-tracenv-on-windows.patch, 1.8 KB (added by awbacker@…, 5 years ago) |
|---|
-
contrib/trac-post-commit-hook
138 138 139 139 def __init__(self, project=options.project, author=options.user, 140 140 rev=options.rev, url=options.url): 141 142 # Remove the double quotes around the name used by the win batch file 143 project = project.replace('"','') 144 141 145 self.env = open_environment(project) 142 146 repos = self.env.get_repository() 143 147 repos.sync() -
contrib/trac-post-commit-hook.cmd
7 7 :: Usage: 8 8 :: 9 9 :: 1) Insert the following line in your post-commit.bat script 10 ::11 10 :: call %~dp0\trac-post-commit-hook.cmd %1 %2 12 11 :: 12 :: %0 is the file being run 13 :: ~dp gives just the Drive & Path of the file 14 :: %~dp0 of "c:\> c:\test\this\test.bat" => "c:\test\this\" inside test.bat 15 16 :: 13 17 :: 2) Check the 'Modify paths' section below, be sure to set at least TRAC_ENV 14 18 15 19 16 20 :: ---------------------------------------------------------- 17 21 :: Modify paths here: 18 22 19 :: -- this one *must* be set 23 :: -- this one *must* be set. Root of the trac environment (contains /conf,/db,etc) 20 24 SET TRAC_ENV= 21 25 22 :: -- set if Python is not in the system path 26 :: -- set if Python is not in the system path. 23 27 SET PYTHON_PATH= 24 28 25 29 :: -- set to the folder containing trac/ if installed in a non-standard location … … 34 38 35 39 SET REV=%2 36 40 37 Python "%~dp0\trac-post-commit-hook" - p "%TRAC_ENV%" -r "%REV%"41 Python "%~dp0\trac-post-commit-hook" -r %REV% -p "%TRAC_ENV%" 38 42
