Discussion:
post-commit.bat is not executing correctly
Angevine, Mark W
2014-09-11 21:37:22 UTC
Permalink
I am setting up a master-slave repository pair to store files managed by an application I am writing.

Both master and slave svn instances are running as Apache webserver modules under Windows 7. I used the RedBook instructions to configure the slave for write-thru proxy and this is working properly. Writes to the slave show up as new versions committed in the master.

I executed svnsync init in a cmd shell window to establish the sync relationship and set username/password.

I have written a simple post-commit.bat that executes svnsync to send new commits to the slave:

@ECHO OFF
ECHO "This is before..." > C:\Temp\post-commit.log
svnsync sync "http://147.20.86.109/CM/" --non-interactive --password foo
ECHO "This is after." >> C:\Temp\post-commit.log
exit 0

If I execute the post-commit.bat as a stand-alone batch file in a windows cmd shell, it works, and the new commits are copied to the slave. However, the same post-commit.bat is not working as a hook script. When I do a commit on the master, the script fails the svnsync step, although other commands can be executed successfully as part of the batch file ("svnsyn help > C:/Temp/some.log" works, writing the svnsync help text into a file). I have also tried putting "ping <slave ip_address> > C:\Temp\some.log" in the post-commit.bat and it will execute properly, writing the ping output to the file named.

Has anyone set up a simple master-slave "mirroring" system using the Apache webservice installation? Were you able to get svnsync in a posr-commit.bat hook script? Can you see anything wrong with what I am doing?
Dmitry Pavlenko
2014-09-11 21:40:07 UTC
Permalink
Hello Mark,
Is the problem somehow related to SVNKit? Or is it just a generic Subversion problem?
--
Dmitry Pavlenko,
TMate Software,
http://subgit.com/ - git-svn bridge
Post by Angevine, Mark W
I am setting up a master-slave repository pair to store files managed by an
application I am writing.
Both master and slave svn instances are running as Apache webserver modules
under Windows 7. I used the RedBook instructions to configure the slave
for write-thru proxy and this is working properly. Writes to the slave
show up as new versions committed in the master.
I executed svnsync init in a cmd shell window to establish the sync
relationship and set username/password.
I have written a simple post-commit.bat that executes svnsync to send new
@ECHO OFF
ECHO "This is before..." > C:\Temp\post-commit.log
svnsync sync "http://147.20.86.109/CM/" --non-interactive --password foo
ECHO "This is after." >> C:\Temp\post-commit.log
exit 0
If I execute the post-commit.bat as a stand-alone batch file in a windows
cmd shell, it works, and the new commits are copied to the slave.
However, the same post-commit.bat is not working as a hook script. When I
do a commit on the master, the script fails the svnsync step, although
other commands can be executed successfully as part of the batch file
("svnsyn help > C:/Temp/some.log" works, writing the svnsync help text
into a file). I have also tried putting "ping <slave ip_address> >
C:\Temp\some.log" in the post-commit.bat and it will execute properly,
writing the ping output to the file named.
Has anyone set up a simple master-slave "mirroring" system using the Apache
webservice installation? Were you able to get svnsync in a
posr-commit.bat hook script? Can you see anything wrong with what I am
doing?
Angevine, Mark W
2014-09-11 22:05:39 UTC
Permalink
I'm not sure where the problem lies. The application is using SVNKit as a wrapper around the necessary SVN methods for committing and retrieving, if that's your question. I assume there are some people who have used SVN on Windows7 to set up this sort of mirroring scheme. I'm hoping someone overcame a similar issue as I am seeing. What I'm trying to do seems pretty basic.

-----Original Message-----
From: Dmitry Pavlenko [mailto:***@tmatesoft.com]
Sent: Thursday, September 11, 2014 2:40 PM
To: svnkit-***@svnkit.com
Cc: Angevine, Mark W; ***@earthlink.net
Subject: Re: post-commit.bat is not executing correctly

