NAME
VCS::SCCS - OO Interface to SCCS files
SYNOPSIS
use VCS::SCCS;
my $sccs = VCS::SCCS->new ("SCCS/s.file.pl"); # Read and parse
# Meta info
my $fn = $sccs->file (); # s.file.pl
my $cs = $sccs->checksum (); # 52534
my @us = $sccs->users (); # qw( merijn user )
my $fl = $sccs->flags (); # { q => "Test applic", v => undef }
my $cm = $sccs->comment (); # ""
my $cr = $sccs->current (); # 70
my @cr = $sccs->current (); # ( 70, "5.39", 5, 39 )
# Delta related
my $xx = $sccs->delta (...); -- NYI --
my $vs = $sccs->version (); # "5.39"
my $vs = $sccs->version (69); # "5.38"
my $rv = $sccs->revision (); # 70
my $rv = $sccs->revision ("5.37"); # 68
my $rm = $sccs->revision_map (); # [ [ 1, "4.1" ], ... [ 70, "5.39" ]]
# Content related
my $body_70 = $sccs->body (); # file.pl @70 incl NL's
my @body_70 = $sccs->body (); # file.pl @70 list of chomped lines
my @body_69 = $sccs->body (69); # same for file.pl @96
my @body_69 = $sccs->body ("5.38"); # same
-- NYI --
my $diff = $sccs->diff (67); # unified diff between rev 67 and 70
my $diff = $sccs->diff (63, "5.37");# unified diff between rev 63 and 68
DESCRIPTION
SCCS was the dominant version control system until the release of the Revision Control System. Today, SCCS is generally considered obsolete. However, its file format is still used internally by a few other revision control programs, including BitKeeper and TeamWare. Sablime[1] also allows the use of SCCS files. The SCCS file format uses a storage technique called interleaved deltas (or the weave). This storage technique is now considered by many revision control system developers as key to some advanced merging techniques, such as the "Precise Codeville" ("pcdv") merge.
This interface aims at the possibility to read those files, without the need of the sccs utility set, and open up to the possibility of scripts that use it to convert to more modern VCSs like git, Mercurial, CVS, or subversion.
FUNCTIONS
Meta function
- new
- file
- checksum
- users
- flags
- comment
- current
Delta functions
- delta
- version
- revision
- revision_map
Content function
- body
- diff
- translate_keywords
SPECIFICATION
SCCS file format is reasonable well documented. I have included a manual page for sccsfile for HP-UX in doc/
EXAMPLES
See the files in examples/ for my attempts to start convertors to other VCSs
LIMITATIONS
As this module is created as a base for conversion to more useful and robust VCSs, it is a read-only interface to the SCCS files.
BUGS
Tested on our own repositories with perl-5.8.x-dor and perl-5.10.0.
TODO
* document the methods * more tests * sccs2rcs * sccs2cvs * sccs2git * sccs2hg * sccs2svn * errors and warnings
DIAGNOSTICS
First errors, than disgnostics ...
SEE ALSO
SCCS - http://en.wikipedia.org/wiki/Source_Code_Control_System
CSSC - https://sourceforge.net/projects/cssc A GNU project that aims to be a drop-in replacement for SCCS. It is written in c++ and therefor disqualifies to be used at any older OS that does support SCCS but has no C++ compiler. And even if you have one, there is a good chance it won't build or does not bass the basic tests. I didn't get it to work.
AUTHOR
H.Merijn Brand <h.m.brand@xs4all.nl>
COPYRIGHT AND LICENSE
Copyright (C) 2007-2007 H.Merijn Brand
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.