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

@@ -30,6 +30,7 @@ import com.google.gerrit.common.data.Permission;
import com.google.gerrit.common.data.PermissionRule;
import com.google.gerrit.reviewdb.client.AccountGroup;
import com.google.gerrit.reviewdb.client.Project;
import com.google.gerrit.reviewdb.client.RefNames;
import com.google.gerrit.reviewdb.client.Project.InheritableBoolean;
import com.google.gerrit.rules.PrologEnvironment;
import com.google.gerrit.rules.RulesCache;
@@ -164,7 +165,7 @@ public class ProjectState {
try {
Repository git = gitMgr.openRepository(getProject().getNameKey());
try {
Ref ref = git.getRef(GitRepositoryManager.REF_CONFIG);
Ref ref = git.getRef(RefNames.REFS_CONFIG);
if (ref == null || ref.getObjectId() == null) {
return true;
}