Hello Mark,
Is the problem somehow related to SVNKit? Or is it just a generic Subversion problem?
--
Dmitry Pavlenko,
TMate Software,
http://subgit.com/ - git-svn bridge
Post by Angevine, Mark W
I am setting up a master-slave repository pair to store files managed
by an application I am writing.
Both master and slave svn instances are running as Apache webserver
modules under Windows 7. I used the RedBook instructions to configure
the slave for write-thru proxy and this is working properly. Writes
to the slave show up as new versions committed in the master.
I executed svnsync init in a cmd shell window to establish the sync
relationship and set username/password.
I have written a simple post-commit.bat that executes svnsync to send
@ECHO OFF
ECHO "This is before..." > C:\Temp\post-commit.log svnsync sync
"http://147.20.86.109/CM/" --non-interactive --password foo ECHO "This
is after." >> C:\Temp\post-commit.log exit 0
If I execute the post-commit.bat as a stand-alone batch file in a
windows cmd shell, it works, and the new commits are copied to the slave.
However, the same post-commit.bat is not working as a hook script.
When I do a commit on the master, the script fails the svnsync step,
although other commands can be executed successfully as part of the
batch file ("svnsyn help > C:/Temp/some.log" works, writing the
svnsync help text into a file). I have also tried putting "ping
<slave ip_address> > C:\Temp\some.log" in the post-commit.bat and it
will execute properly, writing the ping output to the file named.
Has anyone set up a simple master-slave "mirroring" system using the
Apache webservice installation? Were you able to get svnsync in a
posr-commit.bat hook script? Can you see anything wrong
Dmitry Pavlenko
2014-09-11 22:28:28 UTC
Permalink
I see. And what protocol are you using to commit to the server witch contains that hook?
--
Dmitry Pavlenko,
TMate Software,
http://subgit.com/ - git-svn bridge
Post by Angevine, Mark W
I'm not sure where the problem lies. The application is using SVNKit as a
wrapper around the necessary SVN methods for committing and retrieving, if
that's your question. I assume there are some people who have used SVN on
Windows7 to set up this sort of mirroring scheme. I'm hoping someone
overcame a similar issue as I am seeing. What I'm trying to do seems
pretty basic.
-----Original Message-----
Sent: Thursday, September 11, 2014 2:40 PM
Subject: Re: post-commit.bat is not executing correctly
Hello Mark,
Is the problem somehow related to SVNKit? Or is it just a generic
Subversion problem? --
Dmitry Pavlenko,
TMate Software,
http://subgit.com/ - git-svn bridge
Post by Angevine, Mark W
I am setting up a master-slave repository pair to store files managed
by an application I am writing.
Both master and slave svn instances are running as Apache webserver
modules under Windows 7. I used the RedBook instructions to configure
the slave for write-thru proxy and this is working properly. Writes
to the slave show up as new versions committed in the master.
I executed svnsync init in a cmd shell window to establish the sync
relationship and set username/password.
I have written a simple post-commit.bat that executes svnsync to send
@ECHO OFF
ECHO "This is before..." > C:\Temp\post-commit.log svnsync sync
"http://147.20.86.109/CM/" --non-interactive --password foo ECHO "This
is after." >> C:\Temp\post-commit.log exit 0
If I execute the post-commit.bat as a stand-alone batch file in a
windows cmd shell, it works, and the new commits are copied to the slave.
However, the same post-commit.bat is not working as a hook script.
When I do a commit on the master, the script fails the svnsync step,
although other commands can be executed successfully as part of the
batch file ("svnsyn help > C:/Temp/some.log" works, writing the
svnsync help text into a file). I have also tried putting "ping
<slave ip_address> > C:\Temp\some.log" in the post-commit.bat and it
will execute properly, writing the ping output to the file named.
Has anyone set up a simple master-slave "mirroring" system using the
Apache webservice installation? Were you able to get svnsync in a
posr-commit.bat hook script? Can you see anything wrong with what I am
doing?
Dmitry Pavlenko
2014-09-11 22:29:49 UTC
Permalink
Another question: do you know with what error svnsync fails?
--
Dmitry Pavlenko,
TMate Software,
http://subgit.com/ - git-svn bridge
Post by Dmitry Pavlenko
I see. And what protocol are you using to commit to the server witch
contains that hook? --
Dmitry Pavlenko,
TMate Software,
http://subgit.com/ - git-svn bridge
Post by Angevine, Mark W
I'm not sure where the problem lies. The application is using SVNKit as
a wrapper around the necessary SVN methods for committing and
retrieving, if that's your question. I assume there are some people who
have used SVN on Windows7 to set up this sort of mirroring scheme. I'm
hoping someone overcame a similar issue as I am seeing. What I'm trying
to do seems pretty basic.
-----Original Message-----
Sent: Thursday, September 11, 2014 2:40 PM
Subject: Re: post-commit.bat is not executing correctly
Hello Mark,
Is the problem somehow related to SVNKit? Or is it just a generic
Subversion problem? --
Dmitry Pavlenko,
TMate Software,
http://subgit.com/ - git-svn bridge
Post by Angevine, Mark W
I am setting up a master-slave repository pair to store files managed
by an application I am writing.
Both master and slave svn instances are running as Apache webserver
modules under Windows 7. I used the RedBook instructions to configure
the slave for write-thru proxy and this is working properly. Writes
to the slave show up as new versions committed in the master.
I executed svnsync init in a cmd shell window to establish the sync
relationship and set username/password.
I have written a simple post-commit.bat that executes svnsync to send
@ECHO OFF
ECHO "This is before..." > C:\Temp\post-commit.log svnsync sync
"http://147.20.86.109/CM/" --non-interactive --password foo ECHO "This
is after." >> C:\Temp\post-commit.log exit 0
If I execute the post-commit.bat as a stand-alone batch file in a
windows cmd shell, it works, and the new commits are copied to the
slave. However, the same post-commit.bat is not working as a hook
script. When I do a commit on the master, the script fails the svnsync
step, although other commands can be executed successfully as part of
the batch file ("svnsyn help > C:/Temp/some.log" works, writing the
svnsync help text into a file). I have also tried putting "ping
<slave ip_address> > C:\Temp\some.log" in the post-commit.bat and it
will execute properly, writing the ping output to the file named.
Has anyone set up a simple master-slave "mirroring" system using the
Apache webservice installation? Were you able to get svnsync in a
posr-commit.bat hook script? Can you see anything wrong with what I am
doing?
Loading...