Move "refs/..." constants to a RefNames class

This class lives in gerrit-reviewdb because "refs/changes/" needs to be
referenced from PatchSet in reviewdb/client (and other UI classes).

Rename constants to all use REFS_* instead of being inconsistent.

Change-Id: I76e6ee7e63a4549b51a43698fb50b54a19dabfc6
This commit is contained in:
Dave Borowitz
2013-12-11 08:55:24 -08:00
parent 2f7cb5997f
commit 31b599b40f
40 changed files with 150 additions and 105 deletions

View File

@@ -18,6 +18,7 @@ import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
import com.google.gerrit.extensions.restapi.ResourceNotFoundException;
import com.google.gerrit.extensions.restapi.RestReadView;
import com.google.gerrit.reviewdb.client.RefNames;
import com.google.gerrit.server.git.GitRepositoryManager;
import com.google.inject.Inject;
@@ -115,7 +116,7 @@ public class ListBranches implements RestReadView<ProjectResource> {
if (refControl.isVisible()) {
if (ref.getName().startsWith(Constants.R_HEADS)) {
branches.add(createBranchInfo(ref, refControl, targets));
} else if (GitRepositoryManager.REF_CONFIG.equals(ref.getName())) {
} else if (RefNames.REFS_CONFIG.equals(ref.getName())) {
configBranch = createBranchInfo(ref, refControl, targets);
}
}