[Lxr-commits] CVS: lxr/lib/LXR Files.pm,1.8.2.1,1.8.2.2
Brought to you by:
ajlittoz
From: Malcolm B. <mb...@us...> - 2005-02-13 19:35:14
|
Update of /cvsroot/lxr/lxr/lib/LXR In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13184/lib/LXR Modified Files: Tag: bk-dev-branch Files.pm Log Message: Updated implementation of BitKeeper interface. Now uses bk rset to get all the details of the tree. Can correctly access various versions of the files across moves, deletes etc. Index: Files.pm =================================================================== RCS file: /cvsroot/lxr/lxr/lib/LXR/Files.pm,v retrieving revision 1.8.2.1 retrieving revision 1.8.2.2 diff -u -d -r1.8.2.1 -r1.8.2.2 --- Files.pm 4 Dec 2004 23:31:14 -0000 1.8.2.1 +++ Files.pm 13 Feb 2005 19:35:05 -0000 1.8.2.2 @@ -23,22 +23,87 @@ use strict; sub new { - my ($self, $srcroot) = @_; + my ( $self, $srcroot ) = @_; my $files; - if ($srcroot =~ /^CVS:(.*)/i) { + if ( $srcroot =~ /^CVS:(.*)/i ) { require LXR::Files::CVS; $srcroot = $1; $files = new LXR::Files::CVS($srcroot); - } elsif ($srcroot =~ /^bk:(.*)/i) { + } + elsif ( $srcroot =~ /^bk:(.*)/i ) { require LXR::Files::BK; $srcroot = $1; - $files = new LXR::Files::BK($srcroot); - } else { + $files = new LXR::Files::BK($srcroot); + } + else { require LXR::Files::Plain; $files = new LXR::Files::Plain($srcroot); } return $files; } +# Stub implementations of the Files interface + +sub getdir { + my $self = shift; + die '::getdir not implemented'; +} + +sub getfile { + my $self = shift; + die '::getfile not implemented'; +} + +sub getannotations { + my $self = shift; + die '::getannotations not implemented'; +} + +sub getauthor { + my $self = shift; + die '::getauthor not implemented'; +} + +sub filerev { + my $self = shift; + die '::filerev not implemented'; +} + +sub getfilehandle { + my $self = shift; + die '::getfilehandle not implemented'; +} + +sub getfilesize { + my $self = shift; + die '::getfilesize not implemented'; +} + +sub getfiletime { + my $self = shift; + die '::getfiletime not implemented'; +} + +sub getindex { + my $self = shift; + die '::getindex not implemented'; +} + +sub isdir { + my $self = shift; + die '::isdir not implemented'; +} + +sub isfile { + my $self = shift; + die '::isfile not implemented'; +} + +sub toreal { + # FIXME: this function should probably not exist, since it doesn't make sense for + # all file access methods + return undef; +} + 1; |