[Lxr-commits] CVS: lxr/lib/LXR Index.pm, 1.13, 1.14 Tagger.pm, 1.23, 1.24
Brought to you by:
ajlittoz
From: Malcolm B. <mb...@us...> - 2009-05-06 22:38:03
|
Update of /cvsroot/lxr/lxr/lib/LXR In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv28856/lib/LXR Modified Files: Index.pm Tagger.pm Log Message: Fix for bugs 2787781 and 2787771. Changes the interface to Mysql & Postgres to match the documentation so that fileindexed returns whether the file has been indexed, not whether it needs indexing. Aligned the Postgres and Mysql implementations of fileindexed, filereferenced, setfileindexed and setfilereferenced. NOTE: This commit will break any Index module that has not been updated. Part II will fix these Index: Index.pm =================================================================== RCS file: /cvsroot/lxr/lxr/lib/LXR/Index.pm,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- Index.pm 25 Apr 2009 20:40:24 -0000 1.13 +++ Index.pm 6 May 2009 22:37:50 -0000 1.14 @@ -72,6 +72,11 @@ return; } +# If the file referred to by $fileid has already been referenced +# return true. Otherwise return false. NOTE: a file must *always* +# be indexed before being referenced - calling setfilereferenced +# implicitly sets fileindexed as well + sub filereferenced { my ($self, $fileid) = @_; my $referencefoundboolean; Index: Tagger.pm =================================================================== RCS file: /cvsroot/lxr/lxr/lib/LXR/Tagger.pm,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- Tagger.pm 25 Apr 2009 20:40:24 -0000 1.23 +++ Tagger.pm 6 May 2009 22:37:50 -0000 1.24 @@ -42,7 +42,7 @@ $index->setfilerelease($fileid, $release); - if ($index->fileindexed($fileid)) { + if (!$index->fileindexed($fileid)) { $index->emptycache(); print(STDERR "--- $pathname $fileid\n"); @@ -77,7 +77,7 @@ if ($index) { my $fileid = $index->fileid($pathname, $revision); - if ($index->filereferenced($fileid)) { + if (!$index->filereferenced($fileid)) { $index->emptycache(); print(STDERR "--- $pathname $fileid\n"); |