lxr-general Mailing List for LXR Cross Referencer (Page 5)
Brought to you by:
ajlittoz
You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(3) |
Jul
|
Aug
(1) |
Sep
(6) |
Oct
|
Nov
(13) |
Dec
(4) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(8) |
Feb
(4) |
Mar
(6) |
Apr
(5) |
May
(5) |
Jun
(4) |
Jul
(8) |
Aug
(3) |
Sep
(6) |
Oct
(7) |
Nov
(7) |
Dec
(10) |
2003 |
Jan
(9) |
Feb
(4) |
Mar
(8) |
Apr
(12) |
May
(13) |
Jun
(9) |
Jul
(13) |
Aug
(10) |
Sep
(3) |
Oct
(3) |
Nov
(19) |
Dec
(14) |
2004 |
Jan
(11) |
Feb
(10) |
Mar
(7) |
Apr
(5) |
May
(4) |
Jun
(4) |
Jul
(2) |
Aug
|
Sep
(3) |
Oct
(2) |
Nov
(6) |
Dec
(6) |
2005 |
Jan
(11) |
Feb
(1) |
Mar
(6) |
Apr
(4) |
May
(7) |
Jun
(13) |
Jul
(9) |
Aug
(32) |
Sep
(27) |
Oct
(31) |
Nov
(17) |
Dec
(24) |
2006 |
Jan
(19) |
Feb
(25) |
Mar
(30) |
Apr
(28) |
May
(35) |
Jun
(38) |
Jul
(21) |
Aug
(31) |
Sep
(38) |
Oct
(68) |
Nov
(84) |
Dec
(83) |
2007 |
Jan
(45) |
Feb
(78) |
Mar
(72) |
Apr
(67) |
May
(51) |
Jun
(49) |
Jul
(125) |
Aug
(113) |
Sep
(74) |
Oct
(59) |
Nov
(63) |
Dec
(55) |
2008 |
Jan
(58) |
Feb
(53) |
Mar
(56) |
Apr
(224) |
May
(282) |
Jun
(269) |
Jul
(354) |
Aug
(552) |
Sep
(277) |
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(6) |
Nov
(8) |
Dec
|
2010 |
Jan
(3) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
(3) |
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
(6) |
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Jan-Benedict G. <jb...@lu...> - 2006-12-07 10:17:39
|
--- lib/LXR/Common.pm | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/LXR/Common.pm b/lib/LXR/Common.pm index 5c95ac5..d507a50 100644 --- a/lib/LXR/Common.pm +++ b/lib/LXR/Common.pm @@ -457,7 +457,7 @@ sub printhttp { # httpinit - parses and cleans up the URL parameters and sets up the various variables # Also prints the HTTP header & sets up the signal handlers # This is also where we protect from malicious input -# +# # HTTP: # path_info - # param - Array of parameters @@ -490,7 +490,7 @@ sub httpinit { # remove the param versions to prevent unclean versions being used delete $HTTP->{'param'}->{'i'}; delete $HTTP->{'param'}->{'identifier'}; - + $config = new LXR::Config($HTTP->{'this_url'}); die "Can't find config for " . $HTTP->{'this_url'} if !defined($config); $files = new LXR::Files($config->sourceroot, $config->sourceparams); @@ -505,7 +505,7 @@ sub httpinit { $release = clean_release($config->variable('v')); $config->variable('v', $release); # put back into config obj - + $HTTP->{'param'}->{'file'} = clean_path($HTTP->{'param'}->{'file'}); $pathname = fixpaths($HTTP->{'path_info'} || $HTTP->{'param'}->{'file'}); @@ -517,7 +517,7 @@ sub clean_release { my @rels= $config->varrange('v'); my %test; @test{@rels} = undef; - + if(!exists $test{$release}) { $release = $config->vardefault('v'); } @@ -535,7 +535,7 @@ sub clean_identifier { sub clean_path { # Cleans up a string to path my $path = shift; - + if(defined $path) { # First suppress anything after a dodgy character $path =~ s!(^[\w_+\-,\.%\^/\!]+).*!$1!; @@ -544,10 +544,10 @@ sub clean_path { $path =~ s!/\.\.?/!/!g; } } - + return $path; } - + sub httpclean { $config = undef; $files = undef; @@ -564,14 +564,14 @@ sub expandtemplate { if (defined($expfun = $expfunc{$2})) { if ($3 eq '') { &$expfun(undef); - } + } else { $exppar = $4; $exppar =~ s#\01#\{#gs; $exppar =~ s#\02#\}#gs; &$expfun($exppar); } - } + } else { $1; } -- 1.4.4.1 |
From: Jan-Benedict G. <jb...@lu...> - 2006-12-07 10:17:38
|
--- lib/LXR/Common.pm | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/LXR/Common.pm b/lib/LXR/Common.pm index fea8479..5c95ac5 100644 --- a/lib/LXR/Common.pm +++ b/lib/LXR/Common.pm @@ -376,7 +376,7 @@ sub fixpaths { while ($node =~ s|/[^/]+/\.\./|/|g) { } $node =~ s|/\.\./|/|g; - $node .= '/' if $files->isdir($node); + $node .= '/' if $files->isdir($node, $release); $node =~ s|//+|/|g; return $node; -- 1.4.4.1 |
From: Jan-Benedict G. <jb...@lu...> - 2006-12-07 10:12:50
|
Hi! This is our current set of LXR patches. I'd like to get feedback on those and if you like to merge them. MfG, JBG --=20 Jan-Benedict Glaw jb...@lu... +49-172-7608481 Signature of: If it doesn't work, force it. the second : If it breaks, it needed replacing anyway. |
From: Jan-Benedict G. <jb...@lu...> - 2006-12-06 10:53:24
|
On Sun, 2006-11-26 23:47:51 +0100, Jan-Benedict Glaw <jb...@lu...> wr= ote: > This patch fixes a caller of the isdir() function. The GIT backend > needs a version being supplied. It was written by Maximilian Wilhelm. >=20 > Index: lib/LXR/Common.pm > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /cvsroot/lxr/lxr/lib/LXR/Common.pm,v > retrieving revision 1.55 > diff -u -r1.55 Common.pm > --- lib/LXR/Common.pm 4 Apr 2006 22:23:43 -0000 1.55 > +++ lib/LXR/Common.pm 26 Nov 2006 22:39:54 -0000 > @@ -376,7 +376,7 @@ > while ($node =3D~ s|/[^/]+/\.\./|/|g) { } > $node =3D~ s|/\.\./|/|g; > =20 > - $node .=3D '/' if $files->isdir($node); > + $node .=3D '/' if $files->isdir($node, $release); > $node =3D~ s|//+|/|g; > =20 > return $node; Are the patches I've sent about to be accepted and imported into upstream LXR? I'd like to work on drop-down boxed variables, but I don't like having a lot of outstanding patches with a poor SCM like CVS is... MfG, JBG --=20 Jan-Benedict Glaw jb...@lu... +49-172-7608481 Signature of: Alles sollte so einfach wie m=C3=B6glich gemacht= sein. the second : Aber nicht einfacher. (Einstein) |
From: Malcolm B. <mal...@gm...> - 2006-11-29 16:30:10
|
On 11/27/06, Lewis Evans <le...@le...> wrote: > If there's a single physical directory housing many different c# projects, > can LXR/glimpse provide a cross-reference search for them? > Would be most useful for searching multiple c# projects from one place. LXR can index any source code supported by Exuberant Ctags - and C# is supported by recent versions. At the moment there's some missing configuration glue for C#. The file that needs to be updated is lib/LXR/Lang/generic.conf, and then the filename <> language mapping in lxr.conf would need updating. As a first stab, I'd copy the C or C++ stanzas in generic.conf to make a C# section, and see what sort of results you get. Once LXR is modified to understand C#, then indexing multiple projects in a single directory is no problem at all - you can either treat them as separate projects searchable through one interface, or as parts of a larger project in which case hyperlinks will go between them. Cheers, Malcolm |
From: Jan-Benedict G. <jb...@lu...> - 2006-11-28 12:15:24
|
Hi! I've genxref'ed all of Linus's tags from his repository. This took about three days on the laptop I was using (P4 HT 2.8GHz, 512MB RAM, untuned PostgreSQL 8.1) After VACUUMing the database, it takes about 4.8 GB space on the HDD (probably mostly due to GIT's long revision names, which are SHA1 checksum results printed in hex.) lxr=3D> select count(*) from lxr_declarations; count=20 ------- 80 (1 row) lxr=3D> select count(*) from lxr_files; count=20 ------- 72668 (1 row) lxr=3D> select count(*) from lxr_indexes; count =20 --------- 5075457 (1 row) lxr=3D> select count(*) from lxr_releases; count =20 -------- 956810 (1 row) lxr=3D> select count(*) from lxr_status; count=20 ------- 72668 (1 row) lxr=3D> select count(*) from lxr_symbols; count =20 -------- 637475 (1 row) Next goals are to rework arch and version variable setting to use drop-down lists instead of a hugh number of displayed links. ...and I need to debug why LXR doesn't prepare links for all the inlcude files included from within C source files... MfG, JBG --=20 Jan-Benedict Glaw jb...@lu... +49-172-7608481 Signature of: Gib Dein Bestes. Dann =C3=BCbertriff Dich sel= bst! the second : |
From: Malcolm B. <mal...@gm...> - 2006-11-27 17:39:53
|
On 11/25/06, Jan-Benedict Glaw <jb...@lu...> wrote: > Hi! > I'd propose to rework the variable stuff to not display all values, > but to display one drop-down per variable and a submit button (as well > as place some little java script to automatically try to submit upon > value change.) > > What do you think about this? Sounds like a good idea to me. Malcolm |
From: Lewis E. <le...@le...> - 2006-11-27 14:32:25
|
If there's a single physical directory housing many different c# projects, can LXR/glimpse provide a cross-reference search for them? Would be most useful for searching multiple c# projects from one place. All suggestions much appreciated. |
From: Jan-Benedict G. <jb...@lu...> - 2006-11-26 22:52:42
|
Hi! This adds some description of those two variables that may be set in conjunction with the GIT backend. Index: templates/lxr.conf =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/lxr/lxr/templates/lxr.conf,v retrieving revision 1.27 diff -u -r1.27 lxr.conf --- templates/lxr.conf 8 Apr 2006 13:37:58 -0000 1.27 +++ templates/lxr.conf 26 Nov 2006 22:39:55 -0000 @@ -124,9 +124,23 @@ =20 # The name to display for this source tree 'sourcerootname' =3D> 'Example', - =09 - # Any parameters to the source access method should be specified below - 'sourceparams' =3D> {'cachepath' =3D> '/a/path/here'}, + + # + # Any parameters to the source access method should be specified below. + # + # BK: 'cachepath' is used for temporary files + # GIT: if `do_annotations' is non-zero, the file revision that + # introduced each line is displayed. + # `do_blame' will add the author of each line to the + # output. Keep in mind that the core LXR code + # will only request author information if + # annotations are switched on, too! + # + 'sourceparams' =3D> { + 'cachepath' =3D> '/a/path/here', + 'do_annotate' =3D> 1, + 'do_blame' =3D> 1, + }, =20 # The DBI identifier for the database to use # For mysql, the format is dbi:mysql:dbname=3D<name> MfG, JBG --=20 Jan-Benedict Glaw jb...@lu... +49-172-7608481 Signature of: If it doesn't work, force it. the second : If it breaks, it needed replacing anyway. |
From: Jan-Benedict G. <jb...@lu...> - 2006-11-26 22:51:09
|
Hi! This patch implements a rewrite of the GIT backend. Should be more stable/less errorprone and catch more corner cases that didn't work with the initial version. By Maximilian Wilhelm and me. Index: lib/LXR/Files/GIT.pm =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/lxr/lxr/lib/LXR/Files/GIT.pm,v retrieving revision 1.1 diff -u -r1.1 GIT.pm --- lib/LXR/Files/GIT.pm 8 Apr 2006 13:37:58 -0000 1.1 +++ lib/LXR/Files/GIT.pm 26 Nov 2006 22:39:54 -0000 @@ -1,7 +1,9 @@ -# -*- tab-width: 4 -*- ############################################### # -# $Id: GIT.pm,v 1.1 2006/04/08 13:37:58 mbox Exp $ - +# GIT.pm - A file backend for LXR based on GIT. +# +# =C2=A9 2006 by Jan-Benedict Glaw <jb...@lu...> +# =C2=A9 2006 by Maximilian Wilhelm <ma...@rf...> +# # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or @@ -13,409 +15,240 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# along with this program; if not, write to the Free Software Foundation +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA +# =20 package LXR::Files::GIT; =20 -$CVSID =3D '$Id: GIT.pm,v 1.1 2006/04/08 13:37:58 mbox Exp $'; +$CVSID =3D '$Id$'; =20 use strict; use FileHandle; +use Time::Local; use LXR::Common; -use LXR::Author; +use Git; =20 -# -# We're adding ".git" to the path since we're only dealing with -# low-level stuff and _never_ ever deal with checked-out files. -# sub new { my ($self, $rootpath, $params) =3D @_; =20 $self =3D bless({}, $self); $self->{'rootpath'} =3D $rootpath; + $self->{'do_blame'} =3D $$params{'do_blame'}; + $self->{'do_annotations'} =3D $$params{'do_annotations'}; + + if ($self->{'do_blame'}) { + # Blame support will only work when commit IDs are available, + # called annotations here... + $self->{'do_annotations'} =3D 1; + } =20 - $ENV{'GIT_DIR'} =3D $self->{'rootpath'}; return $self; } =20 -sub filerev { - my ($self, $filename, $release) =3D @_; - - $filename =3D $self->sanitizePath ($filename); - $release =3D $self->get_treehash_for_branchhead_or_tag ($release); +sub isdir { + my ($self, $pathname, $release) =3D @_; =20 - my $pid =3D open(my $F, '-|'); - die $! unless defined $pid; - if (!$pid) { - exec ("git-ls-tree", $release, $filename) - or die "filerev: Cannot exec git-ls-tree";=20 - } - - my $git_line=3D<$F>; - chomp $git_line; - close($F); - - if ($git_line =3D~ m/(\d+)\s(\w+)\s([[:xdigit:]]+)\t(.*)/ ) { - return $3; - =09 + $pathname =3D~ s/^\///; + if ($pathname eq "") { + return 1 =3D=3D 1; } else { - die "filerev( $filename, $release ): No entry found.\n"; + my $repo =3D Git->repository (Directory =3D> "$self->{'rootpath'}"); + my $line =3D $repo->command_oneline ("ls-tree", "-d", "$release", "$path= name"); + return $line =3D~ m/^\d+ tree .*$/; } } =20 -sub getfiletime { - my ($self, $filename, $release) =3D @_; - $filename =3D $self->sanitizePath ($filename); - - if ($filename =3D~ m/\/\.\.$/ ) - return undef; -# if ($filename =3D~ /\/\.\.\$/) -# return undef; +sub isfile { + my ($self, $pathname, $release) =3D @_; =20 - my $pid1 =3D open(my $R, '-|' ); - die $! unless defined $pid1; - if(!$pid1) { - exec("git-rev-list", "--max-count=3D1", "$release", "--", $filename ) or= die "getfiletime ($filename, $release): Cannot exec git-rev-list\n"; - } - my $commit =3D <$R>; - chomp $commit; - close($R); -=09 - my $pid =3D open(my $F, '-|'); - die $! unless defined $pid; - if(!$pid) { - exec("git-cat-file", "commit", $commit) or die "getfiletime ($filename, = $release): Cannot exec git-cat-file\n"; - } - - while(<$F>) { - chomp; - if ( m/^author .*<.*> (\d+)\s.*$/ ) { - close($F); - return $1; - } + $pathname =3D~ s/^\///; + if ($pathname eq "") { + return 1 =3D=3D 0; + } else { + my $repo =3D Git->repository (Directory =3D> "$self->{'rootpath'}"); + my $line =3D $repo->command_oneline ("ls-tree", "-d", "$release", "$path= name"); + return $line =3D~ m/^\d+ blob .*$/; } -=09 - close($F); - - die "getfiletime ($filename, $release) : Did not find GIT entry.\n"; } =20 -sub getfilesize { - my ($self, $filename, $release) =3D @_; +sub getdir { + my ($self, $pathname, $release) =3D @_; + my ($dir, $node, @dirs, @files); + my $repo =3D Git->repository (Directory =3D> "$self->{'rootpath'}"); =20 - $filename =3D $self->sanitizePath ($filename); - my $object_hash =3D $self->filerev ($filename, $release); + $pathname =3D~ s/^\///; =20 - print STDERR "getfilesize ($filename, $release)\n"; + my ($fh, $c) =3D $repo->command_output_pipe ("ls-tree", "$release", "$pat= hname"); + while (<$fh>) { + if (m/(\d+) (\w+) ([[:xdigit:]]+)\t(.*)/) { + my ($entrymode, $entrytype, $objectid, $entryname) =3D ($1, $2, $3, $4); =20 - # return `git-cat-file -s $blobhash`; - my $pid =3D open (my $F, '-|'); - die $! unless defined $pid; - if(!$pid) {=09 - exec ("git-cat-file", "-s", $object_hash) or die "getfilesize ($filename= , $release): Cannot exec git-cat-file\n"; - } - - my $size =3D <$F>; - close ($F); - chomp $size; - if ( $size ) { - return $size; - } else { - return undef; - } + # Only get the filename part of the full path + my @array =3D split (/\//, $entryname); + my $num =3D @array - 1; + $entryname =3D @array[$num]; =20 - close ($F); - return undef; -} + # Weed out things to ignore + foreach my $ignoredir ($config->{ignoredirs}) { + next if $entryname eq $ignoredir; + } =20 -sub getfile { - my ($self, $filename, $release) =3D @_; - my ($buffer); + next if $entryname =3D~ /^\.$/; + next if $entryname =3D~ /^\.\.$/; =20 -# my $blobhash =3D open( "git-ls-tree $release $filename | cut -f 3 -d ' '= | cut -f 1 -d \$'\t' |") or die "Cannot open git-ls-tree $release $filenam= e in getfile\n"; - my $blobhash =3D $self->filerev( $filename, $release ); -# local ($/) =3D undef; - - open(FILE, "git-cat-file blob $blobhash|") || return undef; - $buffer =3D <FILE>; - close(FILE); - return $buffer; + if ($entrytype eq "blob") { + push (@files, $entryname); + } elsif ($entrytype eq "tree") { + push (@dirs, "$entryname/"); + } + } + } + + $repo->command_close_pipe ($fh, $c); + + return sort (@dirs), sort (@files); } =20 -sub getfilehandle { +sub getfilesize { my ($self, $filename, $release) =3D @_; - my ($fileh); - $filename =3D $self->sanitizePath ($filename); + my $repo =3D Git->repository (Directory =3D> "$self->{'rootpath'}"); =20 - my $treeid =3D $self->get_treehash_for_branchhead_or_tag ($release); + $filename =3D~ s/^\///; =20 - $filename =3D $self->sanitizePath ($filename); - my $objectid =3D $self->getBlobOrTreeOfPathAndTree ($filename, $treeid); + my $sha1hashline =3D $repo->command_oneline ("ls-tree", "$release", "$fil= ename"); =20 - $fileh =3D new IO::File; - $fileh->open ("git-cat-file blob $objectid |") or die "Cannot execute git= -cat-file blob $objectid"; + if ($sha1hashline =3D~ m/\d+ blob ([[:xdigit:]]+)\t.*/) { + return $repo->command_oneline ("cat-file", "-s", "$1"); + } =20 - return $fileh; + return undef; } =20 sub tmpfile { my ($self, $filename, $release) =3D @_; my ($tmp, $fileh); - local ($/) =3D undef; =20 $tmp =3D $config->tmpdir . '/lxrtmp.' . time . '.' . $$ . '.' . &LXR::Com= mon::tmpcounter; - open(TMP, "> $tmp") || return undef; - $fileh =3D $self->getfilehandle( $filename, $release ); - print(TMP <$fileh>); - close($fileh); - close(TMP); + open (TMP, "> $tmp") || return undef; + $fileh =3D $self->getfilehandle ($filename, $release); + print (TMP <$fileh>); + close ($fileh); + close (TMP); =20 return $tmp; } =20 -sub getannotations { +sub filerev { + my ($self, $filename, $release) =3D @_; + my $repo =3D Git->repository (Directory =3D> "$self->{'rootpath'}"); =20 - return (); - my ($self, $pathname, $release) =3D @_; - my @authors =3D (); + $filename =3D~ s/^\///; =20 - if ( $pathname =3D~ m#^/(.*)$# ) { - $pathname =3D $1; - } -=09 - open( BLAME, "git-blame -l $pathname $release |"); - while( <BLAME> ) { - if ( m/(^[[:xdigit:]]+)\s.*$/ ) { - my $linehash =3D $1; - my $authorline =3D `git-cat-file commit $linehash`; - if ($authorline =3D~ m/^author ([^<]+)<(([^@])\@[^>]+)>.*$/ ) { - my ($authorname, $authoruser, $authoremail) =3D ($1, $2, $3); - push(@authors, LXR::Author->new(chomp $authorname, - $authoruser, $authoremail)); - } else { - push(@authors, LXR::Author->new("", "", "")); - } - } else {=09 - print STDERR "getannotations: JB HAT DOOFE OHREN: $_\n"; - } + my $sha1hashline =3D $repo->command_oneline ("ls-tree", "$release", "$fil= ename"); + + if ($sha1hashline =3D~ m/\d+ blob ([[:xdigit:]]+)\t.*/) { + return $1; } - close(BLAME); =20 - print STDERR "authors: " . join(" ", @authors) . "\n"; -=09 - return @authors; + return undef; } =20 -sub getauthor { +sub getfiletime { + my ($self, $filename, $release) =3D @_; =20 - return (); + $filename =3D~ s/^\///; =20 - my ($self, $filename, $release) =3D @_; - $filename =3D $self->sanitizePath ($filename); - print STDERR "getauthr( $filename, $release )\n"; - my $commit =3D `git-rev-list --max-count=3D1 $release -- $filename | tr -= d \$'\n'`; - my $authorline =3D `git-cat-file commit $commit | grep '^author' | head -= n1 | tr -d \$'\n'`; - - if ($authorline =3D~ m/^author ([^<]+)<(([^@])\@[^>]+)>.*$/ ) { - my ($authorname, $authoruser, $authoremail) =3D ($1, $2, $3); - return LXR::Author->new(chomp $authorname, $authoruser, $authoremail); - } else { - return LXR::Author->new("", "", ""); + if ($filename eq "") { + return undef; } -} - -sub getdir { - my ($self, $pathname, $release) =3D @_; - my ($dir, $node, @dirs, @files); -=09 - my $treeid =3D $self->get_treehash_for_branchhead_or_tag ($release); -=09 - $pathname =3D $self->sanitizePath( $pathname ); - if ( $pathname !~ m#..*/# ) { - $pathname =3D $pathname . '/'; + if ($filename =3D~ m/\/$/) { + return undef; } =20 - open(DIRLIST, "git-ls-tree $treeid $pathname |") or die "Cannot open git-= ls-tree $treeid $pathname"; - while( <DIRLIST> ) { - if ( m/(\d+)\s(\w+)\s([[:xdigit:]]+)\t(.*)/ ) { - my ($entrymode, $entrytype, $objectid, $entryname) =3D ($1,$2,$3,$4); - - # Weed out things to ignore - foreach my $ignoredir ($config->{ignoredirs}) { - next if $entryname eq $ignoredir; - } - - next if $entryname =3D~ /^\.$/; - next if $entryname =3D~ /^\.\.$/; - - if ($entrytype eq "blob") { - push(@files, $entryname); - =09 - } elsif ($entrytype eq "tree") { - push(@dirs, "$entryname/"); - #push(@dirs, "$entryname"); + my $repo =3D Git->repository (Directory =3D> "$self->{'rootpath'}"); + my $lastcommitline =3D $repo->command_oneline ("log", "--max-count=3D1", = "--pretty=3Doneline", "$release", "--", "$filename"); + if ($lastcommitline =3D~ m/([[:xdigit:]]+) /) { + my $commithash =3D $1; + + my (@fh, $c) =3D $repo->command ("cat-file", "commit", "$commithash"); + foreach my $line (@fh) { + if ($line =3D~ m/^author .* <.*> (\d+) .[0-9]{4}$/) { + return $1; } } + return undef; } - close(DIRLIST); -=09 - return sort(@dirs), sort(@files); -} - -# This function should not be used outside this module -# except for printing error messages -# (I'm not sure even that is legitimate use, considering -# other possible File classes.) - -##sub toreal { -## my ($self, $pathname, $release) =3D @_; -## -## nearly all (if not all) method calls eventually call toreal(), so this = is a good place to block file access -## foreach my $ignoredir ($config->ignoredirs) { -## return undef if $pathname =3D~ m|/$ignoredir/|; -## } -## -## return ($self->{'rootpath'} . $release . $pathname); -##} - -sub isdir { - my ($self, $pathname, $release) =3D @_; - - $pathname =3D $self->sanitizePath ($pathname); - $release =3D $self->get_newest_commit_from_branchhead_or_tag ($release); - - print STDERR "isdir ($pathname, $release)\n"; - - my $treeid =3D $self->get_treehash_for_branchhead_or_tag ($release); - - return $self->getObjectType ($pathname, $treeid) eq "tree"; -} - -sub isfile { - my ($self, $pathname, $release) =3D @_; =20 - $pathname =3D $self->sanitizePath ($pathname); - $release =3D $self->get_newest_commit_from_branchhead_or_tag ($release); -=09 - print STDERR "isfile($pathname, $release)\n"; - - my $treeid =3D $self->get_treehash_for_branchhead_or_tag ($release); -=09 - return $self->getObjectType ($pathname, $treeid) eq "blob"; + return undef; } =20 -# -# For a given commit (that is, the latest commit on a named branch or -# a tag's name) return the tree object's hash corresponding to it. -# -sub get_treehash_for_branchhead_or_tag () { - my ($self, $release) =3D @_; - $release =3D $self->get_newest_commit_from_branchhead_or_tag ($release); - - return `git-cat-file commit $release | grep '^tree' | head -n1 | cut -f 2= -d ' ' | tr -d \$'\n'`; -} +sub getfilehandle { + my ($self, $filename, $release) =3D @_; + my $repo =3D Git->repository (Directory =3D> "$self->{'rootpath'}"); =20 -sub getObjectType() { - my ($self, $pathname, $treeid) =3D @_; + $filename =3D~ s/^\///; =20 - open (DIRLIST, "git-ls-tree $treeid $pathname |") or die "Cannot open git= -ls-tree $treeid $pathname"; - while (<DIRLIST>) { - if (m/(\d+)\s(\w+)\s([[:xdigit:]]+)\t(.*)/) { - my ($entrymode, $entrytype, $objectid, $entryname) =3D ($1, $2, $3, $4); + my $sha1hashline =3D $repo->command_oneline ("ls-tree", "$release", "$fi= lename"); =20 - # Weed out things to ignore -# # This should only be needed in the getdir function. -# foreach my $ignoredir ($config->{ignoredirs}) { -# next if $entryname eq $ignoredir; -# } - - $entryname =3D $self->sanitizePath ($entryname); - -# print STDERR "getBlobOrTreeOfPathAndTree: pathname: \"$pathname\" :: e= ntryname: \"$entryname\"\n"; - next if ( ! $pathname eq $entryname ); - - close (DIRLIST); -# print STDERR "Juhu, wir haben $pathname gefunden :: $objectid\n"; - return $entrytype; - } + if ($sha1hashline =3D~ m/^\d+ blob ([[:xdigit:]]+)\t.*/) { + my ($fh, $c) =3D $repo->command_output_pipe ("cat-file", "blob", "$1"); + return $fh; } - close (DIRLIST); =20 return undef; } =20 -sub getBlobOrTreeOfPathAndTree() { - my ($self, $pathname, $treeid ) =3D @_; - - open (DIRLIST, "git-ls-tree $treeid $pathname |") or die "Cannot open git= -ls-tree $treeid $pathname"; - while (<DIRLIST>) { - if (m/(\d+)\s(\w+)\s([[:xdigit:]]+)\t(.*)/) { - my ($entrymode, $entrytype, $objectid, $entryname) =3D ($1, $2, $3, $4); +sub getannotations { + my ($self, $filename, $release) =3D @_; =20 - # Weed out things to ignore - foreach my $ignoredir ($config->{ignoredirs}) { - next if $entryname eq $ignoredir; + if ($self->{'do_annotations'}) { + my $repo =3D Git->repository (Directory =3D> "$self->{'rootpath'}"); + my @revlist =3D (); + $filename =3D~ s/^\///; + + my (@lines, $c) =3D $repo->command ("blame", "-l", "$release", "--", "$f= ilename"); + + foreach my $line (@lines) { + if ($line =3D~ m/^([[:xdigit:]]+) .*/) { + push (@revlist, $1); + } else { + push (@revlist, ""); } - - $entryname =3D $self->sanitizePath( $entryname ); - next if (! $pathname eq $entryname ); - - close (DIRLIST); - return $objectid; } - } - close (DIRLIST); =20 - return undef; -} - -# -# This function will take a branch name ("master") or a tag name -# (like "v2.6.15") and return either the branch commit object ID, -# or descend from the tag object into the referenced commit object -# and return its commit ID. XXX -# -sub get_newest_commit_from_branchhead_or_tag ($$) { - my ($self, $head_or_tag) =3D @_; - my $objtype =3D `git-cat-file -t $head_or_tag | tr -d \$'\n'`; - - if ($objtype eq "commit") { - return $head_or_tag; - } elsif ($objtype eq "tag") { - return `git-cat-file tag $head_or_tag | grep '^object' | head -n1 | cut = -f 2 -d ' ' | tr -d \$'\n'`; + return @revlist; } else { - die ("get_newest_commit_from_branchhead_or_tag: Unrecognized object type= $objtype for $head_or_tag\n"); + return (); } } =20 -sub sanitizePath() { - my ($self, $pathname) =3D @_; - - if ( $pathname eq "" ) { - # Empty? Just beam the client to the root. - $pathname =3D "."; - } elsif ( $pathname =3D~ m#^/# ) { - # Absolute? We want them to be relative! - $pathname =3D ".$pathname"; - } else { - # Filename incurrent directory? Add "./" to - # make them truly relative. - $pathname =3D "./$pathname"; - } - - # Don't let them exploit us easily. -# if ( $pathname =3D~ m#/../# ) { -# die("You are now dead because of $pathname\n"); -# } +sub getauthor { + my ($self, $pathname, $release) =3D @_; =20 - # Doubled slashes? We remove them. - $pathname =3D~ s#//#/#g; + # + # Note that $release is a real commit this time + # (returned by getannotations() above). This is + # _not_ a tag name! + # + + if ($self->{'do_blame'}) { + my $repo =3D Git->repository (Directory =3D> "$self->{'rootpath'}"); + my @authorlist =3D (); + + $pathname =3D~ s/^\///; + + my (@lines, $c) =3D $repo->command ("cat-file", "commit", "$release"); + foreach my $line (@lines) { + if ($line =3D~ m/^author (.*) </) { + return $1 + } + } =20 - # Delete leading slashes. - $pathname =3D~ s#/*$##g; + return undef; + } =20 - return $pathname; + return undef; } =20 1; MfG, JBG --=20 Jan-Benedict Glaw jb...@lu... +49-172-7608481 Signature of: http://perl.plover.com/Questions.html the second : |
From: Jan-Benedict G. <jb...@lu...> - 2006-11-26 22:49:17
|
Hi! This patch adds a missing \n to the end of the BK.pm backend file. Some editors might complain about it. Index: lib/LXR/Files/BK.pm =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/lxr/lxr/lib/LXR/Files/BK.pm,v retrieving revision 1.2 diff -u -r1.2 BK.pm --- lib/LXR/Files/BK.pm 2 Nov 2005 23:39:55 -0000 1.2 +++ lib/LXR/Files/BK.pm 26 Nov 2006 22:39:54 -0000 @@ -302,4 +302,4 @@ return $tree_cache{$release}{$path}{$file}; } =20 -1; \ No newline at end of file +1; MfG, JBG --=20 Jan-Benedict Glaw jb...@lu... +49-172-7608481 Signature of: God put me on earth to accomplish a certain numbe= r of the second : things. Right now I am so far behind I will never = die. |
From: Jan-Benedict G. <jb...@lu...> - 2006-11-26 22:47:58
|
Hi! This patch fixes a caller of the isdir() function. The GIT backend needs a version being supplied. It was written by Maximilian Wilhelm. Index: lib/LXR/Common.pm =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/lxr/lxr/lib/LXR/Common.pm,v retrieving revision 1.55 diff -u -r1.55 Common.pm --- lib/LXR/Common.pm 4 Apr 2006 22:23:43 -0000 1.55 +++ lib/LXR/Common.pm 26 Nov 2006 22:39:54 -0000 @@ -376,7 +376,7 @@ while ($node =3D~ s|/[^/]+/\.\./|/|g) { } $node =3D~ s|/\.\./|/|g; =20 - $node .=3D '/' if $files->isdir($node); + $node .=3D '/' if $files->isdir($node, $release); $node =3D~ s|//+|/|g; =20 return $node; MfG, JBG --=20 Jan-Benedict Glaw jb...@lu... +49-172-7608481 Signature of: http://perl.plover.com/Questions.html the second : |
From: Jan-Benedict G. <jb...@lu...> - 2006-11-26 19:43:18
|
On Sat, 2006-11-25 10:46:33 +0100, Jan-Benedict Glaw <jb...@lu...> wr= ote: > Once this round of polishing the GIT backend is finished, I'll send > some patches for the GIT stuff as well as for the docs. I'm mostly done with cleaning up the new code. I also implemented getannotations and getauthor. For git, getannotations returns the commit of each line (something that looks like 836d5ffd34550901ea024347693e689273ded8aa). There's a display problem with such long IDs. I think it would be wise to trunkate them when generating HTML output, but use the long version for requesting authorship data. MfG, JBG --=20 Jan-Benedict Glaw jb...@lu... +49-172-7608481 Signature of: Zensur im Internet? Nein danke! the second : |
From: Jan-Benedict G. <jb...@lu...> - 2006-11-25 09:57:50
|
Hi! With my current LXR setup, no links are generated for Linux's include files. generic.conf is unmodified from CVS, and lxr.conf looks like this: 'incprefix' =3D> [ '/include', '/include/linux' ], 'maps' =3D> { '/include/asm[^\/]*/' =3D> '/include/asm-$a/', '/arch/[^\/]+/' =3D> '/arch/$a/', }, Any hints for this? MfG, JBG --=20 Jan-Benedict Glaw jb...@lu... +49-172-7608481 Signature of: "really soon now": an unspecified period of time= , likly to the second : be greater than any reasonabl= e definition of "soon". |
From: Jan-Benedict G. <jb...@lu...> - 2006-11-25 09:55:29
|
Hi! While reworking the GIT backend, I implemented this function to get all its tags and display it in the Version list: 'range' =3D> sub { my $some_dir=3D"/home/jbglaw/lxr-git-test/linux-2.6/.git/refs/tag= s"; opendir (DIR, $some_dir) || die "cannot opendir $some_dir: $!"; my @files =3D grep { -f "$some_dir/$_" } readdir (DIR); closedir DIR; return sort @files; }, With Linus's current GIT tree, this results in nearly 60 tags and thus in quite some space consumption on the screen. I'd propose to rework the variable stuff to not display all values, but to display one drop-down per variable and a submit button (as well as place some little java script to automatically try to submit upon value change.) What do you think about this? MfG, JBG --=20 Jan-Benedict Glaw jb...@lu... +49-172-7608481 Signature of: Zensur im Internet? Nein danke! the second : |
From: Jan-Benedict G. <jb...@lu...> - 2006-11-25 09:46:43
|
Hi! I'm currently rewriting the GIT backend. I still don't know all that much about Perl, but the current code base looks quite better, though it still needs polishing. I also tried to run it with Apache2. Works mostly out of the box. For most of it, .htaccess needs to be modified: PerlHandler Apache::Registry becomes PerlHandler ModPerl::Registry INSTALL instructions also tell me to copy the lib/LXR/* stuff to some system directory, which looks somewhat unacceptable to me. This can be easily worked around: Alias /lxr /home/jbglaw/lxr-git-test/lxr <Directory /home/jbglaw/lxr-git-test/lxr> AllowOverride All </Directory> PerlRequire /home/jbglaw/lxr-git-test/lxr/require.pl The PerlRequire line is the key. I've put this into it, but I need to test whether really all of these are needed (probably not): #!/usr/bin/env perl -w @INC=3D(@INC, "/home/jbglaw/lxr-git-test/lxr", "/home/jbglaw/lxr-git-test/lxr/lib", "/home/jbglaw/lxr-git-test/lxr/lib/Files"); 1; Once this round of polishing the GIT backend is finished, I'll send some patches for the GIT stuff as well as for the docs. MfG, JBG --=20 Jan-Benedict Glaw jb...@lu... +49-172-7608481 Signature of: Wenn ich wach bin, tr=C3=A4ume ic= h. the second : |
From: Michael O. <mic...@fr...> - 2006-06-22 08:15:51
|
Hi Malcolm, Thank you very much for your very quick answer! >> Is there a clean and simple way to remove a indexed version from the >> MySQL database ? > > There's no built in way or script. The simplest thing to do is to > drop the database, remove the version from the list of versions and do > a genxref --reindexall. It's not pretty but it will work. I'm not > sure whether just re-running genxref having removed the version from > the list will delete old versions - I suspect not. All right, that's what I chose to do. For people who want to do this too, here is what I did: * Went to the lxr install directory * 'mysql -p': connection to the mysql command line * 'drop database lxr;' (read the following line before running it!) * '\. initdb-mysql': recreated the database and tables. Actually, 'drop database lxr;' was unnecessary, as the 'initdb-mysql' script is supposed to remove any already existing DB. * `quit': to exit the mysql command line * Removed the contents of the swish-e directory * Ran "./genxref --url=http://lxr.free-electrons.com --allversions" > >> That's an ugly issue for sites indexing many versions at one, >> especially for big projects like the Linux kernel... > > It is. I guess it wouldn't be too hard to create a sql script that > would do what you want - basically it's a question of identifying all > the files that are only in the release you want to remove, then all > the identifiers that are only in those files, then the references to > those identifiers. Right! The most ugly thing is that your LXR site is no longer available when you do this. As soon as I have time in the next days or weeks, I will refresh my SQL knowledge and will come up with a SQL script taking care of removing all the table entries for a given version. That's right this should be fairly easy to implement. Thanks again! Cheers, Michael. -- Michael Opdenacker, Free Electrons Free Embedded Linux Training Materials on http://free-electrons.com/training (More than 1000 pages!) |
From: Malcolm B. <mal...@gm...> - 2006-06-21 21:23:14
|
Michael Opdenacker wrote: > I guess this question has already been asked, but SourceForge mailing > list archives are down at the moment. Don't think this has been asked before in fact. > Is there a clean and simple way to remove a indexed version from the > MySQL database ? There's no built in way or script. The simplest thing to do is to drop the database, remove the version from the list of versions and do a genxref --reindexall. It's not pretty but it will work. I'm not sure whether just re-running genxref having removed the version from the list will delete old versions - I suspect not. > That's an ugly issue for sites indexing many versions at one, especially > for big projects like the Linux kernel... It is. I guess it wouldn't be too hard to create a sql script that would do what you want - basically it's a question of identifying all the files that are only in the release you want to remove, then all the identifiers that are only in those files, then the references to those identifiers. Regards, Malcolm |
From: Michael O. <mic...@fr...> - 2006-06-21 15:24:14
|
Hello, I guess this question has already been asked, but SourceForge mailing list archives are down at the moment. Is there a clean and simple way to remove a indexed version from the MySQL database ? I am using LXR 0.9.5 and since I added a new version (Linux 2.6.17), the MySQL server RAM usage grew (no surprise), and since my server only has 256 MB of RAM, there wasn't enough RAM left. Because of this, my server started swapping like crazy. That's the reason why I would like to remove an older Linux kernel sources version to reduce the size of my database. I hope you have a script to do this... Will 'genxref --reindexall' do it automatically if I remove the version for the list of indexed versions? Anyway, that would be a huge waste of CPU to reindex all versions just to purge a given version. That's an ugly issue for sites indexing many versions at one, especially for big projects like the Linux kernel... Thank you in advance for your feedback, Cheers, Michael. -- Michael Opdenacker, Free Electrons Free Embedded Linux Training Materials on http://free-electrons.com/training (More than 1000 pages!) |
From: Malcolm B. <mal...@gm...> - 2006-06-07 21:29:57
|
pragya goyal wrote: > hi Malcolm, > i tried the latest version...but unable to configure them, cannot > found proper documentation for doing that. Not even getting the first > page. I am using swish. When executed it gives cannot find > swish-e.conf......sometimes gives ither errors. I need it with CVS. I am > jus stuck. > thanks The documentation is in the INSTALL file. Where are you getting stuck? Please post followups to the list. Regards, Malcolm |
From: pragya g. <pra...@gm...> - 2006-05-18 12:51:19
|
hi i have been trying to configure lxr...but stuck with many things.. i get the links right...but when i try to use the search options.....i get errors..... --freetext search gives a link .... , line <http://192.168.1.7/lxr/lxr_root/lxr/http/source/?v=try.c>-- --filesearch works if my project doesn't have any nested directories....else it gives me an error... *** Warning: Could not open .glimpse_filenames* --identifier search gives error.....*** Fatal: Could not open "/var/www/html/lxr/lxr_root/lxr/source//xref"* -- diff gives server error....The server encountered an internal error and was unable to complete your request. Error message: malformed header from script. Bad header=Execution of /var/www/html/lxr: diff If you think this is a server error, please contact the webmaster<root@localhost> i am using lxr-0.3 and glimpse-4.18.5 ...............also it doesnt support java...just shows the java files as plain text files.....which version does that??? please someone help me with this trouble..... |
From: Charles H. <ch...@2w...> - 2006-04-07 22:06:49
|
Index: .htaccess =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/lxr/lxr/.htaccess,v retrieving revision 1.8 diff -u -r1.8 .htaccess --- .htaccess 5 May 2005 21:59:50 -0000 1.8 +++ .htaccess 7 Apr 2006 22:05:46 -0000 @@ -2,6 +2,10 @@ =20 order deny,allow =20 +<Files lxr.css> +SetHandler default-handler +</Files> + <Files lxr.conf> deny from all </Files> Index: .htaccess_cgi =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/lxr/lxr/.htaccess_cgi,v retrieving revision 1.1 diff -u -r1.1 .htaccess_cgi --- .htaccess_cgi 19 Jul 2004 18:16:35 -0000 1.1 +++ .htaccess_cgi 7 Apr 2006 22:05:46 -0000 @@ -2,6 +2,10 @@ =20 order deny,allow =20 +<Files lxr.css> +SetHandler default-handler +</Files> + <Files lxr.conf> deny from all </Files> |
From: Charles H. <ch...@2w...> - 2006-04-07 18:14:35
|
Happened to need the conf in a seperate location for our config. Index: genxref =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/lxr/lxr/genxref,v retrieving revision 1.37 diff -u -r1.37 genxref --- genxref 2 Nov 2005 23:39:55 -0000 1.37 +++ genxref 7 Apr 2006 16:00:36 -0000 @@ -29,7 +29,8 @@ use LXR::Common; =20 my %option; -GetOptions(\%option, "help!", "url=3Ds", "version=3Ds", "allurls!", = "allversions!", "reindexall!"); +GetOptions(\%option, "help!", "url=3Ds", "version=3Ds", "conf=3Ds", + "allurls!", "allversions!", "reindexall!"); =20 if ($option{'help'}) { =20 @@ -47,6 +48,7 @@ Valid options are: --help Print a summary of the options. --url=3DURL Generate tokens for the given URL configuration = block. + --conf=3DCONF Use this configuration file. --allurls Generate tokens for all URL configuration blocks. --version=3DVERSION Generate tokens for the given version of the = code. --allversions Generate tokens for all versions of the code = (default). @@ -64,7 +66,7 @@ die("URL must be specified. Try \"genxref --help\".\n") unless $option{'url'}; =20 -$config =3D new LXR::Config($option{'url'}); +$config =3D new LXR::Config($option{'url'}, $option{'conf'}); =20 die("No matching configuration") unless $config->sourceroot; =20 |
From: Jan-Benedict G. <jb...@lu...> - 2006-03-31 14:31:28
|
On Sun, 2006-03-26 13:59:00 +0200, Jan-Benedict Glaw <jb...@lu...> wr= ote: > Maximilian Wilhelm and I started to work on LXR to support GIT as a > backend (since GIT is now used for Linux kernel work.) When it > started to work somewhat, I found out that ectags now recognizes some > more object types. This patch supports those and also reorders > existing entries. No comments to all these patches? MfG, JBG --=20 Jan-Benedict Glaw jb...@lu... . +49-172-7608481 = _ O _ "Eine Freie Meinung in einem Freien Kopf | Gegen Zensur | Gegen Krieg = _ _ O f=C3=BCr einen Freien Staat voll Freier B=C3=BCrger" | im Internet! | i= m Irak! O O O ret =3D do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA)= ); |
From: Jan-Benedict G. <jb...@lu...> - 2006-03-26 20:34:33
|
Hi! This patch fixes Common::fixpath() by addind $release as an argument to Files::isdir(). MfG, JBG 2006-03-26 Jan-Benedict Glaw <jb...@lu...> Maximilian Wilhelm <ma...@rf...> * lib/LXR/Common.pm (fixpaths): Add $release to the Files::isdir call. Something that's a file in one release may be a directory in another... --- a/lib/LXR/Common.pm 2 Nov 2005 23:39:55 -0000 1.54 +++ b/lib/LXR/Common.pm 26 Mar 2006 20:25:33 -0000 @@ -376,7 +376,7 @@ sub fixpaths { while ($node =3D~ s|/[^/]+/\.\./|/|g) { } $node =3D~ s|/\.\./|/|g; =20 - $node .=3D '/' if $files->isdir($node); + $node .=3D '/' if $files->isdir($node, $release); $node =3D~ s|//+|/|g; =20 return $node; --=20 Jan-Benedict Glaw jb...@lu... . +49-172-7608481 = _ O _ "Eine Freie Meinung in einem Freien Kopf | Gegen Zensur | Gegen Krieg = _ _ O f=C3=BCr einen Freien Staat voll Freier B=C3=BCrger" | im Internet! | i= m Irak! O O O ret =3D do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA)= ); |