NAME
SVN::S4::ViewSpec - behaviors related to viewspecs
SYNOPSIS
Scripts: use SVN::S4::ViewSpec; $svns4_object->parse_viewspec(filename=>filename, revision=>revision); $svns4_object->apply_viewspec(filename=>filename);
DESCRIPTION
SVN::S4::ViewSpec implements parsing viewspec files and performing the svn updates and svn switches required to make your working copy match the viewspec file.
A viewspec file format is a text file containing a series of one-line commands. Anything after a # character is considered a comment. Whitespace and blank lines are ignored. The commands must be one of:
set VAR VALUE
Set environment variable VAR to VALUE. This is useful for
making abbreviations to be used within the viewspec file, for
frequently typed things such as the name of the svn repository.
include FILE
Read another file that contains viewspec commands.
If the filename does not begin with a slash, it is considered
to be relative to the directory containing the Project.viewspec.
include URL
Read a file out of the SVN repository that contains viewspec commands.
view URL DIR
Directory DIR will be svn switched to URL.
view URL DIR rev REVNUM
Directory DIR will be svn switched to URL at revision REVNUM.
Note that this is not "sticky" the way CVS was. Svn updates
will override the revision number, while s4 update will not.
REVNUM can also be a date in normal subversion format, as listed here:
http://svnbook.red-bean.com/nightly/en/svn-book.html#svn.tour.revs.dates
Example: view URL DIR rev {2006-07-01}
unview DIR
Ignore any view/unview commands that came above, for directories
that begin with DIR. This may be useful if you have included
a viewspec and want to override some of its view commands.
METHODS
- $s4->parse_viewspec(parse_viewspec(filename=>filename, revision=>revision);
-
Parse_viewspec reads the file specified by FILENAME, and builds up a list of svn actions that are required to build the working area. The actions are stored in @list_actions, and each one is a hash containing a command, a directory, etc.
The revision parameter is used as the default revision number for all svn operations, unless the viewspec file has a "rev NUM" clause that overrides the default.
- $s4->apply_viewspec
-
For each of the svn actions in @list_actions, perform the actions. An example of an action is to run svn switch on the Foo directory the the URL Bar at revision 50.
DISTRIBUTION
The latest version is available from CPAN and from http://www.veripool.org/.
Copyright 2005-2008 by Bryce Denney. This package is free software; you can redistribute it and/or modify it under the terms of either the GNU Lesser General Public License or the Perl Artistic License.
AUTHORS
Bryce Denney <bryce.denney@sicortex.com>