You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by us...@apache.org on 2012/08/31 00:43:59 UTC

svn commit: r1379200 [9/11] - in /lucene/dev/branches/lucene3312: ./ dev-tools/ dev-tools/eclipse/ dev-tools/idea/.idea/libraries/ dev-tools/maven/ dev-tools/maven/lucene/core/ dev-tools/maven/lucene/test-framework/ dev-tools/scripts/ lucene/ lucene/an...

Modified: lucene/dev/branches/lucene3312/lucene/site/changes/changes2html.pl
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/site/changes/changes2html.pl?rev=1379200&r1=1379199&r2=1379200&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/site/changes/changes2html.pl (original)
+++ lucene/dev/branches/lucene3312/lucene/site/changes/changes2html.pl Thu Aug 30 22:43:41 2012
@@ -25,13 +25,12 @@ use strict;
 use warnings;
 
 # JIRA REST API documentation: <http://docs.atlassian.com/jira/REST/latest/>
-my $project_info_url = 'https://issues.apache.org/jira/rest/api/2/project/LUCENE';
+my $project_info_url = 'https://issues.apache.org/jira/rest/api/2/project';
 my $jira_url_prefix = 'http://issues.apache.org/jira/browse/';
 my $bugzilla_url_prefix = 'http://issues.apache.org/bugzilla/show_bug.cgi?id=';
-my %release_dates = &setup_release_dates;
 my $month_regex = &setup_month_regex;
 my %month_nums = &setup_month_nums;
-my %bugzilla_jira_map = &setup_bugzilla_jira_map;
+my %lucene_bugzilla_jira_map = &setup_lucene_bugzilla_jira_map;
 my $title = undef;
 my $release = undef;
 my $reldate = undef;
@@ -44,20 +43,35 @@ my @releases = ();
 
 my @lines = <>;                        # Get all input at once
 
