11
11
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
13
# GNU General Public License for more details.
15
15
# You should have received a copy of the GNU General Public License
16
16
# along with this program; if not, write to the Free Software
17
17
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19
19
package LXR::Tagger;
21
$CVSID = '$Id: Tagger.pm,v 1.19 2001/10/23 14:30:18 mbox Exp $ ';
21
$CVSID = '$Id: Tagger.pm,v 1.22 2004/07/21 20:44:30 brondsem Exp $ ';
36
36
return unless $revision;
38
38
print(STDERR "--- $pathname $release $revision\n");
41
my $fileid = $index->fileid($pathname, $revision);
43
$index->release($fileid, $release);
45
if ($index->toindex($fileid)) {
46
$index->empty_cache();
47
print(STDERR "--- $pathname $fileid\n");
49
my $path = $files->tmpfile($pathname, $release);
51
$lang->indexfile($pathname, $path, $fileid, $index, $config);
54
print(STDERR "$pathname was already indexed\n");
56
} else { print(STDERR " **** FAILED ****\n"); }
41
my $fileid = $index->fileid($pathname, $revision);
43
$index->release($fileid, $release);
45
if ($index->toindex($fileid)) {
46
$index->empty_cache();
47
print(STDERR "--- $pathname $fileid\n");
49
my $path = $files->tmpfile($pathname, $release);
51
$lang->indexfile($pathname, $path, $fileid, $index, $config);
52
$index->setindexed($fileid);
55
print(STDERR "$pathname was already indexed\n");
58
print(STDERR " **** FAILED ****\n");
63
65
my ($pathname, $release, $config, $files, $index) = @_;
65
67
my $lang = new LXR::Lang($pathname, $release);
67
69
return unless $lang;
69
71
my $revision = $files->filerev($pathname, $release);
71
73
return unless $revision;
73
75
print(STDERR "--- $pathname $release $revision\n");
76
my $fileid = $index->fileid($pathname, $revision);
78
if ($index->toreference($fileid)) {
79
$index->empty_cache();
80
print(STDERR "--- $pathname $fileid\n");
82
my $path = $files->tmpfile($pathname, $release);
84
$lang->referencefile($pathname, $path, $fileid, $index, $config);
87
print STDERR "$pathname was already referenced\n";
89
} else { print( STDERR " **** FAILED ****\n"); }
78
my $fileid = $index->fileid($pathname, $revision);
80
if ($index->toreference($fileid)) {
81
$index->empty_cache();
82
print(STDERR "--- $pathname $fileid\n");
84
my $path = $files->tmpfile($pathname, $release);
86
$lang->referencefile($pathname, $path, $fileid, $index, $config);
87
$index->setreferenced($fileid);
90
print STDERR "$pathname was already referenced\n";
93
print(STDERR " **** FAILED ****\n");