[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: SVN post-commit hook: shadow folders

From: Ryan Schmidt <subversion-2011a_at_ryandesign.com>
Date: Mon, 7 Feb 2011 17:24:59 -0600

On Feb 7, 2011, at 16:48, Schneider, Wolf wrote:

> We are trying to replicate the ShadowFolders feature of VSS, whereby each checked-in file that needs it gets mirrored to a reference directory.
>
> To do this, I wrote the following script, which works well except for the actual file copy – svn copy complains about the target folder not being a directory, although it most certainly is. My questions are a) what is wrong with my use of svn copy, and b) is there perhaps a better way to achieve the ShadowFolder feature?

[snip]

> rem Copy the file to the indicated shadow folder
> svn copy -r %REVISION% %REPURL%/%FPATH% %FOLDER%/%FNAME%

[snip]

> Post-commit.log (note that I have also echoed the command used to the log – this line was removed from the above script for clarity):
>
> • Writing to a local ShadowFolder
> (02-07-2011 11:31AM) Copying Development/CCSA/Tools/CCPW001/ccpw001.hr to C:\SVNtest\RefDir
> svn copy -r 601 https://iss01sb299/svn/icbc/Development/CCSA/Tools/CCPW001/ccpw001.hr C:\SVNtest\RefDir\ccpw001.hr
> svn: Path 'C:\SVNtest\RefDir' is not a directory
>
> • Writing to a network shadow folder
> (02-07-2011 11:48AM) Copying Development/CCSA/Tools/CCPW001/ccpw001.h to \\MQ01DV299\LIBRARY\ReferenceDir\SVNtest
> svn copy -r 603 https://iss01sb299/svn/icbc/Development/CCSA/Tools/CCPW001/ccpw001.h \\MQ01DV299\LIBRARY\ReferenceDir\SVNtest\ccpw001.h
> svn: Path '\\mq01dv299\LIBRARY\ReferenceDir\SVNtest' is not a directory
>
> • Removing the filename from the destination path
> (02-07-2011 12:00PM) Copying Development/CCSA/Tools/CCPW001/ccpw001.h to \\MQ01DV299\LIBRARY\ReferenceDir\SVNtest
> svn copy -r 604 https://iss01sb299/svn/icbc/Development/CCSA/Tools/CCPW001/ccpw001.h \\MQ01DV299\LIBRARY\ReferenceDir\SVNtest
> svn: Path '\\mq01dv299\LIBRARY\ReferenceDir\SVNtest' is not a directory

I am not familiar with VSS or what exactly is meant by "shadow folder"... Based on the above log, %FOLDER% does not appears to be a URL to a Subversion repository... Is it a path to a Subversion working copy? If so, that should work. Or is it just a local unversioned directory? If so, then you can't "svn copy" to it but you should be able to "svn cat" individual files there, or if you want to do entire folders, then you'd "svn export" them.

Possibly related is this topic:

http://subversion.apache.org/faq.html#website-auto-update
Received on 2011-02-08 00:25:44 CET

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.