Convert Branch.NameKey to AutoValue
See I6982fb24 for context. Change-Id: I7a79a374c9efdd4ccd9ab5169562fb8ae3452120
This commit is contained in:
@@ -146,10 +146,10 @@ public class Rebase extends RetryingRestModifyView<RevisionResource, RebaseInput
|
||||
String str = input.base.trim();
|
||||
if (str.equals("")) {
|
||||
// Remove existing dependency to other patch set.
|
||||
Ref destRef = repo.exactRef(destRefKey.get());
|
||||
Ref destRef = repo.exactRef(destRefKey.branch());
|
||||
if (destRef == null) {
|
||||
throw new ResourceConflictException(
|
||||
"can't rebase onto tip of branch " + destRefKey.get() + "; branch doesn't exist");
|
||||
"can't rebase onto tip of branch " + destRefKey.branch() + "; branch doesn't exist");
|
||||
}
|
||||
return destRef.getObjectId();
|
||||
}
|
||||
@@ -230,7 +230,7 @@ public class Rebase extends RetryingRestModifyView<RevisionResource, RebaseInput
|
||||
}
|
||||
|
||||
boolean enabled = false;
|
||||
try (Repository repo = repoManager.openRepository(change.getDest().getParentKey());
|
||||
try (Repository repo = repoManager.openRepository(change.getDest().project());
|
||||
RevWalk rw = new RevWalk(repo)) {
|
||||
if (hasOneParent(rw, rsrc.getPatchSet())) {
|
||||
enabled = rebaseUtil.canRebase(rsrc.getPatchSet(), change.getDest(), repo, rw);
|
||||
|
||||
Reference in New Issue
Block a user