Ok. One further question. If I go the SVN Cat route, what I'd like to do is wrap a script around it. Basically, if what was added/deleted/etc... was a file, then SVN cat -r$REV > $FILE, otherwise if it's a directory I want to do an SVN export. Is there a way using svnlook to see whether a path refers to a file or directory?
Garrett Rooney <rooneg@electricjellyfish.net> wrote:Rydinare wrote:
> Hi guys. I'm having another issue with subversion. In my post-commit
> script, I'm trying to keep an up to date shadow (aka: mirror) of all
> files in my repository. So, I was able to query the repository using
> $REPO and $REV from the script with the svnlook command. Here's my next
> problem, though... the idea was based on being able to duplicate the
> transactions that subversion did in my mirror. I had completed the
> code, ran it and came up with one tiny problem... Subversion doesn't
> support exporting a single file! Reading through some posts, it showed
> that a workaround could be achived by using 'svn cat' and redirecting to
> a file. However, this leads to a few other issues. I'll address them
> below.
>
> With 'svn cat', does it have any issues cat'ing binary files? If so,
> it's useless for this purpose. I potentially lose file propreties that
> Subversion may have preserved. Any easy way of fixing the file
> properties (this is a minor issue)? 'svn cat' does not work on a
> directory... how woul dI work around this? Finally, and more
> importantly, does anyone know if there are plans for single file
> exporting support in future versions of Subversion? I see no reason why
> 'svn export' shouldn't be able to work on a single file, since it's
> requesting an unversioned copy of the file, which would imply that a
> directory structure is not needed.
>
> Ideas, guys? I'll appreciate any thoughts, advice and assistance on the
> matter.
Try 'svn cat', it'll let you get a specific version of a single file.
-garrett
---------------------------------
Do you Yahoo!?
The all-new My Yahoo! – Get yours free!
Received on Sat Dec 18 15:57:48 2004