+my $product = '';
+for my $line (@lines) {
+  ($product) = $line =~ /(Solr|Lucene)/i;
+  if ($product) {
+    $product = uc($product);
+    last;
+  }
+}
+my %release_dates = &setup_release_dates;
+my $in_major_component_versions_section = 0;
+
+
 #
 # Parse input and build hierarchical release structure in @releases
 #
 for (my $line_num = 0 ; $line_num <= $#lines ; ++$line_num) {
   $_ = $lines[$line_num];
-  next unless (/\S/);                  # Skip blank lines
+  unless (/\S/) {                      # Skip blank lines
+    $in_major_component_versions_section = 0;
+    next;
+  }
   next if (/^\s*\$Id(?::.*)?\$/);      # Skip $Id$ lines
+  next if (/^\s{0,4}-{5,}\s*$/);       # Skip Solr's section underlines
 
   unless ($title) {
     if (/\S/) {
-      s/^\s+//;                        # Trim leading whitespace
+      s/^[^\p{N}\p{L}]*//;             # Trim leading non-alphanum chars, including BOM chars, if any
       s/\s+$//;                        # Trim trailing whitespace
     }
-    s/^[^Ll]*//;                       # Trim leading BOM characters if exists
     $title = $_;
     next;
   }
@@ -71,8 +85,11 @@ for (my $line_num = 0 ; $line_num <= $#l
     ($reldate, $relinfo) = get_release_date($release, $relinfo);
     $sections = [];
     push @releases, [ $release, $reldate, $relinfo, $sections ];
-    ($first_relid = lc($release)) =~ s/\s+/_/g   if ($#releases == 0);
-    ($second_relid = lc($release)) =~ s/\s+/_/g  if ($#releases == 1);
+    ($first_relid = lc($release)) =~ s/\s+/_/g
+       if ($#releases == 0 or ($#releases == 1 and not ($releases[0][0])));
+    ($second_relid = lc($release)) =~ s/\s+/_/g
+       if (   ($#releases == 1 and $releases[0][0])
+           or ($#releases == 2 and not $releases[0][0]));
     $items = undef;
     next;
   }
@@ -90,18 +107,43 @@ for (my $line_num = 0 ; $line_num <= $#l
     next;
   }
 
+  if (m!^20\d\d[-/]\d{1,2}[-/]\d{1,2}!) { # Collect dated postscripts
+    my $item = $_;
+    my $line = '';
+    while ($line_num < $#lines and ($line = $lines[++$line_num]) =~ /\S/) {
+      $line =~ s/^\s+//;                   # Trim leading whitespace
+      $line =~ s/\s+$//;                   # Trim trailing whitespace
+      $item .= "$line\n";
+    }
+    push @releases, [ $item, '', '', [] ];
+    next;
+  }
+
   # Section heading: no leading whitespace, initial word capitalized,
   #                  five words or less, and no trailing punctuation
-  if (/^([A-Z]\S*(?:\s+\S+){0,4})(?<![-.:;!()])\s*$/) {
+  if (    /^([A-Z]\S*(?:\s+\S+){0,4})(?<![-.:;!()])\s*$/
+      and not $in_major_component_versions_section) {
     my $heading = $1;
     $items = [];
+    unless (@releases) {
+      $sections = [];
+      # Make a fake release to hold pre-release sections
+      push @releases, [ undef, undef, undef, $sections ];
+    }
     push @$sections, [ $heading, $items ];
+    $in_major_component_versions_section
+      = ($heading =~ /Versions of Major Components/i);
     next;
   }
 
   # Handle earlier releases without sections - create a headless section
   unless ($items) {
     $items = [];
+    unless (@releases) {
+      $sections = [];
+      # Make a fake release to hold pre-release sections and items
+      push @releases, [ undef, undef, undef, $sections ];
+    }
     push @$sections, [ undef, $items ];
   }
 
@@ -130,7 +172,7 @@ for (my $line_num = 0 ; $line_num <= $#l
     }
     $item =~ s/\n+\Z/\n/;                  # Trim trailing blank lines
     push @$items, $item;
-    --$line_num unless ($line_num == $#lines);
+    --$line_num unless ($line_num == $#lines && $lines[$line_num] !~ /^20/);
   } elsif ($type eq 'paragraph') {         # List item boundary is a blank line
     my $line;
     my $item = $_;
@@ -139,18 +181,22 @@ for (my $line_num = 0 ; $line_num <= $#l
     $item =~ s/\s+$//;                     # Trim trailing whitespace
     $item .= "\n";
 
-    while ($line_num < $#lines and ($line = $lines[++$line_num]) =~ /\S/) {
-      $line =~ s/^\s{$leading_ws_width}//; # Trim leading whitespace
-      $line =~ s/\s+$//;                   # Trim trailing whitespace
-      $item .= "$line\n";
+    unless ($in_major_component_versions_section) {
+      while ($line_num < $#lines and ($line = $lines[++$line_num]) =~ /\S/) {
+        $line =~ s/^\s{$leading_ws_width}//; # Trim leading whitespace
+        $line =~ s/\s+$//;                   # Trim trailing whitespace
+        $item .= "$line\n";
+      }
+    } else {
+      ++$line_num;
     }
     push @$items, $item;
-    --$line_num unless ($line_num == $#lines);
+    --$line_num unless ($line_num == $#lines && $lines[$line_num] !~ /^20/);
   } else { # $type is one of the bulleted types
     # List item boundary is another bullet or a blank line
     my $line;
     my $item = $_;
-    $item =~ s/^(\s*\Q$type\E\s*)//;           # Trim the leading bullet
+    $item =~ s/^(\s*\Q$type\E\s*)//;       # Trim the leading bullet
     my $leading_ws_width = length($1);
     $item =~ s/\s+$//;                     # Trim trailing whitespace
     $item .= "\n";
@@ -162,7 +208,7 @@ for (my $line_num = 0 ; $line_num <= $#l
       $item .= "$line\n";
     }
     push @$items, $item;
-    --$line_num unless ($line_num == $#lines);
+    --$line_num unless ($line_num == $#lines && $lines[$line_num] !~ /^20/);
   }
 }
 
@@ -357,51 +403,71 @@ __HTML_HEADER__
 my $heading;
 my $relcnt = 0;
 my $header = 'h2';
+my $subheader = 'h3';
+
 for my $rel (@releases) {
-  if (++$relcnt == 3) {
+  if ($relcnt == 2) {
     $header = 'h3';
+    $subheader = 'h4';
     print "<h2><a id=\"older\" href=\"javascript:toggleList('older')\">";
     print "Older Releases";
     print "</a></h2>\n";
     print "<ul id=\"older.list\">\n"
   }
-      
+
   ($release, $reldate, $relinfo, $sections) = @$rel;
 
   # The first section heading is undefined for the older sectionless releases
   my $has_release_sections = has_release_sections($sections);
 
-  (my $relid = lc($release)) =~ s/\s+/_/g;
-  print "<$header><a id=\"$relid\" href=\"javascript:toggleList('$relid')\">";
-  print "Release " unless ($release =~ /^trunk$/i);
-  print "$release $relinfo";
-  print " [$reldate]" unless ($reldate eq 'unknown');
-  print "</a></$header>\n";
-  print "<ul id=\"$relid.list\">\n"
-    if ($has_release_sections);
+  my $relid = '';
+  if ($release) { # Pre-release sections have no release ID
+    ++$relcnt;
+    ($relid = lc($release)) =~ s/\s+/_/g;
+    print "<$header>";
+    print "<a id=\"$relid\" href=\"javascript:toggleList('$relid')\">"
+      unless ($release =~ /^20\d\d/);
+    print "Release " unless ($release =~ /^trunk$|^20\d\d/i);
+    print "$release $relinfo";
+    print " [$reldate]" unless ($reldate eq 'unknown' or not $reldate);
+    print "</a>" unless ($release =~ /^20\d\d/);
+    print "</$header>\n";
+    print "<ul id=\"$relid.list\">\n"
+      if ($has_release_sections);
+  }
 
   for my $section (@$sections) {
     ($heading, $items) = @$section;
     (my $sectid = lc($heading)) =~ s/\s+/_/g;
     my $numItemsStr = $#{$items} > 0 ? "($#{$items})" : "(none)";  
 
-    print "  <li><a id=\"$relid.$sectid\"",
-          " href=\"javascript:toggleList('$relid.$sectid')\">",
-          ($heading || ''), "</a>&nbsp;&nbsp;&nbsp;$numItemsStr\n"
-      if ($has_release_sections and $heading);
+    my $list_item = "li";
+    if ($release) {
+      if ($heading and $heading eq 'Detailed Change List') {
+        print "  <$subheader>$heading</$subheader>\n";
+        next;
+      } elsif ($has_release_sections and $heading) {
+        print "  <li><a id=\"$relid.$sectid\"",
+              " href=\"javascript:toggleList('$relid.$sectid')\">",
+              ($heading || ''), "</a>&nbsp;&nbsp;&nbsp;$numItemsStr\n"
+      }
+    } else {
+      print "<h2>$heading</h2>\n" if ($heading);
+      $list_item = "p";
+    }
 
     my $list_type = $items->[0] || '';
     my $list = ($has_release_sections || $list_type eq 'numbered' ? 'ol' : 'ul');
     my $listid = $sectid ? "$relid.$sectid" : $relid;
     print "    <$list id=\"$listid.list\">\n"
-      unless ($has_release_sections and not $heading);
+      unless (not $release or ($has_release_sections and not $heading));
 
     for my $itemnum (1..$#{$items}) {
       my $item = $items->[$itemnum];
-      $item =~ s:&:&amp;:g;               # Escape HTML metachars, but leave 
-      $item =~ s:<(?!/?code>):&lt;:gi;    #   <code> tags intact and add <pre>
-      $item =~ s:(?<!code)>:&gt;:gi;      #   wrappers for non-inline sections
-      $item =~ s{((?:^|.*\n)\s*)<code>(?!</code>.+)(.+)</code>(?![ \t]*\S)}
+      $item =~ s:&:&amp;:g;                       # Escape HTML metachars, but leave <code> tags
+      $item =~ s~<(?!/?code>(?:[^,]|$))~&lt;~gi;  #   intact - unless followed by a comma - and
+      $item =~ s:(?<!code)>:&gt;:gi;              #   add <pre> wrappers for non-inline sections
+      $item =~ s{((?:^|.*\n)\s*)<code>(?!,)(?!</code>.+)(.+)</code>(?![ \t]*\S)}
                 { 
                   my $prefix = $1; 
                   my $code = $2;
@@ -409,62 +475,67 @@ for my $rel (@releases) {
                   "$prefix<code><pre>$code</pre></code>"
                 }gise;
 
-      # Put attributions on their own lines.
-      # Check for trailing parenthesized attribution with no following period.
-      # Exclude things like "(see #3 above)" and "(use the bug number instead of xxxx)" 
-      unless ($item =~ s:\s*(\((?!see #|use the bug number)[^()"]+?\))\s*$:\n<br /><span class="attrib">$1</span>:) {
-        # If attribution is not found, then look for attribution with a
-        # trailing period, but try not to include trailing parenthesized things
-        # that are not attributions.
-        #
-        # Rule of thumb: if a trailing parenthesized expression with a following
-        # period does not contain "LUCENE-XXX", and it either has three or 
-        # fewer words or it includes the word "via" or the phrase "updates from",
-	    # then it is considered to be an attribution.
-
-        $item =~ s{(\s*(\((?!see \#|use the bug number)[^()"]+?\)))
-                   ((?:\.|(?i:\.?\s*Issue\s+\d{3,}|LUCENE-\d+)\.?)\s*)$}
-                  {
-                    my $subst = $1;  # default: no change
-                    my $parenthetical = $2;
-		                my $trailing_period_and_or_issue = $3;
-                    if ($parenthetical !~ /LUCENE-\d+/) {
-                      my ($no_parens) = $parenthetical =~ /^\((.*)\)$/s;
-                      my @words = grep {/\S/} split /\s+/, $no_parens;
-                      if ($no_parens =~ /\b(?:via|updates\s+from)\b/i || scalar(@words) <= 3) {
-                        $subst = "\n<br /><span class=\"attrib\">$parenthetical</span>";
-                      }
-                    }
-                    $subst . $trailing_period_and_or_issue;
-                  }ex;
-      }
+      $item = markup_trailing_attribution($item) unless ($item =~ /\n[ ]*-/);
 
       $item =~ s{(.*?)(<code><pre>.*?</pre></code>)|(.*)}
                 {
                   my $uncode = undef;
-                  if (defined($2)) {
-                    $uncode = $1 || '';
+                  my ($one,$two,$three) = ($1,$2,$3);
+                  if (defined($two)) {
+                    $uncode = $one || '';
+                    $uncode =~ s{^(.*?)(?=\n[ ]*-)}
+                                {
+                                  my $prefix = $1;
+                                  my ($primary,$additional_work) = $prefix =~ /^(.*?)((?:\s*Additional\s+Work:\s*)?)$/si;
+                                  my $result = markup_trailing_attribution($primary);
+                                  $result .= "<br />\n$additional_work<br />" if ($additional_work);
+                                  $result;
+                                }se;
                     $uncode =~ s{((?<=\n)[ ]*-.*\n(?:.*\n)*)}
                                 {
                                   my $bulleted_list = $1;
-                                  $bulleted_list 
+                                  $bulleted_list
                                     =~ s{(?:(?<=\n)|\A)[ ]*-[ ]*(.*(?:\n|\z)(?:[ ]+[^ -].*(?:\n|\z))*)}
-                                        {<li class="bulleted-list">\n$1</li>\n}g;
+                                        {
+                                            qq!<li class="bulleted-list">\n!
+                                          . markup_trailing_attribution($1)
+                                          . "</li>\n"
+                                        }ge;
                                   $bulleted_list
-                                    =~ s!(<li.*</li>\n)!<ul class="bulleted-list">\n$1</ul>\n!s;
+                                    =~ s{(<li.*</li>\n)(.*)}
+                                        {
+                                            qq!<ul class="bulleted-list">\n$1</ul>\n!
+                                          . markup_trailing_attribution($2 || '')
+                                        }se;
                                   $bulleted_list;
                                 }ge;
-                    "$uncode$2";
+                    "$uncode$two";
                   } else {
-                    $uncode = $3 || '';
+                    $uncode = $three || '';
+                    $uncode =~ s{^(.*?)(?=\n[ ]*-)}
+                                {
+                                  my $prefix = $1;
+                                  my ($primary,$additional_work) = $prefix =~ /^(.*?)((?:\s*Additional\s+Work:\s*)?)$/si;
+                                  my $result = markup_trailing_attribution($primary);
+                                  $result .= "<br />\n$additional_work<br />" if ($additional_work);
+                                  $result;
+                                }se;
                     $uncode =~ s{((?<=\n)[ ]*-.*\n(?:.*\n)*)}
                                 {
                                   my $bulleted_list = $1;
-                                  $bulleted_list 
+                                  $bulleted_list
                                     =~ s{(?:(?<=\n)|\A)[ ]*-[ ]*(.*(?:\n|\z)(?:[ ]+[^ -].*(?:\n|\z))*)}
-                                        {<li class="bulleted-list">\n$1</li>\n}g;
+                                        {
+                                            qq!<li class="bulleted-list">\n!
+                                          . markup_trailing_attribution($1)
+                                          . "</li>\n"
+                                        }ge;
                                   $bulleted_list
-                                    =~ s!(<li.*</li>\n)!<ul class="bulleted-list">\n$1</ul>\n!s;
+                                    =~ s{(<li.*</li>\n)(.*)}
+                                        {
+                                            qq!<ul class="bulleted-list">\n$1</ul>\n!
+                                          . markup_trailing_attribution($2 || '')
+                                        }se;
                                   $bulleted_list;
                                 }ge;
                     $uncode;
@@ -480,49 +551,119 @@ for my $rel (@releases) {
       # Link Lucene XXX, SOLR XXX and INFRA XXX to JIRA
       $item =~ s{((LUCENE|SOLR|INFRA)\s+(\d{3,}))}
                 {<a href="${jira_url_prefix}\U$2\E-$3">$1</a>}gi;
-      # Find single Bugzilla issues
-      $item =~ s~((?i:bug|patch|issue)\s*\#?\s*(\d+))
-                ~ my $issue = $1;
-                  my $jira_issue_num = $bugzilla_jira_map{$2}; # Link to JIRA copies
-                  $issue = qq!<a href="${jira_url_prefix}LUCENE-$jira_issue_num">!
-                         . qq!$issue&nbsp;[LUCENE-$jira_issue_num]</a>!
-                    if (defined($jira_issue_num));
-                  $issue;
-                ~gex;
-      # Find multiple Bugzilla issues
-      $item =~ s~(?<=(?i:bugs))(\s*)(\d+)(\s*(?i:\&|and)\s*)(\d+)
-		            ~ my $leading_whitespace = $1;
-		              my $issue_num_1 = $2;
-		              my $interlude = $3;
-                  my $issue_num_2 = $4;
-                  # Link to JIRA copies
-                  my $jira_issue_1 = $bugzilla_jira_map{$issue_num_1};
-                  my $issue1
-		                  = qq!<a href="${jira_url_prefix}LUCENE-$jira_issue_1">!
-                      . qq!$issue_num_1&nbsp;[LUCENE-$jira_issue_1]</a>!
-                    if (defined($jira_issue_1));
-                  my $jira_issue_2 = $bugzilla_jira_map{$issue_num_2};
-                  my $issue2
-		                  = qq!<a href="${jira_url_prefix}LUCENE-$jira_issue_2">!
-                      . qq!$issue_num_2&nbsp;[LUCENE-$jira_issue_2]</a>!
-                    if (defined($jira_issue_2));
-                  $leading_whitespace . $issue1 . $interlude . $issue2;
-                ~gex;
+      if ($product eq 'LUCENE') {
+        # Find single Bugzilla issues
+        $item =~ s~((?i:bug|patch|issue)\s*\#?\s*(\d+))
+                  ~ my $issue = $1;
+                    my $jira_issue_num = $lucene_bugzilla_jira_map{$2}; # Link to JIRA copies
+                    $issue = qq!<a href="${jira_url_prefix}LUCENE-$jira_issue_num">!
+                           . qq!$issue&nbsp;[LUCENE-$jira_issue_num]</a>!
+                      if (defined($jira_issue_num));
+                    $issue;
+                  ~gex;
+        # Find multiple Bugzilla issues
+        $item =~ s~(?<=(?i:bugs))(\s*)(\d+)(\s*(?i:\&|and)\s*)(\d+)
+		              ~ my $leading_whitespace = $1;
+		                my $issue_num_1 = $2;
+		                my $interlude = $3;
+                    my $issue_num_2 = $4;
+                    # Link to JIRA copies
+                    my $jira_issue_1 = $lucene_bugzilla_jira_map{$issue_num_1};
+                    my $issue1
+		                    = qq!<a href="${jira_url_prefix}LUCENE-$jira_issue_1">!
+                        . qq!$issue_num_1&nbsp;[LUCENE-$jira_issue_1]</a>!
+                      if (defined($jira_issue_1));
+                    my $jira_issue_2 = $lucene_bugzilla_jira_map{$issue_num_2};
+                    my $issue2
+		                    = qq!<a href="${jira_url_prefix}LUCENE-$jira_issue_2">!
+                        . qq!$issue_num_2&nbsp;[LUCENE-$jira_issue_2]</a>!
+                      if (defined($jira_issue_2));
+                    $leading_whitespace . $issue1 . $interlude . $issue2;
+                  ~gex;
+      }
 
       # Linkify URLs, except Bugzilla links, which don't work anymore
-      $item =~ s~(?<![">])(https?://(?!(?:nagoya|issues)\.apache\.org/bugzilla)\S+)~<a href="$1">$1</a>~g;
+      $item =~ s~(?<![">])(https?://(?!(?:nagoya|issues)\.apache\.org/bugzilla)[^\s\)]+)~<a href="$1">$1</a>~g;
+
+      $item =~ s~</ul>\s+<p/>\s+<br\s*/>~</ul>~;
 
-      print "      <li>$item</li>\n";
+      print "      <$list_item>$item</$list_item>\n";
     }
-    print "    </$list>\n" unless ($has_release_sections and not $heading);
-    print "  </li>\n" if ($has_release_sections);
+    print "    </$list>\n" unless (not $release or ($has_release_sections and not $heading));
+    print "  </li>\n" if ($release and $has_release_sections);
   }
-  print "</ul>\n" if ($has_release_sections);
+  print "</ul>\n" if ($release and $has_release_sections);
 }
 print "</ul>\n" if ($relcnt > 3);
 print "</body>\n</html>\n";
 
 
+# Subroutine: markup_trailing_attribution
+#
+# Takes one parameter:
+#
+#   - text possibly containing a trailing parenthesized attribution
+#
+# Returns one scalar:
+#
+#   - text with the the trailing attribution, if any, marked up with the color green
+#
+sub markup_trailing_attribution {
+  my $item = shift;
+
+  # Put attributions on their own lines.
+  # Check for trailing parenthesized attribution with no following period.
+  # Exclude things like "(see #3 above)" and "(use the bug number instead of xxxx)"
+  unless ($item =~ s{\s*(\((?![Ss]ee )
+                           (?!spans\b)
+                           (?!mainly\ )
+                           (?!LUCENE-\d+\))
+                           (?!and\ )
+                           (?!backported\ )
+                           (?!in\ )
+                           (?!inverse\ )
+                           (?![Tt]he\ )
+                           (?!use\ the\ bug\ number)
+                     [^()"]+?\))\s*$}
+                    {\n<br /><span class="attrib">$1</span>}x) {
+    # If attribution is not found, then look for attribution with a
+    # trailing period, but try not to include trailing parenthesized things
+    # that are not attributions.
+    #
+    # Rule of thumb: if a trailing parenthesized expression with a following
+    # period does not contain "LUCENE-XXX", and it either has three or
+    # fewer words or it includes the word "via" or the phrase "updates from",
+	  # then it is considered to be an attribution.
+
+    $item =~ s{(\s*(\((?![Ss]ee\ )
+                      (?!spans\b)
+                      (?!mainly\ )
+                      (?!LUCENE-\d+\))
+                      (?!and\ )
+                      (?!backported\ )
+                      (?!in\ )
+                      (?!inverse\ )
+                      (?![Tt]he\ )
+                      (?!use\ the\ bug\ number)
+                 [^()"]+?\)))
+                ((?:\.|(?i:\.?\s*Issue\s+\d{3,}|LUCENE-\d+)\.?)\s*)$}
+              {
+                my $subst = $1;  # default: no change
+                my $parenthetical = $2;
+	              my $trailing_period_and_or_issue = $3;
+                if ($parenthetical !~ /LUCENE-\d+/) {
+                  my ($no_parens) = $parenthetical =~ /^\((.*)\)$/s;
+                  my @words = grep {/\S/} split /\s+/, $no_parens;
+                  if ($no_parens =~ /\b(?:via|updates\s+from)\b/i || scalar(@words) <= 4) {
+                    $subst = "\n<br /><span class=\"attrib\">$parenthetical</span>";
+                  }
+                }
+                $subst . $trailing_period_and_or_issue;
+              }ex;
+  }
+  return $item;
+}
+
 #
 # Subroutine: has_release_sections
 #
@@ -636,6 +777,8 @@ sub get_release_date {
     # Handle '1.2 RC6', which should be '1.2 final'
     $release = '1.2 final' if ($release eq '1.2 RC6');
 
+    $release =~ s/\.0\.0/\.0/;
+
     $reldate = ( exists($release_dates{$release}) 
                ? $release_dates{$release}
                : 'unknown');
@@ -658,7 +801,9 @@ sub get_release_date {
 # as well as those named "final" are included below.
 #
 sub setup_release_dates {
-  my %release_dates
+  my %release_dates;
+  if (uc($product) eq 'LUCENE') {
+    %release_dates
        = ( '0.01' => '2000-03-30',      '0.04' => '2000-04-19',
            '1.0' => '2000-10-04',       '1.01b' => '2001-06-02',
            '1.2 RC1' => '2001-10-02',   '1.2 RC2' => '2001-10-19',
@@ -677,9 +822,11 @@ sub setup_release_dates {
            '2.4.0' => '2008-10-06',     '2.4.1' => '2009-03-09',
            '2.9.0' => '2009-09-23',     '2.9.1' => '2009-11-06',
            '3.0.0' => '2009-11-25');
+  }
+
+  print STDERR "Retrieving $project_info_url/$product ...\n";
+  my $project_info_json = get_url_contents("$project_info_url/$product");
 
-  my $project_info_json = get_url_contents($project_info_url);
-  
   my $project_info = json2perl($project_info_json);
   for my $version (@{$project_info->{versions}}) {
     if ($version->{releaseDate}) {
@@ -750,12 +897,12 @@ sub setup_month_nums {
 
 
 #
-# setup_bugzilla_jira_map
+# setup_lucene_bugzilla_jira_map
 #
 # Returns a list of alternating Bugzilla bug IDs and LUCENE-* JIRA issue
-# numbers, for use in populating the %bugzilla_jira_map hash
+# numbers, for use in populating the %lucene_bugzilla_jira_map hash
 #
-sub setup_bugzilla_jira_map {
+sub setup_lucene_bugzilla_jira_map {
   return (  4049 =>   1,  4102 =>   2,  4105 =>   3,  4254 =>   4,
             4555 =>   5,  4568 =>   6,  4754 =>   7,  5313 =>   8,
             5456 =>   9,  6078 =>  10,  6091 =>  11,  6140 =>  12,
@@ -879,7 +1026,14 @@ sub json2perl {
   my $json_string = shift;
   $json_string =~ s/(:\s*)(true|false)/$1"$2"/g;
   $json_string =~ s/":/",/g;
-  return eval $json_string;
+  $json_string =~ s/\'/\\'/g;
+  $json_string =~ s/\"/\'/g;
+  my $project_info = eval $json_string;
+  die "ERROR eval'ing munged JSON string ||$json_string||: $@\n"
+    if ($@);
+  die "ERROR empty value after eval'ing JSON string ||$json_string||\n"
+    unless $project_info;
+  return $project_info;
 }
 
 1;

Modified: lucene/dev/branches/lucene3312/lucene/site/xsl/index.xsl
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/site/xsl/index.xsl?rev=1379200&r1=1379199&r2=1379200&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/site/xsl/index.xsl (original)
+++ lucene/dev/branches/lucene3312/lucene/site/xsl/index.xsl Thu Aug 30 22:43:41 2012
@@ -26,7 +26,7 @@
   <!--
     NOTE: This template matches the root element of any given input XML document!
     The XSL input file is ignored completely, but XSL expects one to be given,
-    so build.xml passes itsself here. The list of module build.xmls is given via
+    so build.xml passes itself here. The list of module build.xmls is given via
     string parameter, that must be splitted at '|'.
   --> 
   <xsl:template match="/">

Modified: lucene/dev/branches/lucene3312/lucene/spatial/src/java/org/apache/lucene/spatial/bbox/package-info.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/spatial/src/java/org/apache/lucene/spatial/bbox/package-info.java?rev=1379200&r1=1379199&r2=1379200&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/spatial/src/java/org/apache/lucene/spatial/bbox/package-info.java (original)
+++ lucene/dev/branches/lucene3312/lucene/spatial/src/java/org/apache/lucene/spatial/bbox/package-info.java Thu Aug 30 22:43:41 2012
@@ -1,24 +1,24 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * Bounding Box Spatial Strategy
- * 
- * Index a shape extent using 4 numeric fields and a flag to say if it crosses the dateline
- */
-package org.apache.lucene.spatial.bbox;
-
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Bounding Box Spatial Strategy
+ * 
+ * Index a shape extent using 4 numeric fields and a flag to say if it crosses the dateline
+ */
+package org.apache.lucene.spatial.bbox;
+

Modified: lucene/dev/branches/lucene3312/lucene/spatial/src/java/org/apache/lucene/spatial/prefix/PrefixCellsTokenizer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/spatial/src/java/org/apache/lucene/spatial/prefix/PrefixCellsTokenizer.java?rev=1379200&r1=1379199&r2=1379200&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/spatial/src/java/org/apache/lucene/spatial/prefix/PrefixCellsTokenizer.java (original)
+++ lucene/dev/branches/lucene3312/lucene/spatial/src/java/org/apache/lucene/spatial/prefix/PrefixCellsTokenizer.java Thu Aug 30 22:43:41 2012
@@ -76,14 +76,4 @@ class PrefixCellsTokenizer extends Token
     termAtt.setLength(length);
     return length > 0; // should only happen at the end
   }
-
-  @Override
-  public final void end() {
-
-  }
-
-  @Override
-  public void setReader(Reader input) throws IOException {
-    super.setReader(input);
-  }
 }
\ No newline at end of file

Modified: lucene/dev/branches/lucene3312/lucene/spatial/src/java/org/apache/lucene/spatial/util/CachingDoubleValueSource.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/spatial/src/java/org/apache/lucene/spatial/util/CachingDoubleValueSource.java?rev=1379200&r1=1379199&r2=1379200&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/spatial/src/java/org/apache/lucene/spatial/util/CachingDoubleValueSource.java (original)
+++ lucene/dev/branches/lucene3312/lucene/spatial/src/java/org/apache/lucene/spatial/util/CachingDoubleValueSource.java Thu Aug 30 22:43:41 2012
@@ -26,6 +26,8 @@ import java.util.HashMap;
 import java.util.Map;
 
 /**
+ * Caches the doubleVal of another value source in a HashMap
+ * so that it is computed only once.
  * @lucene.internal
  */
 public class CachingDoubleValueSource extends ValueSource {

Modified: lucene/dev/branches/lucene3312/lucene/spatial/src/java/org/apache/lucene/spatial/util/ValueSourceFilter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/spatial/src/java/org/apache/lucene/spatial/util/ValueSourceFilter.java?rev=1379200&r1=1379199&r2=1379200&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/spatial/src/java/org/apache/lucene/spatial/util/ValueSourceFilter.java (original)
+++ lucene/dev/branches/lucene3312/lucene/spatial/src/java/org/apache/lucene/spatial/util/ValueSourceFilter.java Thu Aug 30 22:43:41 2012
@@ -28,6 +28,8 @@ import org.apache.lucene.util.Bits;
 import java.io.IOException;
 
 /**
+ * Filter that matches all documents where a valuesource is
+ * in between a range of <code>min</code> and <code>max</code>
  * @lucene.internal
  */
 public class ValueSourceFilter extends Filter {

Modified: lucene/dev/branches/lucene3312/lucene/spatial/src/test-files/data/simple-bbox.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/spatial/src/test-files/data/simple-bbox.txt?rev=1379200&r1=1379199&r2=1379200&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/spatial/src/test-files/data/simple-bbox.txt (original)
+++ lucene/dev/branches/lucene3312/lucene/spatial/src/test-files/data/simple-bbox.txt Thu Aug 30 22:43:41 2012
@@ -1,5 +1,5 @@
-#id	name	shape	
-C5	CenterAt5	-5 -5 5 5
-C10	CenterAt10	-10 -10 10 10
-NW15	NorthWest	15 15 20 20
-
+#id	name	shape	
+C5	CenterAt5	-5 -5 5 5
+C10	CenterAt10	-10 -10 10 10
+NW15	NorthWest	15 15 20 20
+

Modified: lucene/dev/branches/lucene3312/lucene/spatial/src/test-files/simple-Queries-BBox.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/spatial/src/test-files/simple-Queries-BBox.txt?rev=1379200&r1=1379199&r2=1379200&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/spatial/src/test-files/simple-Queries-BBox.txt (original)
+++ lucene/dev/branches/lucene3312/lucene/spatial/src/test-files/simple-Queries-BBox.txt Thu Aug 30 22:43:41 2012
@@ -1,13 +1,13 @@
-C5 @ IsWithin(-6 -6 6 6)
-C5 @ BBoxWithin(-6 -6 6 6)
-C10 @ Contains(-6 -6 6 6)
-C10 @ IsEqualTo(-10 -10 10 10)
-C5 C10 @ Intersects(-2 -2 2 2)
-C5 C10 @ Overlaps(-2 -2 2 2)
-C5 C10 @ BBoxIntersects(-2 -2 2 2)
-NW15 @ IsDisjointTo(-10 -10 10 10)
-
-
-
-
-
+C5 @ IsWithin(-6 -6 6 6)
+C5 @ BBoxWithin(-6 -6 6 6)
+C10 @ Contains(-6 -6 6 6)
+C10 @ IsEqualTo(-10 -10 10 10)
+C5 C10 @ Intersects(-2 -2 2 2)
+C5 C10 @ Overlaps(-2 -2 2 2)
+C5 C10 @ BBoxIntersects(-2 -2 2 2)
+NW15 @ IsDisjointTo(-10 -10 10 10)
+
+
+
+
+

Modified: lucene/dev/branches/lucene3312/lucene/spatial/src/test/org/apache/lucene/spatial/bbox/TestBBoxStrategy.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/spatial/src/test/org/apache/lucene/spatial/bbox/TestBBoxStrategy.java?rev=1379200&r1=1379199&r2=1379200&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/spatial/src/test/org/apache/lucene/spatial/bbox/TestBBoxStrategy.java (original)
+++ lucene/dev/branches/lucene3312/lucene/spatial/src/test/org/apache/lucene/spatial/bbox/TestBBoxStrategy.java Thu Aug 30 22:43:41 2012
@@ -1,60 +1,60 @@
-package org.apache.lucene.spatial.bbox;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import com.spatial4j.core.context.simple.SimpleSpatialContext;
-import org.apache.lucene.spatial.SpatialMatchConcern;
-import org.apache.lucene.spatial.StrategyTestCase;
-import org.junit.Before;
-import org.junit.Test;
-
-import java.io.IOException;
-
-public class TestBBoxStrategy extends StrategyTestCase {
-
-  @Before
-  @Override
-  public void setUp() throws Exception {
-    super.setUp();
-    this.ctx = SimpleSpatialContext.GEO_KM;
-    this.strategy = new BBoxStrategy(ctx, "bbox");
-  }
-
-  @Test
-  public void testBasicOperaions() throws IOException {
-    getAddAndVerifyIndexedDocuments(DATA_SIMPLE_BBOX);
-    
-    executeQueries(SpatialMatchConcern.EXACT, QTEST_Simple_Queries_BBox);
-  }
-  
-  @Test
-  public void testStatesBBox() throws IOException {
-    getAddAndVerifyIndexedDocuments(DATA_STATES_BBOX);
-    
-    executeQueries(SpatialMatchConcern.FILTER, QTEST_States_IsWithin_BBox);
-    executeQueries(SpatialMatchConcern.FILTER, QTEST_States_Intersects_BBox);
-  }
-
-  @Test
-  public void testCitiesWithinBBox() throws IOException {
-    getAddAndVerifyIndexedDocuments(DATA_WORLD_CITIES_POINTS);
-    
-    executeQueries(SpatialMatchConcern.FILTER, QTEST_Cities_IsWithin_BBox);
-  }
-  
-}
+package org.apache.lucene.spatial.bbox;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import com.spatial4j.core.context.simple.SimpleSpatialContext;
+import org.apache.lucene.spatial.SpatialMatchConcern;
+import org.apache.lucene.spatial.StrategyTestCase;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.io.IOException;
+
+public class TestBBoxStrategy extends StrategyTestCase {
+
+  @Before
+  @Override
+  public void setUp() throws Exception {
+    super.setUp();
+    this.ctx = SimpleSpatialContext.GEO_KM;
+    this.strategy = new BBoxStrategy(ctx, "bbox");
+  }
+
+  @Test
+  public void testBasicOperaions() throws IOException {
+    getAddAndVerifyIndexedDocuments(DATA_SIMPLE_BBOX);
+    
+    executeQueries(SpatialMatchConcern.EXACT, QTEST_Simple_Queries_BBox);
+  }
+  
+  @Test
+  public void testStatesBBox() throws IOException {
+    getAddAndVerifyIndexedDocuments(DATA_STATES_BBOX);
+    
+    executeQueries(SpatialMatchConcern.FILTER, QTEST_States_IsWithin_BBox);
+    executeQueries(SpatialMatchConcern.FILTER, QTEST_States_Intersects_BBox);
+  }
+
+  @Test
+  public void testCitiesWithinBBox() throws IOException {
+    getAddAndVerifyIndexedDocuments(DATA_WORLD_CITIES_POINTS);
+    
+    executeQueries(SpatialMatchConcern.FILTER, QTEST_Cities_IsWithin_BBox);
+  }
+  
+}

Modified: lucene/dev/branches/lucene3312/lucene/suggest/src/java/org/apache/lucene/search/suggest/fst/FSTCompletionLookup.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/suggest/src/java/org/apache/lucene/search/suggest/fst/FSTCompletionLookup.java?rev=1379200&r1=1379199&r2=1379200&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/suggest/src/java/org/apache/lucene/search/suggest/fst/FSTCompletionLookup.java (original)
+++ lucene/dev/branches/lucene3312/lucene/suggest/src/java/org/apache/lucene/search/suggest/fst/FSTCompletionLookup.java Thu Aug 30 22:43:41 2012
@@ -138,9 +138,6 @@ public class FSTCompletionLookup extends
         completion.getFST(), true, exactMatchFirst);
   }
 
-  /**
-   * {@inheritDoc}
-   */
   @Override
   public void build(TermFreqIterator tfit) throws IOException {
     File tempInput = File.createTempFile(

Modified: lucene/dev/branches/lucene3312/lucene/test-framework/ivy.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/test-framework/ivy.xml?rev=1379200&r1=1379199&r2=1379200&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/test-framework/ivy.xml (original)
+++ lucene/dev/branches/lucene3312/lucene/test-framework/ivy.xml Thu Aug 30 22:43:41 2012
@@ -30,7 +30,6 @@
 
     <dependencies defaultconf="default">
       <dependency org="org.apache.ant" name="ant" rev="1.8.2" transitive="false" />
-      <dependency org="org.apache.ant" name="ant-junit" rev="1.8.2" transitive="false" />
 
       <dependency org="junit" name="junit" rev="4.10" transitive="false" conf="default->*;junit4-stdalone->*" />
       <dependency org="com.carrotsearch.randomizedtesting" name="junit4-ant" rev="2.0.0.rc5" transitive="false" conf="default->*;junit4-stdalone->*" />

Modified: lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/analysis/MockTokenizer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/analysis/MockTokenizer.java?rev=1379200&r1=1379199&r2=1379200&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/analysis/MockTokenizer.java (original)
+++ lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/analysis/MockTokenizer.java Thu Aug 30 22:43:41 2012
@@ -227,10 +227,10 @@ public class MockTokenizer extends Token
   }
 
   @Override
-  public void setReader(Reader input) throws IOException {
-    super.setReader(input);
+  boolean setReaderTestPoint() {
     assert !enableChecks || streamState == State.CLOSE : "setReader() called in wrong state: " + streamState;
     streamState = State.SETREADER;
+    return true;
   }
 
   @Override

Modified: lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/codecs/bloom/TestBloomFilteredLucene40Postings.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/codecs/bloom/TestBloomFilteredLucene40Postings.java?rev=1379200&r1=1379199&r2=1379200&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/codecs/bloom/TestBloomFilteredLucene40Postings.java (original)
+++ lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/codecs/bloom/TestBloomFilteredLucene40Postings.java Thu Aug 30 22:43:41 2012
@@ -1,77 +1,77 @@
-package org.apache.lucene.codecs.bloom;
-
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import java.io.IOException;
-
-import org.apache.lucene.codecs.FieldsConsumer;
-import org.apache.lucene.codecs.FieldsProducer;
-import org.apache.lucene.codecs.PostingsFormat;
-import org.apache.lucene.codecs.bloom.BloomFilteringPostingsFormat;
-import org.apache.lucene.codecs.lucene40.Lucene40PostingsFormat;
-import org.apache.lucene.index.FieldInfo;
-import org.apache.lucene.index.SegmentReadState;
-import org.apache.lucene.index.SegmentWriteState;
-import org.apache.lucene.util.FuzzySet;
-import org.apache.lucene.util.hash.MurmurHash2;
-
-/**
- * A class used for testing {@link BloomFilteringPostingsFormat} with a concrete
- * delegate (Lucene40). Creates a Bloom filter on ALL fields and with tiny
- * amounts of memory reserved for the filter. DO NOT USE IN A PRODUCTION
- * APPLICATION This is not a realistic application of Bloom Filters as they
- * ordinarily are larger and operate on only primary key type fields.
- */
-public class TestBloomFilteredLucene40Postings extends PostingsFormat {
-  
-  private BloomFilteringPostingsFormat delegate;
-  
-  // Special class used to avoid OOM exceptions where Junit tests create many
-  // fields.
-  static class LowMemoryBloomFactory extends BloomFilterFactory {
-    @Override
-    public FuzzySet getSetForField(SegmentWriteState state,FieldInfo info) {
-      return FuzzySet.createSetBasedOnMaxMemory(1024, new MurmurHash2());
-    }
-    
-    @Override
-    public boolean isSaturated(FuzzySet bloomFilter, FieldInfo fieldInfo) {
-      // For test purposes always maintain the BloomFilter - even past the point
-      // of usefulness when all bits are set
-      return false;
-    }
-  }
-  
-  public TestBloomFilteredLucene40Postings() {
-    super("TestBloomFilteredLucene40Postings");
-    delegate = new BloomFilteringPostingsFormat(new Lucene40PostingsFormat(),
-        new LowMemoryBloomFactory());
-  }
-  
-  @Override
-  public FieldsConsumer fieldsConsumer(SegmentWriteState state)
-      throws IOException {
-    return delegate.fieldsConsumer(state);
-  }
-  
-  @Override
-  public FieldsProducer fieldsProducer(SegmentReadState state)
-      throws IOException {
-    return delegate.fieldsProducer(state);
-  }
-}
+package org.apache.lucene.codecs.bloom;
+
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import java.io.IOException;
+
+import org.apache.lucene.codecs.FieldsConsumer;
+import org.apache.lucene.codecs.FieldsProducer;
+import org.apache.lucene.codecs.PostingsFormat;
+import org.apache.lucene.codecs.bloom.BloomFilteringPostingsFormat;
+import org.apache.lucene.codecs.lucene40.Lucene40PostingsFormat;
+import org.apache.lucene.index.FieldInfo;
+import org.apache.lucene.index.SegmentReadState;
+import org.apache.lucene.index.SegmentWriteState;
+import org.apache.lucene.util.FuzzySet;
+import org.apache.lucene.util.hash.MurmurHash2;
+
+/**
+ * A class used for testing {@link BloomFilteringPostingsFormat} with a concrete
+ * delegate (Lucene40). Creates a Bloom filter on ALL fields and with tiny
+ * amounts of memory reserved for the filter. DO NOT USE IN A PRODUCTION
+ * APPLICATION This is not a realistic application of Bloom Filters as they
+ * ordinarily are larger and operate on only primary key type fields.
+ */
+public class TestBloomFilteredLucene40Postings extends PostingsFormat {
+  
+  private BloomFilteringPostingsFormat delegate;
+  
+  // Special class used to avoid OOM exceptions where Junit tests create many
+  // fields.
+  static class LowMemoryBloomFactory extends BloomFilterFactory {
+    @Override
+    public FuzzySet getSetForField(SegmentWriteState state,FieldInfo info) {
+      return FuzzySet.createSetBasedOnMaxMemory(1024, new MurmurHash2());
+    }
+    
+    @Override
+    public boolean isSaturated(FuzzySet bloomFilter, FieldInfo fieldInfo) {
+      // For test purposes always maintain the BloomFilter - even past the point
+      // of usefulness when all bits are set
+      return false;
+    }
+  }
+  
+  public TestBloomFilteredLucene40Postings() {
+    super("TestBloomFilteredLucene40Postings");
+    delegate = new BloomFilteringPostingsFormat(new Lucene40PostingsFormat(),
+        new LowMemoryBloomFactory());
+  }
+  
+  @Override
+  public FieldsConsumer fieldsConsumer(SegmentWriteState state)
+      throws IOException {
+    return delegate.fieldsConsumer(state);
+  }
+  
+  @Override
+  public FieldsProducer fieldsProducer(SegmentReadState state)
+      throws IOException {
+    return delegate.fieldsProducer(state);
+  }
+}

Modified: lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/codecs/bloom/package.html
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/codecs/bloom/package.html?rev=1379200&r1=1379199&r2=1379200&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/codecs/bloom/package.html (original)
+++ lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/codecs/bloom/package.html Thu Aug 30 22:43:41 2012
@@ -1,25 +1,25 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<html>
-<head>
-   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-</head>
-<body>
-Support for generating test indexes using the BloomFilteringPostingsFormat
-</body>
-</html>
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<html>
+<head>
+   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+</head>
+<body>
+Support for generating test indexes using the BloomFilteringPostingsFormat
+</body>
+</html>

Modified: lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/search/ShardSearchingTestBase.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/search/ShardSearchingTestBase.java?rev=1379200&r1=1379199&r2=1379200&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/search/ShardSearchingTestBase.java (original)
+++ lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/search/ShardSearchingTestBase.java Thu Aug 30 22:43:41 2012
@@ -468,15 +468,17 @@ public abstract class ShardSearchingTest
 
     // Get the current (fresh) searcher for this node
     public ShardIndexSearcher acquire() {
-      final ShardIndexSearcher s = currentShardSearcher;
-      // TODO: this isn't thread safe.... in theory the
-      // reader could get decRef'd to 0 before we have a
-      // chance to incRef, ie if a reopen happens right
-      // after the above line, this thread gets stalled, and
-      // the old IR is closed.  But because we use SLM in
-      // this test, this will be exceptionally rare:
-      s.getIndexReader().incRef();
-      return s;
+      while(true) {
+        final ShardIndexSearcher s = currentShardSearcher;
+        // In theory the reader could get decRef'd to 0
+        // before we have a chance to incRef, ie if a reopen
+        // happens right after the above line, this thread
+        // gets stalled, and the old IR is closed.  So we
+        // must try/retry until incRef succeeds:
+        if (s.getIndexReader().tryIncRef()) {
+          return s;
+        }
+      }
     }
 
     public void release(ShardIndexSearcher s) throws IOException {

Modified: lucene/dev/branches/lucene3312/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/solr/CHANGES.txt?rev=1379200&r1=1379199&r2=1379200&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/solr/CHANGES.txt (original)
+++ lucene/dev/branches/lucene3312/solr/CHANGES.txt Thu Aug 30 22:43:41 2012
@@ -85,6 +85,22 @@ Bug Fixes
 * SOLR-3746: Proper error reporting if updateLog is configured w/o necessary 
   "_version_" field in schema.xml (hossman)
 
+* SOLR-3745: Proper error reporting if SolrCloud mode is used w/o 
+  necessary "_version_" field in schema.xml (hossman)
+
+* SOLR-3770: Overseer may lose updates to cluster state (siren)
+
+* SOLR-3721: Fix bug that could allow multiple recoveries to run briefly at
+  the same time if the recovery thread join call was interrupted.
+  (Per Steffensen, Mark Miller)
+  
+* SOLR-3750: On session expiration, we should explicitly wait some time before 
+  running the leader sync process so that we are sure every node participates.
+  (Per Steffensen, Mark Miller)
+  
+* SOLR-3772: On cluster startup, we should wait until we see all registered 
+  replicas before running the leader process - or if they all do not come up, 
+  N amount of time. (Jan Høydahl, Per Steffensen, Mark Miller)
 
 Other Changes
 ----------------------
@@ -100,6 +116,16 @@ Other Changes
 
 * SOLR-3707: Upgrade Solr to Tika 1.2 (janhoy)
 
+* SOLR-2747: Updated changes2html.pl to handle Solr's CHANGES.txt; added
+  target 'changes-to-html' to solr/build.xml.
+  (Steve Rowe, Robert Muir)
+  
+* SOLR-3752: When a leader goes down, have the Overseer clear the leader state
+  in cluster.json (Mark Miller)
+
+* SOLR-3751: Add defensive checks for SolrCloud updates and requests that ensure 
+  the local state matches what we can tell the request expected. (Mark Miller)
+
 ==================  4.0.0-BETA ===================
 
 
@@ -234,7 +260,7 @@ Bug Fixes
 
 * SOLR-3660: Velocity: Link to admin page broken (janhoy)
 
-* SOLR-3658: Adding thousands of docs with one UpdateProcessorChain instance can briefly create 
+* SOLR-3658: Adding thousands of docs with one UpdateProcessorChain instance can briefly create
   spikes of threads in the thousands. (yonik, Mark Miller)
 
 * SOLR-3656: A core reload now always uses the same dataDir.  (Mark Miller, yonik)
@@ -308,6 +334,7 @@ Other Changes
   Also, the configuration itself can be passed using the "dataConfig" parameter rather than
   using a file (this previously worked in debug mode only).  When configuration errors are 
   encountered, the error message is returned in XML format.  (James Dyer)
+  
 * SOLR-3439: Make SolrCell easier to use out of the box. Also improves "/browse" to display
   rich-text documents correctly, along with facets for author and content_type.  
   With the new "content" field, highlighting of body is supported. See also SOLR-3672 for
@@ -421,26 +448,26 @@ New Features
   built-in load balancing, and distributed indexing. 
   (Jamie Johnson, Sami Siren, Ted Dunning, yonik, Mark Miller)
   Additional Work:
-  SOLR-2324: SolrCloud solr.xml parameters are not persisted by CoreContainer.
-  (Massimo Schiavon, Mark Miller)
-  SOLR-2287: Allow users to query by multiple, compatible collections with SolrCloud.
-  (Soheb Mahmood, Alex Cowell, Mark Miller)
-  SOLR-2622: ShowFileRequestHandler does not work in SolrCloud mode. 
-  (Stefan Matheis, Mark Miller)
-  SOLR-3108: Error in SolrCloud's replica lookup code when replica's are hosted in same Solr instance.
-  (Bruno Dumon, Sami Siren, Mark Miller)
-  SOLR-3080: Remove shard info from zookeeper when SolrCore is explicitly unloaded.
-  (yonik, Mark Miller, siren)
-  SOLR-3437: Recovery issues a spurious commit to the cluster. (Trym R. Møller via Mark Miller)
-  SOLR-2822: Skip update processors already run on other nodes (hossman)
+  - SOLR-2324: SolrCloud solr.xml parameters are not persisted by CoreContainer.
+    (Massimo Schiavon, Mark Miller)
+  - SOLR-2287: Allow users to query by multiple, compatible collections with SolrCloud.
+    (Soheb Mahmood, Alex Cowell, Mark Miller)
+  - SOLR-2622: ShowFileRequestHandler does not work in SolrCloud mode.
+    (Stefan Matheis, Mark Miller)
+  - SOLR-3108: Error in SolrCloud's replica lookup code when replica's are hosted in same Solr instance.
+    (Bruno Dumon, Sami Siren, Mark Miller)
+  - SOLR-3080: Remove shard info from zookeeper when SolrCore is explicitly unloaded.
+    (yonik, Mark Miller, siren)
+  - SOLR-3437: Recovery issues a spurious commit to the cluster. (Trym R. Møller via Mark Miller)
+  - SOLR-2822: Skip update processors already run on other nodes (hossman)
 
 * SOLR-1566: Transforming documents in the ResponseWriters.  This will allow
   for more complex results in responses and open the door for function queries
   as results. 
-  (ryan with patches from grant, noble, cmale, yonik, Jan Høydahl, 
+  (ryan with patches from grant, noble, cmale, yonik, Jan Høydahl,
   Arul Kalaipandian, Luca Cavanna, hossman)
-  SOLR-2037: Thanks to SOLR-1566, documents boosted by the QueryElevationComponent
-  can be marked as boosted.  (gsingers, ryan, yonik)
+  - SOLR-2037: Thanks to SOLR-1566, documents boosted by the QueryElevationComponent
+    can be marked as boosted.  (gsingers, ryan, yonik)
 
 * SOLR-2396: Add CollationField, which is much more efficient than 
   the Solr 3.x CollationKeyFilterFactory, and also supports 
@@ -456,10 +483,10 @@ New Features
   (Jan Høydahl via yonik)
 
 * SOLR-2272: Pseudo-join queries / filters.  Examples:
-  To restrict to the set of parents with at least one blue-eyed child:
-    fq={!join from=parent to=name}eyes:blue
-  To restrict to the set of children with at least one blue-eyed parent:
-    fq={!join from=name to=parent}eyes:blue
+  - To restrict to the set of parents with at least one blue-eyed child:
+      fq={!join from=parent to=name}eyes:blue
+  - To restrict to the set of children with at least one blue-eyed parent:
+      fq={!join from=name to=parent}eyes:blue
   (yonik)
 
 * SOLR-1942: Added the ability to select postings format per fieldType in schema.xml
@@ -506,12 +533,12 @@ New Features
 * SOLR-2703: Added support for Lucene's "surround" query parser. (Simon Rosenthal, ehatcher)
 
 * SOLR-2754: Added factories for several ranking algorithms: 
-    BM25SimilarityFactory: Okapi BM25
-    DFRSimilarityFactory: Divergence from Randomness models
-    IBSimilarityFactory: Information-based models
-    LMDirichletSimilarity: LM with Dirichlet smoothing
-    LMJelinekMercerSimilarity: LM with Jelinek-Mercer smoothing
- (David Mark Nemeskey, Robert Muir)
+    - BM25SimilarityFactory: Okapi BM25
+    - DFRSimilarityFactory: Divergence from Randomness models
+    - IBSimilarityFactory: Information-based models
+    - LMDirichletSimilarity: LM with Dirichlet smoothing
+    - LMJelinekMercerSimilarity: LM with Jelinek-Mercer smoothing
+  (David Mark Nemeskey, Robert Muir)
  
 * SOLR-2134 Trie* fields should support sortMissingLast=true, and deprecate Sortable* Field Types
   (Ryan McKinley, Mike McCandless, Uwe Schindler, Erick Erickson)
@@ -534,18 +561,18 @@ New Features
 * SOLR-2802: New FieldMutatingUpdateProcessor and Factory to simplify the
   development of UpdateProcessors that modify field values of documents as 
   they are indexed. Also includes several useful new implementations:
-      RemoveBlankFieldUpdateProcessorFactory
-      TrimFieldUpdateProcessorFactory
-      HTMLStripFieldUpdateProcessorFactory
-      RegexReplaceProcessorFactory
-      FieldLengthUpdateProcessorFactory
-      ConcatFieldUpdateProcessorFactory
-      FirstFieldValueUpdateProcessorFactory
-      LastFieldValueUpdateProcessorFactory
-      MinFieldValueUpdateProcessorFactory
-      MaxFieldValueUpdateProcessorFactory
-      TruncateFieldUpdateProcessorFactory
-      IgnoreFieldUpdateProcessorFactory 
+    - RemoveBlankFieldUpdateProcessorFactory
+    - TrimFieldUpdateProcessorFactory
+    - HTMLStripFieldUpdateProcessorFactory
+    - RegexReplaceProcessorFactory
+    - FieldLengthUpdateProcessorFactory
+    - ConcatFieldUpdateProcessorFactory
+    - FirstFieldValueUpdateProcessorFactory
+    - LastFieldValueUpdateProcessorFactory
+    - MinFieldValueUpdateProcessorFactory
+    - MaxFieldValueUpdateProcessorFactory
+    - TruncateFieldUpdateProcessorFactory
+    - IgnoreFieldUpdateProcessorFactory
   (hossman, janhoy)
 
 * SOLR-3120: Optional post filtering for spatial queries bbox and geofilt
@@ -559,8 +586,8 @@ New Features
 
 * SOLR-2898: Support grouped faceting. (Martijn van Groningen)
   Additional Work:
-  SOLR-3406: Extended grouped faceting support to facet.query and facet.range parameters.
-             (David Boychuck, Martijn van Groningen)
+  - SOLR-3406: Extended grouped faceting support to facet.query and facet.range parameters.
+               (David Boychuck, Martijn van Groningen)
 
 * SOLR-2949: QueryElevationComponent is now supported with distributed search.
   (Mark Miller, yonik)
@@ -643,9 +670,9 @@ New Features
 
 * SOLR-3508: Simplify JSON update format for deletes as well as allow
   version specification for optimistic locking.  Examples:
-    {"delete":"myid"}
-    {"delete":["id1","id2","id3"]}
-    {"delete":{"id":"myid", "_version_":123456789}}
+    - {"delete":"myid"}
+    - {"delete":["id1","id2","id3"]}
+    - {"delete":{"id":"myid", "_version_":123456789}}
   (yonik)
 
 * SOLR-3211:  Allow parameter overrides in conjunction with "spellcheck.maxCollationTries".
@@ -689,9 +716,9 @@ Optimizations
   works with SolrCore to provide faster 'soft' commits, and has an improved API 
   that requires less instanceof special casing. (Mark Miller, Robert Muir)
   Additional Work:
-  SOLR-2697: commit and autocommit operations don't reset 
-  DirectUpdateHandler2.numDocsPending stats attribute.
-  (Alexey Serba, Mark Miller)
+  - SOLR-2697: commit and autocommit operations don't reset
+    DirectUpdateHandler2.numDocsPending stats attribute.
+    (Alexey Serba, Mark Miller)
 
 * SOLR-2950: The QueryElevationComponent now avoids using the FieldCache and looking up
   every document id (gsingers, yonik)
@@ -736,8 +763,8 @@ Bug Fixes
 * SOLR-2193, SOLR-2565, SOLR-2651: SolrCores now properly share IndexWriters across SolrCore reloads.
   (Mark Miller, Robert Muir)
   Additional Work:
-  SOLR-2705: On reload, IndexWriterProvider holds onto the initial SolrCore it was created with.
-  (Yury Kats, Mark Miller)
+  - SOLR-2705: On reload, IndexWriterProvider holds onto the initial SolrCore it was created with.
+    (Yury Kats, Mark Miller)
 
 * SOLR-2682: Remove addException() in SimpleFacet. FacetComponent no longer catches and embeds
   exceptions occurred during facet processing, it throws HTTP 400 or 500 exceptions instead. (koji)
@@ -916,7 +943,7 @@ Other Changes
 * SOLR-2607: Removed deprecated client/ruby directory, which included solr-ruby and flare.
   (ehatcher)
   
-* Solr-3032: logOnce from SolrException logOnce and all the supporting
+* SOLR-3032: logOnce from SolrException logOnce and all the supporting
   structure is gone. abortOnConfugrationError is also gone as it is no longer referenced.
   Errors should be caught and logged at the top-most level or logged and NOT propagated up the 
   chain. (Erick Erickson)
@@ -996,7 +1023,7 @@ More information about this release, inc
 release notes, upgrade instructions, or other changes may be found online at:
    https://wiki.apache.org/solr/Solr3.6.1
 
-Bug Fixes:
+Bug Fixes
 
 * LUCENE-3969: Throw IAE on bad arguments that could cause confusing errors in
   PatternTokenizer. CommonGrams populates PositionLengthAttribute correctly.
@@ -1171,7 +1198,7 @@ New Features
 * SOLR-2001: The query component will substitute an empty query that matches
   no documents if the query parser returns null.  This also prevents an
   exception from being thrown by the default parser if "q" is missing. (yonik)
-  SOLR-435: if q is "" then it's also acceptable. (dsmiley, hoss)
+  - SOLR-435: if q is "" then it's also acceptable. (dsmiley, hoss)
 
 * SOLR-2919: Added parametric tailoring options to ICUCollationKeyFilterFactory.
   These can be used to customize range query/sort behavior, for example to
@@ -1554,7 +1581,7 @@ Bug Fixes
 * SOLR-2875: Fix the incorrect url in DIH example tika-data-config.xml 
   (Shinichiro Abe via koji)
 
- Other Changes
+Other Changes
 ----------------------
 
 * SOLR-2750: Make both "update.chain" and the deprecated "update.param" work
@@ -1690,7 +1717,7 @@ Bug Fixes
 * SOLR-2625: TermVectorComponent throws NPE if TF-IDF option is used without DF
   option. (Daniel Erenrich, Simon Willnauer)
 
-* SOLR-2631: PingRequestHandler should not allow to ping itsself using "qt"
+* SOLR-2631: PingRequestHandler should not allow to ping itself using "qt"
   param to prevent infinite loop. (Edoardo Tosca, Uwe Schindler)
 
 * SOLR-2636: Fix explain functionality for negative queries. (Tom Hill via yonik)
@@ -1764,7 +1791,7 @@ Bug Fixes
 * SOLR-2668: DIH multithreaded mode does not rollback on errors from 
   EntityProcessor (Frank Wesemann, shalin)
 
- Other Changes
+Other Changes
 ----------------------
 
 * SOLR-2629: Eliminate deprecation warnings in some JSPs.
@@ -2910,10 +2937,10 @@ Use of the "charset" option when configu
 Factories has been deprecated and will cause a warning to be logged.
 In future versions of Solr attempting to use this option will cause an
 error.  See SOLR-1410 for more information.
- * GreekLowerCaseFilterFactory
- * RussianStemFilterFactory
- * RussianLowerCaseFilterFactory
- * RussianLetterTokenizerFactory
+ - GreekLowerCaseFilterFactory
+ - RussianStemFilterFactory
+ - RussianLowerCaseFilterFactory
+ - RussianLetterTokenizerFactory
 
 DIH: Evaluator API has been changed in a non back-compatible way. Users who 
 have developed custom Evaluators will need to change their code according to 
@@ -2990,7 +3017,7 @@ New Features
  7. SOLR-680: Add StatsComponent. This gets simple statistics on matched numeric fields,
     including: min, max, mean, median, stddev.  (koji, ryan)
 
-    7.1 SOLR-1380: Added support for multi-valued fields (Harish Agarwal via gsingers)
+    - SOLR-1380: Added support for multi-valued fields (Harish Agarwal via gsingers)
 
  8. SOLR-561: Added Replication implemented in Java as a request handler. Supports index replication
     as well as configuration replication and exposes detailed statistics and progress information
@@ -3511,11 +3538,12 @@ Bug Fixes
 28. SOLR-1008: Fix stats.jsp XML encoding for <stat> item entries with ampersands in their names.  (ehatcher)
 
 29. SOLR-976: deleteByQuery is ignored when deleteById is placed prior to deleteByQuery in a <delete>.
-    Now both delete by id and delete by query can be specified at the same time as follows. (koji)
+    Now both delete by id and delete by query can be specified at the same time as follows.
       <delete>
         <id>05991</id><id>06000</id>
         <query>office:Bridgewater</query><query>office:Osaka</query>
       </delete>
+    (koji)
 
 30. SOLR-1016: HTTP 503 error changes 500 in SolrCore (koji)
 
@@ -3774,7 +3802,7 @@ Other Changes
  8. SOLR-875: Upgraded to Lucene 2.9-dev (r723985) and consolidated the BitSet implementations (Michael Busch, gsingers)
 
  9. SOLR-819: Upgraded to Lucene 2.9-dev (r724059) to get access to Arabic public constructors (gsingers)
-                                                 and
+
 10. SOLR-900: Moved solrj into /src/solrj.  The contents of solr-common.jar is now included
     in the solr-solrj.jar. (ryan)
 
@@ -3858,10 +3886,10 @@ Other Changes
     (hossman)
 
 42. Upgraded to Lucene 2.9-dev r794238. Other changes include:
-    LUCENE-1614 - Use Lucene's DocIdSetIterator.NO_MORE_DOCS as the sentinel value.
-    LUCENE-1630 - Add acceptsDocsOutOfOrder method to Collector implementations.
-    LUCENE-1673, LUCENE-1701 - Trie has moved to Lucene core and renamed to NumericRangeQuery.
-    LUCENE-1662, LUCENE-1687 - Replace usage of ExtendedFieldCache by FieldCache.
+    - LUCENE-1614 - Use Lucene's DocIdSetIterator.NO_MORE_DOCS as the sentinel value.
+    - LUCENE-1630 - Add acceptsDocsOutOfOrder method to Collector implementations.
+    - LUCENE-1673, LUCENE-1701 - Trie has moved to Lucene core and renamed to NumericRangeQuery.
+    - LUCENE-1662, LUCENE-1687 - Replace usage of ExtendedFieldCache by FieldCache.
     (shalin)
 
 42. SOLR-1241: Solr's CharFilter has been moved to Lucene. Remove CharFilter and related classes
@@ -3871,7 +3899,7 @@ Other Changes
 
 44. Upgraded to Lucene 2.9-dev r801856 (Mark Miller)
 
-45. SOLR1276: Added StatsComponentTest (Rafa�ł Ku�ć, gsingers)
+45. SOLR-1276: Added StatsComponentTest (Rafał Kuć, gsingers)
 
 46. SOLR-1377:  The TokenizerFactory API has changed to explicitly return a Tokenizer 
     rather then a TokenStream (that may be or may not be a Tokenizer).  This change 
@@ -3968,7 +3996,7 @@ Build
 
 Documentation
 ----------------------
- 1. SOLR-789: The javadoc of RandomSortField is not readable (Nicolas Lalev�Á�e via koji)
+ 1. SOLR-789: The javadoc of RandomSortField is not readable (Nicolas Lalevée via koji)
 
  2. SOLR-962: Note about null handling in ModifiableSolrParams.add javadoc
     (Kay Kay via hossman)
@@ -4013,8 +4041,8 @@ example solrconfig.xml) for more details
 In Solr 1.2, DateField did not enforce the canonical representation of
 the ISO 8601 format when parsing incoming data, and did not generation
 the canonical format when generating dates from "Date Math" strings
-(particularly as it pertains to milliseconds ending in trailing zeros)
--- As a result equivalent dates could not always be compared properly.
+(particularly as it pertains to milliseconds ending in trailing zeros).
+As a result equivalent dates could not always be compared properly.
 This problem is corrected in Solr 1.3, but DateField users that might
 have been affected by indexing inconsistent formats of equivilent
 dates (ie: 1995-12-31T23:59:59Z vs 1995-12-31T23:59:59.000Z) may want
@@ -4337,7 +4365,7 @@ Changes in runtime behavior
 
  2. SOLR-689 / SOLR-695: If you have used "MultiCore" functionality in an unreleased
     version of 1.3-dev, many classes and configs have been renamed for the official 
-    1.3 release.  Speciffically, solr.xml has replaced multicore.xml, and uses a slightly 
+    1.3 release.  Speciffically, solr.xml has replaced multicore.xml, and uses a slightly
     different syntax.  The solrj classes: MultiCore{Request/Response/Params} have been 
     renamed:  CoreAdmin{Request/Response/Params}  (hossman, ryan, Henri Biestro)
 
@@ -4416,7 +4444,7 @@ Bug Fixes
  9. SOLR-294: Logging of elapsed time broken on Solaris because the date command
     there does not support the %s output format.  (bill)
 
-10. SOLR-136: Snappuller - "date -d" and locales don't mix.  (J�Á�rgen Hermann via    bill)
+10. SOLR-136: Snappuller - "date -d" and locales don't mix.  (Jürgen Hermann via bill)
 
 11. SOLR-333: Changed distributiondump.jsp to use Solr HOME instead of CWD to set path.
  
@@ -4466,8 +4494,8 @@ Bug Fixes
 27. SOLR-267: Changed logging to report number of hits, and also provide a mechanism to add log 
     messages to be output by the SolrCore via a NamedList toLog member variable.  
     (Will Johnson, yseeley, gsingers)
-    
-    SOLR-267: Removed adding values to the HTTP headers in SolrDispatchFilter (gsingers)
+
+    - SOLR-267: Removed adding values to the HTTP headers in SolrDispatchFilter (gsingers)
 
 28. SOLR-509: Moved firstSearcher event notification to the end of the SolrCore constructor 
     (Koji Sekiguchi via gsingers)

Modified: lucene/dev/branches/lucene3312/solr/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/solr/build.xml?rev=1379200&r1=1379199&r2=1379200&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/solr/build.xml (original)
+++ lucene/dev/branches/lucene3312/solr/build.xml Thu Aug 30 22:43:41 2012
@@ -320,6 +320,9 @@
     <!-- Exclude clover license files incompatible with the ASL -->
     <delete dir="${svn.export.dir}/lucene/tools/clover"/>
 
+    <build-changes changes.src.dir="${svn.export.dir}/lucene/site/changes"
+                   changes.target.dir="${svn.export.dir}/solr/docs/changes"/>
+
     <tar destfile="${source.package.file}" compression="gzip" longfile="gnu">
       <tarfileset dir="${svn.export.dir}"
                   prefix="${fullnamever}"
@@ -368,7 +371,7 @@
 
   <target name="create-package"
           description="Packages the Solr Binary Distribution"
-          depends="init-dist, dist, example, javadocs">
+          depends="init-dist, dist, example, javadocs, changes-to-html">
     <mkdir dir="${dest}/${fullnamever}"/>
     <delete includeemptydirs="true">
       <fileset dir="${example}/solr-webapp" includes="**/*"/>
@@ -444,6 +447,10 @@
     </zip>
     <make-checksums file="${package.dir}/${fullnamever}.zip"/>
   </target>
+
+  <target name="changes-to-html">
+    <build-changes changes.src.dir="${changes.src.dir}" changes.target.dir="${changes.target.dir}" />
+  </target>
  
   <target name="sign-artifacts">
     <sign-artifacts-macro artifacts.dir="${package.dir}"/>
@@ -638,12 +645,6 @@
     </exec>
   </target>
  
-  <target name="svn-up">
-    <exec executable="${svn.exe}">
-      <arg value="update"/>
-    </exec>
-  </target>
-
   <property name="analysis-common.res.dir"  value="../lucene/analysis/common/src/resources/org/apache/lucene/analysis"/>
   <property name="analysis-kuromoji.res.dir"  value="../lucene/analysis/kuromoji/src/resources/org/apache/lucene/analysis"/>
   <property name="analysis.conf.dest" value="${example}/solr/conf/lang"/>

Modified: lucene/dev/branches/lucene3312/solr/common-build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/solr/common-build.xml?rev=1379200&r1=1379199&r2=1379200&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/solr/common-build.xml (original)
+++ lucene/dev/branches/lucene3312/solr/common-build.xml Thu Aug 30 22:43:41 2012
@@ -49,6 +49,8 @@
   <property name="tests.loggingfile" value="${common-solr.dir}/testlogging.properties"/>
   <property name="tests.cleanthreads.sysprop" value="perClass"/>
 
+  <property name="changes.target.dir" value="${dest}/docs/changes"/>
+
   <import file="${common-solr.dir}/../lucene/module-build.xml"/>
 
   <path id="additional.dependencies">

Modified: lucene/dev/branches/lucene3312/solr/core/src/java/org/apache/solr/analysis/TrieTokenizerFactory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/solr/core/src/java/org/apache/solr/analysis/TrieTokenizerFactory.java?rev=1379200&r1=1379199&r2=1379200&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/solr/core/src/java/org/apache/solr/analysis/TrieTokenizerFactory.java (original)
+++ lucene/dev/branches/lucene3312/solr/core/src/java/org/apache/solr/analysis/TrieTokenizerFactory.java Thu Aug 30 22:43:41 2012
@@ -72,15 +72,11 @@ final class TrieTokenizer extends Tokeni
     this.type = type;
     this.precisionStep = precisionStep;
     this.ts = ts;
-
-    setReader(input);
   }
 
   @Override
-  public void setReader(Reader input) {
+  public void reset() {
    try {
-      super.setReader(input);
-      input = super.input;
       char[] buf = new char[32];
       int len = input.read(buf);
       this.startOfs = correctOffset(0);
@@ -113,6 +109,7 @@ final class TrieTokenizer extends Tokeni
     } catch (IOException e) {
       throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, "Unable to create TrieIndexTokenizer", e);
     }
+    ts.reset();
   }
 
   @Override
@@ -120,12 +117,6 @@ final class TrieTokenizer extends Tokeni
     super.close();
     ts.close();
   }
-  
-  @Override
-  public void reset() throws IOException {
-    super.reset();
-    ts.reset();
-  }
 
   @Override
   public boolean incrementToken() {

Modified: lucene/dev/branches/lucene3312/solr/core/src/java/org/apache/solr/client/solrj/embedded/JettySolrRunner.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/solr/core/src/java/org/apache/solr/client/solrj/embedded/JettySolrRunner.java?rev=1379200&r1=1379199&r2=1379200&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/solr/core/src/java/org/apache/solr/client/solrj/embedded/JettySolrRunner.java (original)
+++ lucene/dev/branches/lucene3312/solr/core/src/java/org/apache/solr/client/solrj/embedded/JettySolrRunner.java Thu Aug 30 22:43:41 2012
@@ -25,6 +25,7 @@ import java.util.Map;
 import java.util.Random;
 
 import javax.servlet.DispatcherType;
+import javax.servlet.Filter;
 import javax.servlet.http.HttpServlet;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
@@ -40,6 +41,7 @@ import org.eclipse.jetty.servlet.Servlet
 import org.eclipse.jetty.util.component.LifeCycle;
 import org.eclipse.jetty.util.log.Logger;
 import org.eclipse.jetty.util.thread.QueuedThreadPool;
+import org.eclipse.jetty.util.thread.ThreadPool;
 
 /**
  * Run solr using jetty
@@ -47,8 +49,6 @@ import org.eclipse.jetty.util.thread.Que
  * @since solr 1.3
  */
 public class JettySolrRunner {
-  static Map<JettySolrRunner,Exception> RUNNING_JETTIES = new HashMap<JettySolrRunner,Exception>();
-  
   Server server;
 
   FilterHolder dispatchFilter;
@@ -208,7 +208,6 @@ public class JettySolrRunner {
     
     if (!server.isRunning()) {
       server.start();
-      RUNNING_JETTIES.put(this, new RuntimeException());
     }
     synchronized (JettySolrRunner.this) {
       int cnt = 0;
@@ -225,20 +224,31 @@ public class JettySolrRunner {
   }
 
   public void stop() throws Exception {
-    if (!server.isStopped() && !server.isStopping()) {
-      server.stop();
-      RUNNING_JETTIES.remove(this);
+    // we try and do a bunch of extra stop stuff because
+    // jetty doesn't like to stop if it started
+    // and ended up in a failure state (like when it cannot get the port)
+    if (server.getState().equals(Server.FAILED)) {
+      Connector[] connectors = server.getConnectors();
+      for (Connector connector : connectors) {
+        connector.stop();
+      }
     }
-    server.join();
-  }
-  
-  public static void assertStoppedJetties() {
-    if (RUNNING_JETTIES.size() > 0) {
-      Iterator<Exception> stacktraces = RUNNING_JETTIES.values().iterator();
-      Exception cause = null;
-      cause = stacktraces.next();
-      throw new RuntimeException("Found a bad one!", cause);
+    Filter filter = dispatchFilter.getFilter();
+    ThreadPool threadPool = server.getThreadPool();
+    server.getServer().stop();
+    server.stop();
+    if (threadPool instanceof QueuedThreadPool) {
+      ((QueuedThreadPool) threadPool).setMaxStopTimeMs(15000);
+      ((QueuedThreadPool) threadPool).stop();
+      ((QueuedThreadPool) threadPool).stop();
+      ((QueuedThreadPool) threadPool).stop();
+    }
+    //server.destroy();
+    if (server.getState().equals(Server.FAILED)) {
+      filter.destroy();
     }
+    
+    server.join();
   }
 
   /**

Modified: lucene/dev/branches/lucene3312/solr/core/src/java/org/apache/solr/cloud/CloudDescriptor.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/solr/core/src/java/org/apache/solr/cloud/CloudDescriptor.java?rev=1379200&r1=1379199&r2=1379200&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/solr/core/src/java/org/apache/solr/cloud/CloudDescriptor.java (original)
+++ lucene/dev/branches/lucene3312/solr/core/src/java/org/apache/solr/cloud/CloudDescriptor.java Thu Aug 30 22:43:41 2012
@@ -26,6 +26,12 @@ public class CloudDescriptor {
   private String roles = null;
   private Integer numShards;
   
+  volatile boolean isLeader = false;
+  
+  public boolean isLeader() {
+    return isLeader;
+  }
+
   public void setShardId(String shardId) {
     this.shardId = shardId;
   }