VCfs - Version Control agnostic interface on the local system


VCfs documentation  | view source Contained in the VCfs distribution.

Index


NAME

Top

VCfs - Version Control agnostic interface on the local system

Synopsis

Top

  my $vc = VCfs->new(".");
  my %status = $vc->status;
  my @tags = $vc->taglist;

About

Top

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.

Constructor

Top

new

  $vc = VCfs->new($dir|$file, \%options);

Methods

Top

detect

Tries to guess at what sort of VCS by examining the directory.

  $vc->detect;

_do_run

  %res = $vc->_do_run(@command);

is_<type>

Returns true if the underlying VCS is <type>.

These are mostly used internally to handle special cases.

is_svn
is_svk
is_cvs
is_darcs

get_log

  $vc->get_log($target);

get_log_times

  $vc->get_log_times($target);

get_info

  my %vals = $vc->get_info;

taglist

  my @tags = $vc->taglist;

tag_dir

  my $dir = $vc->tag_dir;

taggit

(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.)

normal methods

Top

Just abstraction for standard commands.

add

  $vc->add(@files);

remove

  $vc->remove(@files);

commit

  $vc->commit($message, @files);

update

  $vc->update;

list

  my @list = $vc->list($path);

revert

  $vc->revert(@files);

status

Returns a hash of files and their status codes.

  %status = $vc->status(@files);

propget

  $vc->propget($propname, $url||$file);

propset

Takes an array reference or string for propvals.

  $vc->propset($propname, \@vals, @files);

  $vc->propset($propname, $valstring, @files);

AUTHOR

Top

Eric Wilhelm @ <ewilhelm at cpan dot org>

http://scratchcomputing.com/

BUGS

Top

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

Top

NO WARRANTY

Top

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.

LICENSE

Top

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.


VCfs documentation  | view source Contained in the VCfs distribution.