Edgewall Software

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)

Patch for post commit contrib files. Not sure about cr/lf issues with the py one

  • contrib/trac-post-commit-hook

     
    138138 
    139139    def __init__(self, project=options.project, author=options.user, 
    140140                 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 
    141145        self.env = open_environment(project) 
    142146        repos = self.env.get_repository() 
    143147        repos.sync() 
  • contrib/trac-post-commit-hook.cmd

     
    77:: Usage: 
    88:: 
    99:: 1) Insert the following line in your post-commit.bat script 
    10 :: 
    1110:: call %~dp0\trac-post-commit-hook.cmd %1 %2 
    1211:: 
     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:: 
    1317:: 2) Check the 'Modify paths' section below, be sure to set at least TRAC_ENV 
    1418 
    1519 
    1620:: ---------------------------------------------------------- 
    1721:: Modify paths here: 
    1822 
    19 :: -- this one *must* be set 
     23:: -- this one *must* be set.  Root of the trac environment (contains /conf,/db,etc) 
    2024SET TRAC_ENV= 
    2125 
    22 :: -- set if Python is not in the system path 
     26:: -- set if Python is not in the system path.  
    2327SET PYTHON_PATH= 
    2428 
    2529:: -- set to the folder containing trac/ if installed in a non-standard location 
     
    3438 
    3539SET REV=%2 
    3640 
    37 Python "%~dp0\trac-post-commit-hook" -p "%TRAC_ENV%" -r "%REV%"  
     41Python "%~dp0\trac-post-commit-hook" -r %REV% -p "%TRAC_ENV%" 
    3842