The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

VCS::Lite::Element - Minimal Version Control System - Element object

SYNOPSIS

  use VCS::Lite::Element;
  my $ele=VCS::Lite::Element->new('/home/me/dev/testfile.c');
  my $lit=$ele->fetch( generation => 2);
  $ele->check_in( description => 'Fix the bug');
  $ele->update;
  $ele->commit;

DESCRIPTION

A VCS::Lite::Repository contains elements corresponding to the source files being version controlled. The files are real files on the local file system, but additional information about the element is held inside the repository.

This information includes the history of the element, in terms of its generations.

new

  my $ele=VCS::Lite::Element->new('/home/me/dev/testfile.c');

Constructs a VCS::Lite::Element for a given element in a repository. Returns undef if the element is not found in the repository.

fetch

  my $lit=$ele->fetch( generation => 2);
  my $lit2=$ele->fetch( time => '2003-12-29T12:01:25');

The fetch method is used to retrieve generations from the repository. If no time or generation is specified, the latest generation is retrieved. The method returns a VCS::Lite object if successful or undef.

check_in

  $ele->check_in( description => 'Fix bug in foo method');

This method creates a new latest generation in the repository for the element.

update

  $ele->update;

This applies any changes to $ele which have happened in the parent repository, i.e. the one that the current repository was checked out from.

commit

  $ele->commit;

Applies the latest generation change to the parent repository. Note: this updates the file inside the parent file tree; a call to update is required to update the repository.

COPYRIGHT

   Copyright (C) 2003-2004 Ivor Williams (IVORW (at) CPAN {dot} org)
   All rights reserved.

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

SEE ALSO

VCS::Lite::Repository, VCS::Lite.