thanks all On Tue, May 11, 2010 at 3:16 PM, akabat <[email protected]> wrote:
> On May 3, 6:05 pm, hussein mohamed ali <[email protected]> wrote: > > Dears, > > > > how can i integrate SVN with Agilo in Windows ?? > > Some hint for running the hook scripts on Windows: > > The Agilo Installation Guide > http://www.agile42.com/cms/pages/download-install/ > shows the Subversion Integration on Linux > by calling the Python script agilo_svn_hook_commit.py > from Subversion pre-commit and post-commit hooks. > > The Linux shell scripts don't run on a Windows box. > > Unfortunately there is no Windows equivalent for storing > the multiline commit comment in a single environment > variable before passing the comment to the Python script > agilo_svn_hook_commit.py. > > We solved this problem by an additional and intermediate > Python script. > > Our pre-commit hook is still a Windows batch stored as > c:\path\to\svn\repository\hooks\pre-commit.bat > > This batch file has the following contents: > > @echo off > set PYTHONPATH=C:/Program Files/Python25/Lib/site-packages/ > binary_agilo-1.2.1_PRO-py2.5.egg > python.exe "c:\path\to\svn\repository\hooks\pre-commit.py" "%1" "%2" > > Our pre-commit.py has the following contents: > > import subprocess > import sys > from agilo.utils.svn_hooks import AgiloSVNPreCommit > > # Customer specific paths: > path_to_svnlookexe = "C:/Program Files/Subversion/1.6.11/ > svnlook.exe" > path_to_trac_project="C:/trac" > > # This are the argument provided by the SVN hook: > repository = sys.argv[1] > transaction = sys.argv[2] > > # Retrieve the commit comment by calling svlook.exe: > svnlook_arguments = [path_to_svnlookexe, "log", "-t", transaction, > repository] > svnlook_proc = subprocess.Popen(svnlook_arguments, > stdout=subprocess.PIPE) > commit_comment = svnlook_proc.communicate()[0] > > # Let Agilo check the comment: > precommit = AgiloSVNPreCommit(project = path_to_trac_project, \ > log = commit_comment) > try: > precommit.execute() > except Exception, e: > print >> sys.stderr, e > sys.exit(1) > > > Our post-commit hook is also a Windows batch stored as > c:\path\to\svn\repository\hooks\post-commit.bat > > This batch file has the following contents: > > @echo off > > set _REPOS_=%1 > set _REV_=%2 > set _TRAC_ENV_=c:\trac > set _AGILO_SCRIPTS_=C:\Program Files\Python25\Lib\site-packages > \binary_agilo-1.2.1_PRO-py2.5.egg\EGG-INFO\scripts > set _LOG_FILE_=c:\path\to\svn\repository\hooks\post-commit.log > > "%_AGILO_SCRIPTS_%/agilo_svn_hook_commit.py" -s post -e "%_TRAC_ENV_ > %" -r "%_REV_%" >> %_LOG_FILE_% 2>&1 > > -- > -- > Follow Agilo on Twitter: http://twitter.com/agiloforscrum > Please support us by reviewing and voting on: > http://userstories.com/products/8-agilo-for-scrum > http://ohloh.net/p/agilo-scrum > http://freshmeat.net/projects/agiloforscrum > > You received this message because you are subscribed to the Google > Groups "Agilo for Scrum" group. This group is moderated by agile42 GmbH > http://www.agile42.com and is focused in supporting Agilo for Scrum users. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] <agilo%[email protected]> > For more options, visit this group at > http://groups.google.com/group/agilo?hl=en > -- Eng. Hussein Mohammed Ali Software Engineer -- -- Follow Agilo on Twitter: http://twitter.com/agiloforscrum Please support us by reviewing and voting on: http://userstories.com/products/8-agilo-for-scrum http://ohloh.net/p/agilo-scrum http://freshmeat.net/projects/agiloforscrum You received this message because you are subscribed to the Google Groups "Agilo for Scrum" group. This group is moderated by agile42 GmbH http://www.agile42.com and is focused in supporting Agilo for Scrum users. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/agilo?hl=en

