You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Marek <ro...@volny.cz> on 2005/11/14 07:58:25 UTC

SVNArchive

I have written SVNArchive program, which can be used to backup and
restore subversion repositories.
If you want, test it so that we can improve it ;-)
It is written in C# in Visual Studio .NET 2005 beta 2, so it uses .NET
Framework 2 beta 2.
I have some hooks in my svn repository which should trigger SVNArchive,
when a revision is added to a repository or when a revision changes.
These hooks are in attached project, but they are not triggered on my
test PC - Windows 2003 Server. Can you show me what is wrong with them?
 
Marek Istvanek
Czech republic
 
 

Re: SVNArchive

Posted by Steve Williams <st...@kromestudios.com>.
Ryan Schmidt wrote:
> %~p0 sure looks odd to me, but I'm no Windows batch script programmer  
> so I don't know. On Unix, you definitely have to list the complete  
> path to the script or executable, because the hook is run without an  
> environment. Perhaps it's the same way on Windows. (So call C:\path\to 
> \SVNArchive.Backup.bat for example.)

As you seem to have surmised, %~p0 returns the path the batch file.  As 
to whether that works inside a hook is unknown.

-- 
Sly


This message and its attachments may contain legally privileged or confidential information. This message is intended for the use of the individual or entity to which it is addressed. If you are not the addressee indicated in this message, or the employee or agent responsible for delivering the message to the intended recipient, you may not copy or deliver this message or its attachments to anyone. Rather, you should permanently delete this message and its attachments and kindly notify the sender by reply e-mail. Any content of this message and its attachments, which does not relate to the official business of the sending company must be taken not to have been sent or endorsed by the sending company or any of its related entities. No warranty is made that the e-mail or attachment(s) are free from computer virus or other defect.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: SVNArchive

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Nov 14, 2005, at 08:58, Marek wrote:

> I have written SVNArchive program, which can be used to backup and  
> restore subversion repositories.
> If you want, test it so that we can improve it ;-)
> It is written in C# in Visual Studio .NET 2005 beta 2, so it  
> uses .NET Framework 2 beta 2.

I cannot test it, as I do not have a computer with the Windows  
operating system. It would be best not to send such large attachments  
of such limited interest to mailing lists of a primarily discussion  
nature with such a wide distribution; better to put it on a web page  
and send a link to that so interested parties can take a look.


> I have some hooks in my svn repository which should trigger  
> SVNArchive, when a revision is added to a repository or when a  
> revision changes. These hooks are in attached project, but they are  
> not triggered on my test PC - Windows 2003 Server. Can you show me  
> what is wrong with them?

For the list's illumination, here's what's in the archive:


pre-revprop-change.bat:

@echo SVN Pre Revision Property Change

post-revprop-change.bat:

@echo SVN Post Revision Property Change
%~p0\..\..\SVNArchive\SVNArchive.Backup.bat %1 %2

post-commit.bat:

@echo SVN Post Commit
%~p0\..\..\SVNArchive\SVNArchive.Backup.bat %1 *


%~p0 sure looks odd to me, but I'm no Windows batch script programmer  
so I don't know. On Unix, you definitely have to list the complete  
path to the script or executable, because the hook is run without an  
environment. Perhaps it's the same way on Windows. (So call C:\path\to 
\SVNArchive.Backup.bat for example.)

The echo statements may not be going anywhere, by the way. On Unix,  
if you want a pre-commit hook to output anything, you must direct the  
output to stderr and exit with a nonzero code. I don't know how to do  
that on Windows though.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org