Difference between revisions of "Code Indexer"
(→IRC Talk about CVSUP) |
(Almost a complete re-do) |
||
Line 10: | Line 10: | ||
==Project Contributor(s)== | ==Project Contributor(s)== | ||
− | == | + | ==Options== |
− | + | * Help with [http://lxr.mozilla.org/ LXR]/[http://landfill.mozilla.org/mxr-test/ MXR]/[http://www.mozilla.org/bonsai.html Bonsai] development. | |
− | * | + | * Make a sort-of branch respectful version of [[OpenGrok]] |
− | * OpenGrok | + | * [Re]write major portions of how [[OpenGrok]] deals with history and changesets and the likes, this is my personal preference. |
+ | * Try to fit [http://www.cenqua.com/fisheye/index.html Fisheye] into the current development model, but it seems this might be more like finding a problem for a solution. That is not to say this is a very good tool! | ||
− | + | ==Links== | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
* [https://sparc.senecacollege.ca/portal.php?project&pid=23 Official Blurb] just in case I forget what I am doing :P | * [https://sparc.senecacollege.ca/portal.php?project&pid=23 Official Blurb] just in case I forget what I am doing :P | ||
* [http://matrix.senecac.on.ca/~jhford/ John's School Page] | * [http://matrix.senecac.on.ca/~jhford/ John's School Page] | ||
* [http://cvs2svn.tigris.org CVS2SVN] Tool to convert CVS to SVN. Will be used to test SVN interop. | * [http://cvs2svn.tigris.org CVS2SVN] Tool to convert CVS to SVN. Will be used to test SVN interop. | ||
− | * [http:// | + | * [http://developer.mozilla.org/en/docs/Mozilla_Source_Code_Via_CVS Devmo:CVS Checkout] |
− | * [http://developer.mozilla.org/en/docs/ | + | * [http://developer.mozilla.org/en/docs/Rsyncing_the_CVS_Repository Devmo: Rsyncing the CVS] |
− | * [http://developer.mozilla.org/en/docs/ | + | * [http://developer.mozilla.org/en/docs/CVS_Tags Devmo: CVS Tags] - to get the branches to checkout |
* [http://www.ubuntuforums.org/showthread.php?t=219985 Tomcat5 on Ubuntu] | * [http://www.ubuntuforums.org/showthread.php?t=219985 Tomcat5 on Ubuntu] | ||
* [http://www.onjava.com/pub/a/onjava/2003/06/25/tomcat_tips.html Tomcat Tips] | * [http://www.onjava.com/pub/a/onjava/2003/06/25/tomcat_tips.html Tomcat Tips] | ||
Line 40: | Line 30: | ||
* [http://atucker.typepad.com/blog/2005/11/a_new_source_br.html Blog Entry] on OpenGrok | * [http://atucker.typepad.com/blog/2005/11/a_new_source_br.html Blog Entry] on OpenGrok | ||
* [http://ubuntuforums.org/showthread.php?t=124431 Java5 on Ubuntu] - "sudo update-alternatives --config java" and "apt-get remove --purge java-gcj-compat" | * [http://ubuntuforums.org/showthread.php?t=124431 Java5 on Ubuntu] - "sudo update-alternatives --config java" and "apt-get remove --purge java-gcj-compat" | ||
− | |||
− | |||
− | |||
− | |||
* [http://www.mozilla.org/docs/jargon.html Mozilla Jargon] | * [http://www.mozilla.org/docs/jargon.html Mozilla Jargon] | ||
− | * [http://www.deitel.com/CodeSearchEngines/CodeSearchEngines_ResourceCenter_MerobaseOpenGrokCodeProject.html | + | * [http://www.deitel.com/CodeSearchEngines/CodeSearchEngines_ResourceCenter_MerobaseOpenGrokCodeProject.html Misc] |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==Pulling CVS== | ==Pulling CVS== | ||
Line 78: | Line 43: | ||
my $src_root = "/var/mozilla"; | my $src_root = "/var/mozilla"; | ||
− | # Where is | + | # Where you want to you the HTML for the branch info |
− | my $ | + | # This could be SSI'd, but that is a lot of work to set |
+ | # up with the ubuntu packages | ||
+ | my $branchlistpath = "${src_root}/branches.html"; | ||
− | # Where is your run.sh for opengrok? | + | # Where is your run.sh for opengrok? (or equivalent script to start the indexer) |
my $opengroker = "/var/opengrok/run.sh"; | my $opengroker = "/var/opengrok/run.sh"; | ||
+ | |||
+ | # Where is your server? | ||
+ | my $cvsserver = ':pserver:anonymous@hera.senecac.on.ca:/cvsroot'; | ||
# Branches to be pulled | # Branches to be pulled | ||
my @branches = ( | my @branches = ( | ||
− | "HEAD", | + | "HEAD", |
− | " | + | "MOZILLA_1_8_BRANCH", |
"MOZILLA_1_8_0_BRANCH", | "MOZILLA_1_8_0_BRANCH", | ||
− | "MOZILLA_1_8_BRANCH", | + | "AVIARY_1_0_1_20050124_BRANCH", |
− | "MOZILLA_1_7_BRANCH", | + | "REFLOW_20061031_BRANCH" |
− | "AVIARY_1_0_1_20050124_BRANCH" | + | ); |
+ | |||
+ | # Descriptions for each branch, don't delete old ones for the sake of deleting them | ||
+ | my %descriptions = ( | ||
+ | "HEAD" => "Trunk - development branch", | ||
+ | "MOZILLA_1_8_BRANCH" => "Firefox 2.0 - development branch", | ||
+ | "MOZILLA_1_8_0_BRANCH" => "Firefox 1.5 - maintainance branch", | ||
+ | "MOZILLA_1_7_BRANCH" => "Firefox 1.0 - maintainance branch", | ||
+ | "AVIARY_1_0_1_20050124_BRANCH" => "Suite - maintainance branch", | ||
+ | "REFLOW_20061031_BRANCH" => "Reflow Refactoring" | ||
); | ); | ||
+ | # Open the file or | ||
+ | open BRANCHLIST, ">$branchlistpath" or die "Could not open file"; | ||
+ | |||
+ | # Number of branches, twice, once for the line, once for the description | ||
+ | my $branchcount = ($#{branches} + 1) * 2; | ||
+ | |||
+ | # Print the begining of the select block | ||
+ | print BRANCHLIST "<select class=\"q\" name=\"branch\" size=\"${branchcount}\" value=\"\" onClick=\"document.cookie = document.sbox.branch.selectedIndex;\" />\n"; | ||
+ | |||
+ | # Clear out what ever source was there | ||
system ("rm -rf ${src_root}/*"); | system ("rm -rf ${src_root}/*"); | ||
foreach (@branches){ | foreach (@branches){ | ||
+ | # Download the makefile, then checkout from the makefile | ||
system(" | system(" | ||
mkdir ${src_root}/$_; | mkdir ${src_root}/$_; | ||
cd ${src_root}/$_; | cd ${src_root}/$_; | ||
− | cvs -d | + | cvs -d ${cvsserver} co -r $_ mozilla/client.mk; |
make -f ${src_root}/${_}/mozilla/client.mk checkout MOZ_CO_PROJECT=all; | make -f ${src_root}/${_}/mozilla/client.mk checkout MOZ_CO_PROJECT=all; | ||
"); | "); | ||
+ | # This is for an attempt at doing something, it is mostly useless | ||
+ | print BRANCHLIST "\t<optgroup label=\"$descriptions{$_}\" />\n"; | ||
+ | print BRANCHLIST "\t<option> $_ </option>\n"; | ||
} | } | ||
+ | |||
+ | print BRANCHLIST "</select>\n"; | ||
system ("bash $opengroker"); | system ("bash $opengroker"); | ||
+ | |||
</pre> | </pre> |
Revision as of 23:08, 8 November 2006
Contents
Project Name
Source Code Indexing Service Analysis
Project Description
Mozilla’s source code is enormous—millions of lines of C, C++, JavaScript, Perl, Python, Java, C#, etc. Developers currently use the lxr system to quickly search and browse it on-line: http://lxr.mozilla.org. Mozilla is planning a move from CVS to Subversion for revision control, and at the same time wants to evaluate other source indexing services. Two BSD students are working to setup, document, and test other potential services (e.g., fisheye, opengrok, mxr) on one of the Seneca-Mozilla servers (see below). In each case this requires configuration changes and some scripting to get the services to properly integrate with Mozilla’s other on-line tools. When the test services are installed and synched with the live source tree, Mozilla will point its developers to them and get feedback—the students will help collect and synthesize this feedback.
Project Leader(s)
Project Contributor(s)
Options
- Help with LXR/MXR/Bonsai development.
- Make a sort-of branch respectful version of OpenGrok
- [Re]write major portions of how OpenGrok deals with history and changesets and the likes, this is my personal preference.
- Try to fit Fisheye into the current development model, but it seems this might be more like finding a problem for a solution. That is not to say this is a very good tool!
Links
- Official Blurb just in case I forget what I am doing :P
- John's School Page
- CVS2SVN Tool to convert CVS to SVN. Will be used to test SVN interop.
- Devmo:CVS Checkout
- Devmo: Rsyncing the CVS
- Devmo: CVS Tags - to get the branches to checkout
- Tomcat5 on Ubuntu
- Tomcat Tips
- CVS on non-gnu.org
- CVS "Guide"
- Subversion
- Blog Entry on OpenGrok
- Java5 on Ubuntu - "sudo update-alternatives --config java" and "apt-get remove --purge java-gcj-compat"
- Mozilla Jargon
- Misc
Pulling CVS
This code will pull the CVS for the branches specified in @branches
#!/usr/bin/perl use strict; use warnings; # Pull CVS from the mozilla project server my $src_root = "/var/mozilla"; # Where you want to you the HTML for the branch info # This could be SSI'd, but that is a lot of work to set # up with the ubuntu packages my $branchlistpath = "${src_root}/branches.html"; # Where is your run.sh for opengrok? (or equivalent script to start the indexer) my $opengroker = "/var/opengrok/run.sh"; # Where is your server? my $cvsserver = ':pserver:anonymous@hera.senecac.on.ca:/cvsroot'; # Branches to be pulled my @branches = ( "HEAD", "MOZILLA_1_8_BRANCH", "MOZILLA_1_8_0_BRANCH", "AVIARY_1_0_1_20050124_BRANCH", "REFLOW_20061031_BRANCH" ); # Descriptions for each branch, don't delete old ones for the sake of deleting them my %descriptions = ( "HEAD" => "Trunk - development branch", "MOZILLA_1_8_BRANCH" => "Firefox 2.0 - development branch", "MOZILLA_1_8_0_BRANCH" => "Firefox 1.5 - maintainance branch", "MOZILLA_1_7_BRANCH" => "Firefox 1.0 - maintainance branch", "AVIARY_1_0_1_20050124_BRANCH" => "Suite - maintainance branch", "REFLOW_20061031_BRANCH" => "Reflow Refactoring" ); # Open the file or open BRANCHLIST, ">$branchlistpath" or die "Could not open file"; # Number of branches, twice, once for the line, once for the description my $branchcount = ($#{branches} + 1) * 2; # Print the begining of the select block print BRANCHLIST "<select class=\"q\" name=\"branch\" size=\"${branchcount}\" value=\"\" onClick=\"document.cookie = document.sbox.branch.selectedIndex;\" />\n"; # Clear out what ever source was there system ("rm -rf ${src_root}/*"); foreach (@branches){ # Download the makefile, then checkout from the makefile system(" mkdir ${src_root}/$_; cd ${src_root}/$_; cvs -d ${cvsserver} co -r $_ mozilla/client.mk; make -f ${src_root}/${_}/mozilla/client.mk checkout MOZ_CO_PROJECT=all; "); # This is for an attempt at doing something, it is mostly useless print BRANCHLIST "\t<optgroup label=\"$descriptions{$_}\" />\n"; print BRANCHLIST "\t<option> $_ </option>\n"; } print BRANCHLIST "</select>\n"; system ("bash $opengroker");