Merge branch 'stable-2.8'

* stable-2.8:
  Fixed the spelling of together and very minor rewording
  Fixed the spelling of indefinitely.
  Performance Fix: Minimize number of advertisedHaves
  Add 'reindex' to the pgm help output.
This commit is contained in:
Shawn Pearce
2013-11-26 20:41:01 -08:00
4 changed files with 20 additions and 3 deletions

View File

@@ -347,9 +347,9 @@ You can also find these static references linked on the page of each change.
refs/meta/config
^^^^^^^^^^^^^^^^
This is where the Gerrit configuration of each project is residing. This
This is where the Gerrit configuration of each project resides. This
branch contains several files of importance: +project.config+, +groups+ and
+rules.pl+. Torgether they control access and behavior during the change
+rules.pl+. Together they control access and behavior during the change
review process.

View File

@@ -67,6 +67,7 @@ public final class GerritLauncher {
System.err.println();
System.err.println("The most commonly used commands are:");
System.err.println(" init Initialize a Gerrit installation");
System.err.println(" reindex Rebuild the secondary index");
System.err.println(" daemon Run the Gerrit network daemons");
System.err.println(" gsql Run the interactive query console");
System.err.println(" version Display the build version number");

View File

@@ -236,7 +236,7 @@ public final class Change {
* period while the merge queue fires and the destination branch is updated.
* However, if a dependency commit (a {@link PatchSetAncestor}, directly or
* transitively) is not yet merged into the branch, the change will hang in
* the SUBMITTED state indefinately.
* the SUBMITTED state indefinitely.
*
* <p>
* Changes in the SUBMITTED state can be moved to:

View File

@@ -37,6 +37,7 @@ import com.google.common.collect.Iterables;
import com.google.common.collect.LinkedListMultimap;
import com.google.common.collect.ListMultimap;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.SetMultimap;
import com.google.common.collect.Sets;
import com.google.common.util.concurrent.CheckedFuture;
@@ -126,6 +127,7 @@ import org.eclipse.jgit.transport.AdvertiseRefsHook;
import org.eclipse.jgit.transport.AdvertiseRefsHookChain;
import org.eclipse.jgit.transport.BaseReceivePack;
import org.eclipse.jgit.transport.ReceiveCommand;
import org.eclipse.jgit.transport.RefFilter;
import org.eclipse.jgit.transport.ReceiveCommand.Result;
import org.eclipse.jgit.transport.ReceivePack;
import org.eclipse.jgit.transport.ServiceMayNotContinueException;
@@ -393,6 +395,20 @@ public class ReceiveCommits {
rp.setAllowDeletes(true);
rp.setAllowNonFastForwards(true);
rp.setCheckReceivedObjects(true);
rp.setRefFilter(new RefFilter() {
@Override
public Map<String, Ref> filter(Map<String, Ref> refs) {
Map<String, Ref> filteredRefs = Maps.newHashMapWithExpectedSize(refs.size());
for (Map.Entry<String, Ref> e : refs.entrySet()) {
String name = e.getKey();
if (!name.startsWith("refs/changes/")
&& !name.startsWith(GitRepositoryManager.REFS_CACHE_AUTOMERGE)) {
filteredRefs.put(name, e.getValue());
}
}
return filteredRefs;
}
});
if (!projectControl.allRefsAreVisible()) {
rp.setCheckReferencedObjectsAreReachable(config.checkReferencedObjectsAreReachable);