Discussion:
[Agilo for Trac] Erro on svn hook
Tiago Herrmann
2014-05-26 19:27:07 UTC
Permalink
When i create the post-commit and pre-revpro hooks, occurr this error. How
i can solve this?

I use this hooks:

@echo off
::
:: Trac-SVN post commit hook for explicit synchronisation
::

setlocal

set REPOS=%1
set REV=%2

C:\Python27\Scripts\trac-admin.exe C:\SVNTrac changeset added "%REPOS%" "%REV%"


@echo off
::
:: Trac-SVN post revprop change hook
::

setlocal

set REPOS=%1
set REV=%2

C:\Python27\Scripts\trac-admin.exe C:\SVNTrac


<Loading Image...>
--
--
Follow Agilo on Twitter: http://twitter.com/agilofortrac
Please support us by reviewing and voting on:
http://userstories.com/products/8-agilo-for-scrum
http://ohloh.net/p/agilo-trac
http://freshmeat.net/projects/agiloforscrum

You have received this message because you are subscribed to
the "Agilo for Trac" Google Group. This group is focused on
supporting Agilo for Trac users and is moderated by
Agilo Software GmbH <http://www.agilosoftware.com>.

To post to this group, send email to agilo-/***@public.gmane.org
To unsubscribe from this group, send an email to
agilo+unsubscribe-/***@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/agilo

---
You received this message because you are subscribed to the Google Groups "Agilo for Trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email to agilo+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/d/optout.
Claudio Di Cosmo
2014-06-03 08:07:40 UTC
Permalink
Hi Tiago,

On 27 May 2014 at 09:10:33, Tiago Herrmann (tiago.herrmann-***@public.gmane.org) wrote:

When i create the post-commit and pre-revpro hooks, occurr this error. How i can solve this?

--
Follow Agilo on Twitter: http://twitter.com/agilofortrac
Please support us by reviewing and voting on:
http://userstories.com/products/8-agilo-for-scrum
http://ohloh.net/p/agilo-trac
http://freshmeat.net/projects/agiloforscrum
 
You have received this message because you are subscribed to
the "Agilo for Trac" Google Group. This group is focused on
supporting Agilo for Trac users and is moderated by
Agilo Software GmbH <http://www.agilosoftware.com>.
 
To post to this group, send email to agilo-/***@public.gmane.org
To unsubscribe from this group, send an email to
agilo+unsubscribe-/***@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/agilo

---
You received this message because you are subscribed to the Google Groups "Agilo for Trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email to agilo+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/d/optout.


Which version of Windows are you using? 
The problem can be related to Windows UAC since you are using path which should not be accessible so easily by programs.
One thing that you could try at the beginning is to disable it and try to run again the script. (http://windows.microsoft.com/en-us/windows/turn-user-account-control-on-off#1TC=windows-7)

If it is working than we can add this code so that you can elevate the privileges to admin:

:::::::::::::::::::::::::::::::::::::::::
:: Automatically check & get admin rights
:::::::::::::::::::::::::::::::::::::::::
@echo off
CLS
ECHO.
ECHO =============================
ECHO Running Admin shell
ECHO =============================

:checkPrivileges
NET FILE 1>NUL 2>NUL
if '%errorlevel%' == '0' ( goto gotPrivileges ) else ( goto getPrivileges )

:getPrivileges
if '%1'=='ELEV' (shift & goto gotPrivileges)
ECHO.
ECHO **************************************
ECHO Invoking UAC for Privilege Escalation
ECHO **************************************

setlocal DisableDelayedExpansion
set "batchPath=%~0"
setlocal EnableDelayedExpansion
ECHO Set UAC = CreateObject^("Shell.Application"^) > "%temp%\OEgetPrivileges.vbs"
ECHO UAC.ShellExecute "!batchPath!", "ELEV", "", "runas", 1 >> "%temp%\OEgetPrivileges.vbs"
"%temp%\OEgetPrivileges.vbs"
exit /B

:gotPrivileges
::::::::::::::::::::::::::::
:START
::::::::::::::::::::::::::::
setlocal & pushd .
set REPOS=%1
set REV=%2

C:\Python27\Scripts\trac-admin.exe C:\SVNTrac changeset added "%REPOS%" "%REV%"

Let me know if it works.


Cheers,
Claudio Di Cosmo
Software Engineer
Agilo Software GmbH
Gruenberger Str. 54
10245 Berlin, Germany

claudio.dicosmo-CKHYNj9aYvRx67MzidHQgQC/***@public.gmane.org
http://www.agilosoftware.com

Follow us on twitter: http://twitter.com/agiloforscrum, http://twitter.com/agilofortrac

Amtsgericht Charlottenburg: HRB 127146
CEO Marion Eickmann, Andrea Tomasini
--
--
Follow Agilo on Twitter: http://twitter.com/agilofortrac
Please support us by reviewing and voting on:
http://userstories.com/products/8-agilo-for-scrum
http://ohloh.net/p/agilo-trac
http://freshmeat.net/projects/agiloforscrum

You have received this message because you are subscribed to
the "Agilo for Trac" Google Group. This group is focused on
supporting Agilo for Trac users and is moderated by
Agilo Software GmbH <http://www.agilosoftware.com>.

To post to this group, send email to agilo-/***@public.gmane.org
To unsubscribe from this group, send an email to
agilo+unsubscribe-/***@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/agilo

---
You received this message because you are subscribed to the Google Groups "Agilo for Trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email to agilo+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/d/optout.
Tiago Herrmann
2014-06-05 18:36:56 UTC
Permalink
I'm using windows xp...
I had problemas with visualsvn and python bindings. Now the problems was
solve.
I install a older version of visual svn and svn from alagazam.

Now i try use agilo_svn_hook_commit to create a comment in trac using REFS.
When i use this hook occur some errors (this is one):

post-commit hook failed (exit code 1) with output:
Traceback (most recent call last):
File "C:\Python27\Scripts\agilo_svn_hook_commit.py", line 4, in <module>
import pkg_resources
File "build\bdist.win32\egg\pkg_resources.py", line 2749, in <module>
File "build\bdist.win32\egg\pkg_resources.py", line 444, in _build_master
File "build\bdist.win32\egg\pkg_resources.py", line 725, in require
File "build\bdist.win32\egg\pkg_resources.py", line 628, in resolve
pkg_resources.DistributionNotFound: trac>=0.12

Em terça-feira, 3 de junho de 2014 05h07min48s UTC-3, Claudio Di Cosmo
Post by Claudio Di Cosmo
Hi Tiago,
When i create the post-commit and pre-revpro hooks, occurr this error. How
i can solve this?
--
Follow Agilo on Twitter: http://twitter.com/agilofortrac
http://userstories.com/products/8-agilo-for-scrum
http://ohloh.net/p/agilo-trac
http://freshmeat.net/projects/agiloforscrum
You have received this message because you are subscribed to
the "Agilo for Trac" Google Group. This group is focused on
supporting Agilo for Trac users and is moderated by
Agilo Software GmbH <http://www.agilosoftware.com>.
To unsubscribe from this group, send an email to
For more options, visit this group at
http://groups.google.com/group/agilo
---
You received this message because you are subscribed to the Google Groups
"Agilo for Trac" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
Which version of Windows are you using?
The problem can be related to Windows UAC since you are using path which
should not be accessible so easily by programs.
One thing that you could try at the beginning is to disable it and try to
run again the script. (
http://windows.microsoft.com/en-us/windows/turn-user-account-control-on-off#1TC=windows-7
)
:: Automatically check & get admin rights
@echo off
CLS
ECHO.
ECHO =============================
ECHO Running Admin shell
ECHO =============================
:checkPrivileges
NET FILE 1>NUL 2>NUL
if '%errorlevel%' == '0' ( goto gotPrivileges ) else ( goto getPrivileges )
:getPrivileges
if '%1'=='ELEV' (shift & goto gotPrivileges)
ECHO.
ECHO **************************************
ECHO Invoking UAC for Privilege Escalation
ECHO **************************************
setlocal DisableDelayedExpansion
set "batchPath=%~0"
setlocal EnableDelayedExpansion
ECHO Set UAC = CreateObject^("Shell.Application"^) > "%temp%\OEgetPrivileges.vbs"
ECHO UAC.ShellExecute "!batchPath!", "ELEV", "", "runas", 1 >> "%temp%\OEgetPrivileges.vbs"
"%temp%\OEgetPrivileges.vbs"
exit /B
:gotPrivileges
:START
setlocal & pushd .
set REPOS=%1
set REV=%2
C:\Python27\Scripts\trac-admin.exe C:\SVNTrac changeset added "%REPOS%" "%REV%"
Let me know if it works.
Cheers,
Claudio Di Cosmo
Software Engineer
Agilo Software GmbH
Gruenberger Str. 54
10245 Berlin, Germany
http://www.agilosoftware.com
Follow us on twitter: http://twitter.com/agiloforscrum,
http://twitter.com/agilofortrac
Amtsgericht Charlottenburg: HRB 127146
CEO Marion Eickmann, Andrea Tomasini
--
--
Follow Agilo on Twitter: http://twitter.com/agilofortrac
Please support us by reviewing and voting on:
http://userstories.com/products/8-agilo-for-scrum
http://ohloh.net/p/agilo-trac
http://freshmeat.net/projects/agiloforscrum

You have received this message because you are subscribed to
the "Agilo for Trac" Google Group. This group is focused on
supporting Agilo for Trac users and is moderated by
Agilo Software GmbH <http://www.agilosoftware.com>.

To post to this group, send email to agilo-/***@public.gmane.org
To unsubscribe from this group, send an email to
agilo+unsubscribe-/***@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/agilo

---
You received this message because you are subscribed to the Google Groups "Agilo for Trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email to agilo+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/d/optout.
Tiago Herrmann
2014-06-06 15:19:20 UTC
Permalink
In pre commit ocurr this error

Commit failed (details follow):
Commit blocked by pre-commit hook (exit code 1) with output:
Traceback (most recent call last):
File "C:\Python27\Scripts\agilo_svn_hook_commit.py", line 4, in <module>
import pkg_resources
File "build\bdist.win32\egg\pkg_resources.py", line 2749, in <module>
File "build\bdist.win32\egg\pkg_resources.py", line 444, in _build_master
File "build\bdist.win32\egg\pkg_resources.py", line 725, in require
File "build\bdist.win32\egg\pkg_resources.py", line 628, in resolve
pkg_resources.DistributionNotFound: trac>=0.12
This error was generated by a custom hook script on the Subversion server.
Please contact your server administrator for help with resolving this issue.

Em quinta-feira, 5 de junho de 2014 15h36min56s UTC-3, Tiago Herrmann
Post by Tiago Herrmann
I'm using windows xp...
I had problemas with visualsvn and python bindings. Now the problems was
solve.
I install a older version of visual svn and svn from alagazam.
Now i try use agilo_svn_hook_commit to create a comment in trac using REFS.
File "C:\Python27\Scripts\agilo_svn_hook_commit.py", line 4, in <module>
import pkg_resources
File "build\bdist.win32\egg\pkg_resources.py", line 2749, in <module>
File "build\bdist.win32\egg\pkg_resources.py", line 444, in _build_master
File "build\bdist.win32\egg\pkg_resources.py", line 725, in require
File "build\bdist.win32\egg\pkg_resources.py", line 628, in resolve
pkg_resources.DistributionNotFound: trac>=0.12
Em terça-feira, 3 de junho de 2014 05h07min48s UTC-3, Claudio Di Cosmo
Post by Claudio Di Cosmo
Hi Tiago,
When i create the post-commit and pre-revpro hooks, occurr this error.
How i can solve this?
--
Follow Agilo on Twitter: http://twitter.com/agilofortrac
http://userstories.com/products/8-agilo-for-scrum
http://ohloh.net/p/agilo-trac
http://freshmeat.net/projects/agiloforscrum
You have received this message because you are subscribed to
the "Agilo for Trac" Google Group. This group is focused on
supporting Agilo for Trac users and is moderated by
Agilo Software GmbH <http://www.agilosoftware.com>.
To unsubscribe from this group, send an email to
For more options, visit this group at
http://groups.google.com/group/agilo
---
You received this message because you are subscribed to the Google Groups
"Agilo for Trac" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
Which version of Windows are you using?
The problem can be related to Windows UAC since you are using path which
should not be accessible so easily by programs.
One thing that you could try at the beginning is to disable it and try to
run again the script. (
http://windows.microsoft.com/en-us/windows/turn-user-account-control-on-off#1TC=windows-7
)
If it is working than we can add this code so that you can elevate the
:: Automatically check & get admin rights
@echo off
CLS
ECHO.
ECHO =============================
ECHO Running Admin shell
ECHO =============================
:checkPrivileges
NET FILE 1>NUL 2>NUL
if '%errorlevel%' == '0' ( goto gotPrivileges ) else ( goto getPrivileges )
:getPrivileges
if '%1'=='ELEV' (shift & goto gotPrivileges)
ECHO.
ECHO **************************************
ECHO Invoking UAC for Privilege Escalation
ECHO **************************************
setlocal DisableDelayedExpansion
set "batchPath=%~0"
setlocal EnableDelayedExpansion
ECHO Set UAC = CreateObject^("Shell.Application"^) > "%temp%\OEgetPrivileges.vbs"
ECHO UAC.ShellExecute "!batchPath!", "ELEV", "", "runas", 1 >> "%temp%\OEgetPrivileges.vbs"
"%temp%\OEgetPrivileges.vbs"
exit /B
:gotPrivileges
:START
setlocal & pushd .
set REPOS=%1
set REV=%2
C:\Python27\Scripts\trac-admin.exe C:\SVNTrac changeset added "%REPOS%" "%REV%"
Let me know if it works.
Cheers,
Claudio Di Cosmo
Software Engineer
Agilo Software GmbH
Gruenberger Str. 54
10245 Berlin, Germany
http://www.agilosoftware.com
Follow us on twitter: http://twitter.com/agiloforscrum,
http://twitter.com/agilofortrac
Amtsgericht Charlottenburg: HRB 127146
CEO Marion Eickmann, Andrea Tomasini
--
--
Follow Agilo on Twitter: http://twitter.com/agilofortrac
Please support us by reviewing and voting on:
http://userstories.com/products/8-agilo-for-scrum
http://ohloh.net/p/agilo-trac
http://freshmeat.net/projects/agiloforscrum

You have received this message because you are subscribed to
the "Agilo for Trac" Google Group. This group is focused on
supporting Agilo for Trac users and is moderated by
Agilo Software GmbH <http://www.agilosoftware.com>.

To post to this group, send email to agilo-/***@public.gmane.org
To unsubscribe from this group, send an email to
agilo+unsubscribe-/***@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/agilo

---
You received this message because you are subscribed to the Google Groups "Agilo for Trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email to agilo+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/d/optout.
Loading...