VCfs - Version Control agnostic interface on the local system
my $vc = VCfs->new("."); my %status = $vc->status; my @tags = $vc->taglist;
I need somewhere to put all of this repeated code. There are probably other modules on the CPAN which do this sort of thing differently. The basic idea is to just capture output from shelling-out to the appropriate frontend command for a given version control tool. Examples of usage can be found in the 'bin/' directory of this distribution.
Where necessary, assumes a typical "trunk,branches,tags" layout.
This currently supports svn and svk. Your help and input is welcome.
$vc = VCfs->new($dir|$file, \%options);
Tries to guess at what sort of VCS by examining the directory.
%res = $vc->_do_run(@command);
Returns true if the underlying VCS is <type>.
These are mostly used internally to handle special cases.
my %vals = $vc->get_info;
my @tags = $vc->taglist;
my $dir = $vc->tag_dir;
(Currently) assumes a proj/trunk, proj/tags layout and that we're looking at trunk. I guess you could tag a branch, but, uh...
$vc->taggit($tagname, message => $message);
Big issue: There is no syntax of copy that prevents writing into an existing tag directory. The subversion developers seem to think this should be handled via pre-commit hooks (see http://svn.haxx.se/users/archive-2005-11/0056.shtml for details.)
Just abstraction for standard commands.
my @list = $vc->list($path);
Returns a hash of files and their status codes.
%status = $vc->status(@files);
Takes an array reference or string for propvals.
$vc->propset($propname, \@vals, @files); $vc->propset($propname, $valstring, @files);
Eric Wilhelm @ <ewilhelm at cpan dot org>
If you found this module on CPAN, please report any bugs or feature requests through the web interface at http://rt.cpan.org. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
If you pulled this development version from my /svn/, please contact me directly.
Copyright (C) 2004-2009 Eric L. Wilhelm, All Rights Reserved.
Absolutely, positively NO WARRANTY, neither express or implied, is offered with this software. You use this software at your own risk. In case of loss, no person or entity owes you anything whatsoever. You have been warned.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.