зеркало из https://github.com/mozilla/pjs.git
Bug 144496 lxr for a branch should link to bonsai for the branch
r=preed@mozilla.com
This commit is contained in:
Родитель
6280075dfa
Коммит
03eb1f05a7
|
@ -1,4 +1,4 @@
|
||||||
# $Id: Common.pm,v 1.28 2005-12-21 05:28:13 timeless%mozdev.org Exp $
|
# $Id: Common.pm,v 1.29 2005-12-27 16:23:20 timeless%mozdev.org Exp $
|
||||||
|
|
||||||
package LXR::Common;
|
package LXR::Common;
|
||||||
|
|
||||||
|
@ -569,10 +569,61 @@ sub bannerexpand {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sub pathname {
|
sub cvsentriesexpand {
|
||||||
return $Path->{'virtf'};
|
my ($entryrev, $entrybranch);
|
||||||
|
local $,=" | ";
|
||||||
|
my ($entriespath, $entryname) = split m|/(?!.*/)|, $Path->{'realf'};
|
||||||
|
if (open(CVSENTRIES, "$entriespath/CVS/Entries")) {
|
||||||
|
while (<CVSENTRIES>) {
|
||||||
|
next unless m|^/\Q$entryname\E/([^/]*)/[^/]*/[^/]*/(.*)|;
|
||||||
|
($entryrev,$entrybranch)=($1,$2);
|
||||||
|
$entrybranch =~ s/^T//;
|
||||||
|
$entrybranch ||= 'HEAD';
|
||||||
|
}
|
||||||
|
close(CVSENTRIES);
|
||||||
|
}
|
||||||
|
return ($entryrev, $entrybranch);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub cvstagexpand {
|
||||||
|
my $entrybranch;
|
||||||
|
if (open(CVSTAG, " $Path->{'real'}/CVS/Tag")) {
|
||||||
|
while (<CVSTAG>) {
|
||||||
|
next unless m|^T(.*)$|;
|
||||||
|
$entrybranch = $1;
|
||||||
|
}
|
||||||
|
close(CVSTAG);
|
||||||
|
}
|
||||||
|
return $entrybranch || 'HEAD';
|
||||||
|
}
|
||||||
|
|
||||||
|
sub cvsversionexpand {
|
||||||
|
if ($who eq 'source') {
|
||||||
|
my ($entryrev,undef) = cvsentriesexpand();
|
||||||
|
return $entryrev;
|
||||||
|
}
|
||||||
|
if ($who eq 'sourcedir') {
|
||||||
|
return cvstagexpand();
|
||||||
|
}
|
||||||
|
return('');
|
||||||
|
}
|
||||||
|
|
||||||
|
sub cvsbranchexpand {
|
||||||
|
if ($who eq 'source') {
|
||||||
|
my (undef,$entrybranch) = cvsentriesexpand();
|
||||||
|
return $entrybranch;
|
||||||
|
}
|
||||||
|
if ($who eq 'sourcedir') {
|
||||||
|
return cvstagexpand();
|
||||||
|
}
|
||||||
|
return('');
|
||||||
|
}
|
||||||
|
|
||||||
|
sub pathname {
|
||||||
|
my $prefix = '';
|
||||||
|
$prefix = '/' . $Conf->prefix if defined $Conf->prefix;
|
||||||
|
return (url_quote ($prefix . $Path->{'virtf'}));
|
||||||
|
}
|
||||||
|
|
||||||
sub treename {
|
sub treename {
|
||||||
return $Conf->{'treename'};
|
return $Conf->{'treename'};
|
||||||
|
@ -804,6 +855,8 @@ sub makeheader {
|
||||||
('treename', \&treename),
|
('treename', \&treename),
|
||||||
('modes', \&modeexpand),
|
('modes', \&modeexpand),
|
||||||
('bonsaicvsroot', \&bonsaicvsroot),
|
('bonsaicvsroot', \&bonsaicvsroot),
|
||||||
|
('cvsversion', \&cvsversionexpand),
|
||||||
|
('cvsbranch', \&cvsbranchexpand),
|
||||||
('variables', \&varexpand)));
|
('variables', \&varexpand)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,8 +26,8 @@
|
||||||
<TABLE BORDER CELLPADDING=12 CELLSPACING=0>
|
<TABLE BORDER CELLPADDING=12 CELLSPACING=0>
|
||||||
<TR>
|
<TR>
|
||||||
<TD NOWRAP BGCOLOR="#FAFAFA">
|
<TD NOWRAP BGCOLOR="#FAFAFA">
|
||||||
<A HREF="http://bonsai.mozilla.org/cvslog.cgi?file=mozilla$pathname">CVS Log</A><BR>
|
<A HREF="http://bonsai.mozilla.org/cvslog.cgi?file=mozilla$pathname&rev=$cvsbranch&mark=$cvsversion">CVS Log</A><BR>
|
||||||
<A HREF="http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla$pathname">CVS Blame</A><BR>
|
<A HREF="http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla$pathname&rev=$cvsversion">CVS Blame</A><BR>
|
||||||
<BR>
|
<BR>
|
||||||
</TD>
|
</TD>
|
||||||
</TR>
|
</TR>
|
||||||
|
@ -44,9 +44,9 @@
|
||||||
changes to<BR>this file in<BR>the last:
|
changes to<BR>this file in<BR>the last:
|
||||||
</TD>
|
</TD>
|
||||||
<TD NOWRAP>
|
<TD NOWRAP>
|
||||||
<A HREF="http://bonsai.mozilla.org/cvsquery.cgi?branch=HEAD&file=mozilla$pathname&date=day">day</A><BR>
|
<A HREF="http://bonsai.mozilla.org/cvsquery.cgi?branch=$cvsbranch&file=mozilla$pathname&date=day">day</A><BR>
|
||||||
<A HREF="http://bonsai.mozilla.org/cvsquery.cgi?branch=HEAD&file=mozilla$pathname&date=week">week</A><BR>
|
<A HREF="http://bonsai.mozilla.org/cvsquery.cgi?branch=$cvsbranch&file=mozilla$pathname&date=week">week</A><BR>
|
||||||
<A HREF="http://bonsai.mozilla.org/cvsquery.cgi?branch=HEAD&file=mozilla$pathname&date=month">month</A><BR>
|
<A HREF="http://bonsai.mozilla.org/cvsquery.cgi?branch=$cvsbranch&file=mozilla$pathname&date=month">month</A><BR>
|
||||||
</TD>
|
</TD>
|
||||||
</TR>
|
</TR>
|
||||||
</TABLE>
|
</TABLE>
|
||||||
|
|
|
@ -32,9 +32,9 @@
|
||||||
changes to<BR>this directory<BR>in the last:
|
changes to<BR>this directory<BR>in the last:
|
||||||
</TD>
|
</TD>
|
||||||
<TD NOWRAP>
|
<TD NOWRAP>
|
||||||
<A HREF="http://bonsai.mozilla.org/cvsquery.cgi?branch=HEAD&file=mozilla$pathname&date=day">day</A><BR>
|
<A HREF="http://bonsai.mozilla.org/cvsquery.cgi?branch=$cvsversion&file=mozilla$pathname&date=day">day</A><BR>
|
||||||
<A HREF="http://bonsai.mozilla.org/cvsquery.cgi?branch=HEAD&file=mozilla$pathname&date=week">week</A><BR>
|
<A HREF="http://bonsai.mozilla.org/cvsquery.cgi?branch=$cvsversion&file=mozilla$pathname&date=week">week</A><BR>
|
||||||
<A HREF="http://bonsai.mozilla.org/cvsquery.cgi?branch=HEAD&file=mozilla$pathname&date=month">month</A><BR>
|
<A HREF="http://bonsai.mozilla.org/cvsquery.cgi?branch=$cvsversion&file=mozilla$pathname&date=month">month</A><BR>
|
||||||
</TD>
|
</TD>
|
||||||
</TR>
|
</TR>
|
||||||
</TABLE>
|
</TABLE>
|
||||||
|
|
Загрузка…
Ссылка в новой задаче