• R/O
  • SSH
  • HTTPS

traclight: Commit


Commit MetaInfo

Revision14 (tree)
Time2010-09-08 00:44:59
Authortag

Log Message

post-commit.batをtrac0.12用に変更した。
これにともない、文字列置換のスクリプトを追加、
post-install.bat、create-project.bat.in
post-commit.bat.in、trac.issを修正した。

post-install.batからticketdeleteとauthz_policyを削除した。

trac.ini.inからticketdeleteとauthz_policyとwikirenameを削除し、
committicketreferencemacro、committicketupdater
(commit hookをticketに渡す)、
ticketdeleterを有効にした。

Change Summary

Incremental Difference

--- branches/tl3_0/install/post-install.bat (revision 13)
+++ branches/tl3_0/install/post-install.bat (revision 14)
@@ -97,9 +97,6 @@
9797 cd ..\usermanager
9898 ..\..\..\python\python.exe setup.py install
9999
100-cd ..\authz_policy
101-..\..\..\python\python.exe setup.py install
102-
103100 cd ..\privatewikiplugin
104101 ..\..\..\python\python.exe setup.py install
105102
@@ -178,9 +175,6 @@
178175 cd ..\batchmodify
179176 ..\..\..\python\python.exe setup.py install
180177
181-cd ..\ticketdelete
182-..\..\..\python\python.exe setup.py install
183-
184178 cd ..\peerreviewplugin
185179 ..\..\..\python\python.exe setup.py install
186180
@@ -223,7 +217,6 @@
223217 REM ==== 環境固有の設定 ====
224218 python\python.exe install\replace.py %1 install\replace\start.bat.in start.bat
225219 python\python.exe install\replace.py %1 install\replace\create-project.bat.in bin\create-project.bat"
226-python\python.exe install\replace.py %1 install\replace\post-commit.bat.in bin\post-commit.bat"
227220 python\python.exe install\replace.py %1 install\replace\pre-revprop-change.bat bin\pre-revprop-change.bat"
228221 python\python.exe install\replace.py %1 install\replace\setenv.bat.in bin\setenv.bat
229222 python\python.exe install\replace.py %1 install\replace\create-servercert.bat.in bin\create-servercert.bat
--- branches/tl3_0/install/replace/post-commit.bat.in (revision 13)
+++ branches/tl3_0/install/replace/post-commit.bat.in (revision 14)
@@ -1,14 +1,14 @@
1-SET TRAC_LIGHT_HOME=%%APPDIR%%
2-SET PATH=%TRAC_LIGHT_HOME%\python;%PATH%
1+::Call the TRAC post-commit hook
32
4-if not DEFINED TL_PROJECT_HOME set TL_PROJECT_HOME=%TRAC_LIGHT_HOME%\projects
3+set PROJECT=STR_REP0
4+set TRAC_LIGHT_HOME=STR_REP1
5+set PYTHONHOME=STR_REP2
6+set TL_PROJECT_HOME=STR_REP3
57
6-::-----------------------------
7-::Call the TRAC post-commit hook
8-::
9-SET REPOS=%1
10-SET REV=%2
8+set TRAC_ENV=%TL_PROJECT_HOME%\trac\%PROJECT%
119
12-FOR /F "usebackq delims==" %%i IN (`python.exe -c "import sys,re;r=re.split('\\\\',sys.argv[1]);print r[len(r)-1]" %REPOS%`) DO SET PROJECT=%%i
10+:: -- Retrieve the information that Subversion gave to the hook
11+set REPOS=%1
12+set REV=%2
1313
14-"%TRAC_LIGHT_HOME%\bin\bash.exe" "%TRAC_LIGHT_HOME%/bin/post-commit.sh" %1 %2 "%TL_PROJECT_HOME%" "%PROJECT%"
14+"%PYTHONHOME%\Scripts\trac-admin.exe" "%TRAC_ENV%" changeset added "%REPOS%" "%REV%"
--- branches/tl3_0/install/replace/trac.ini.in (revision 13)
+++ branches/tl3_0/install/replace/trac.ini.in (revision 14)
@@ -130,18 +130,16 @@
130130 svnauthz.admin_ui.* = enabled
131131 advancedworkflow.controller.* = enabled
132132 batchmod.web_ui.* = enabled
133-ticketdelete.web_ui.* = enabled
134133 excelreport.excelreport.* = enabled
135134 excelreportexport.excelreportexport.* = enabled
136135 querychart.admin.adminpanel = enabled
137136 querychart.macro.macro = enabled
138137 querychart.model.ticketstatuslogmodelprovider = enabled
139-authz_policy.authzpolicy = enabled
138+
140139 xdocview.xdocview.xdocrenderer = enabled
141140 talm_importer.importer.importmodule = enabled
142141 tracautowikify.autowikify.autowikify = enabled
143142 graphviz.graphviz.graphviz = enabled
144-wikirename.web_ui.wikirenamemodule = enabled
145143 tracsectionedit.web_ui.wikisectioneditmodule = enabled
146144 codereview.peerreviewbrowser.peerreviewbrowser = enabled
147145 codereview.peerreviewcommentcallback.userbasemodule = enabled
@@ -159,6 +157,9 @@
159157 workfloweditor.workfloweditor_admin.workfloweditoradmin = enabled
160158 ticket_clone.simpleticketclonebutton = enabled
161159 tracdragdrop.* = enabled
160+tracopt.ticket.commit_updater.committicketreferencemacro = enabled
161+tracopt.ticket.commit_updater.committicketupdater = enabled
162+tracopt.ticket.deleter.ticketdeleter = enabled
162163
163164 #[ticket-custom]
164165 #due_assign = text
--- branches/tl3_0/install/replace/create-project.bat.in (revision 13)
+++ branches/tl3_0/install/replace/create-project.bat.in (revision 14)
@@ -4,6 +4,7 @@
44 SET PATH=%TRAC_LIGHT_HOME%\python;%TRAC_LIGHT_HOME%\CollabNetSVN;%TRAC_LIGHT_HOME%\bin;%PATH%
55
66 if not DEFINED TL_PROJECT_HOME set TL_PROJECT_HOME=%TRAC_LIGHT_HOME%\projects
7+if not DEFINED PYTHONHOME set PYTHONHOME=%TRAC_LIGHT_HOME%\python
78
89 SET PROJNAME=%1
910 if not "%1" == "" goto skip_input
@@ -19,7 +20,9 @@
1920 if exist "%TL_PROJECT_HOME%\svn\%PROJNAME%" goto :EOF
2021
2122 svnadmin create "%TL_PROJECT_HOME%\svn\%PROJNAME%"
22-copy "%TRAC_LIGHT_HOME%\bin\post-commit.bat" "%TL_PROJECT_HOME%\svn\%PROJNAME%\hooks\post-commit.bat"
23+copy "%TRAC_LIGHT_HOME%\install\replace\post-commit.bat.in" "%TL_PROJECT_HOME%\svn\%PROJNAME%\hooks\post-commit.bat"
24+python "%TRAC_LIGHT_HOME%\bin\textreplace.py" "%TL_PROJECT_HOME%\svn\%PROJNAME%\hooks\post-commit.bat" "%PROJNAME%" "%TRAC_LIGHT_HOME%" "%PYTHONHOME%" "%TL_PROJECT_HOME%"
25+
2326 copy "%TRAC_LIGHT_HOME%\bin\pre-revprop-change.bat" "%TL_PROJECT_HOME%\svn\%PROJNAME%\hooks\pre-revprop-change.bat"
2427
2528 python "%TRAC_LIGHT_HOME%\python\scripts\trac-admin-script.py" "%TL_PROJECT_HOME%/trac/%PROJNAME%" initenv --inherit="%TRAC_LIGHT_HOME%\python\share\trac\conf\trac.ini" %PROJNAME% sqlite:db/trac.db svn "%TL_PROJECT_HOME%/svn/%PROJNAME%"
--- branches/tl3_0/bin/textreplace.py (nonexistent)
+++ branches/tl3_0/bin/textreplace.py (revision 14)
@@ -0,0 +1,22 @@
1+#!/usr/local/bin/python
2+
3+import sys ,re
4+
5+argvs = sys.argv
6+
7+if len(argvs) < 3:
8+ print "Usage: python.exe textreplace.py <appFile> <str0> <str1> ..."
9+ quit() #sys.exit(1)
10+
11+fin = open(argvs[1], "r")
12+s = fin.read()
13+fin.close()
14+
15+cnt = 0
16+for arg in argvs[2:]:
17+ s = s.replace("STR_REP"+str(cnt),arg)
18+ cnt = cnt + 1
19+
20+fout = open(argvs[1], "w")
21+fout.write(s)
22+fout.close()
Show on old repository browser