[Lxr-commits] CVS: lxr/lib/LXR/Files BK.pm,1.1,1.2 Plain.pm,1.24,1.25
Brought to you by:
ajlittoz
From: Malcolm B. <mb...@us...> - 2005-11-02 23:40:03
|
Update of /cvsroot/lxr/lxr/lib/LXR/Files In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15203/lib/LXR/Files Modified Files: Plain.pm Added Files: BK.pm Log Message: Merge of the BK support from bk-dev-branch. This merge closes the bk-dev-branch. Adds support for BK repositories (somewhat incomplete). As BK is no longer free, this is untestable by the maintainer and will therefore not be maintained. It is released here to allow others to take it forward if they want. Also updates and add new testcases. Index: Plain.pm =================================================================== RCS file: /cvsroot/lxr/lxr/lib/LXR/Files/Plain.pm,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- Plain.pm 21 Jul 2004 20:44:31 -0000 1.24 +++ Plain.pm 2 Nov 2005 23:39:55 -0000 1.25 @@ -100,6 +100,10 @@ my ($self, $pathname, $release) = @_; my ($dir, $node, @dirs, @files); + if($pathname !~ m!/$!) { + $pathname = $pathname . '/'; + } + $dir = $self->toreal($pathname, $release); opendir(DIR, $dir) || return (); FILE: while (defined($node = readdir(DIR))) { @@ -164,14 +168,4 @@ return %index; } -sub allreleases { - my ($self, $filename) = @_; - - opendir(SRCDIR, $self->{'rootpath'}); - my @dirs = readdir(SRCDIR); - closedir(SRCDIR); - - return grep { /^[^\.]/ && -r $self->toreal($filename, $_) } @dirs; -} - 1; |