Merge branch 'stable-2.11'

* stable-2.11:
  Update buck to ba9f239f69287a553ca93af76a27484d83693563
  Fix Incorrect owner group matching behaviour for creating projects
  Remove unused account constants properties
  Add username to stream-events queue entries
  Set correct revision of cookbook plugin
  Revert "Prevent usage of not initialized IndexCollection"
  Handle commit validation errors when creating new change via REST
  Handle commit validation errors when publishing change edit
  ChangeEditUtil.publish: Remove declaration of unthrown exception
  Prevent usage of not initialized IndexCollection

The changes:

  Handle commit validation errors when creating new change via REST
  Handle commit validation errors when publishing change edit

are reverted by this merge due to conflicts with refactored code
on master.  The fixes will be reapplied in follow-up commits

Change-Id: I9db2ec48c0f9cde8f176976f6caf4aa0bbe66b72
diff --git a/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/ssh/CreateProjectIT.java b/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/ssh/CreateProjectIT.java
new file mode 100644
index 0000000..a779136
--- /dev/null
+++ b/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/ssh/CreateProjectIT.java
@@ -0,0 +1,56 @@
+// Copyright (C) 2015 The Android Open Source Project
+//
+// Licensed 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.
+
+package com.google.gerrit.acceptance.ssh;
+
+import static com.google.common.truth.Truth.assertThat;
+import static com.google.common.truth.Truth.assert_;
+
+import com.google.gerrit.acceptance.AbstractDaemonTest;
+import com.google.gerrit.reviewdb.client.Project;
+import com.google.gerrit.server.project.ProjectState;
+
+import org.junit.Test;
+
+public class CreateProjectIT extends AbstractDaemonTest {
+
+  @Test
+  public void withValidGroupName() throws Exception {
+    String newGroupName = "newGroup";
+    adminSession.put("/groups/" + newGroupName);
+    String newProjectName = "newProject";
+    sshSession.exec("gerrit create-project --branch master --owner "
+        + newGroupName + " " + newProjectName);
+    assert_().withFailureMessage(sshSession.getError())
+        .that(sshSession.hasError()).isFalse();
+    ProjectState projectState =
+        projectCache.get(new Project.NameKey(newProjectName));
+    assertThat(projectState).isNotNull();
+  }
+
+  @Test
+  public void withInvalidGroupName() throws Exception {
+    String newGroupName = "newGroup";
+    adminSession.put("/groups/" + newGroupName);
+    String wrongGroupName = "newG";
+    String newProjectName = "newProject";
+    sshSession.exec("gerrit create-project --branch master --owner "
+        + wrongGroupName + " " + newProjectName);
+    assert_().withFailureMessage(sshSession.getError())
+        .that(sshSession.hasError()).isTrue();
+    ProjectState projectState =
+        projectCache.get(new Project.NameKey(newProjectName));
+    assertThat(projectState).isNull();
+  }
+}
diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/account/AccountConstants.properties b/gerrit-gwtui/src/main/java/com/google/gerrit/client/account/AccountConstants.properties
index 4580aea..0944448 100644
--- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/account/AccountConstants.properties
+++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/account/AccountConstants.properties
@@ -32,9 +32,6 @@
 myMenuUrl = URL
 myMenuReset = Reset
 
-changeScreenOldUi = Old Screen
-changeScreenNewUi = New Screen
-
 tabAccountSummary = Profile
 tabAgreements = Agreements
 tabContactInformation = Contact Information
diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/args4j/AccountGroupUUIDHandler.java b/gerrit-server/src/main/java/com/google/gerrit/server/args4j/AccountGroupUUIDHandler.java
index 406ca58..674fe08 100644
--- a/gerrit-server/src/main/java/com/google/gerrit/server/args4j/AccountGroupUUIDHandler.java
+++ b/gerrit-server/src/main/java/com/google/gerrit/server/args4j/AccountGroupUUIDHandler.java
@@ -43,7 +43,7 @@
   public final int parseArguments(final Parameters params)
       throws CmdLineException {
     final String n = params.getParameter(0);
-    final GroupReference group = GroupBackends.findBestSuggestion(groupBackend, n);
+    GroupReference group = GroupBackends.findExactSuggestion(groupBackend, n);
     if (group == null) {
       throw new CmdLineException(owner, "Group \"" + n + "\" does not exist");
     }
diff --git a/gerrit-sshd/src/main/java/com/google/gerrit/sshd/commands/StreamEvents.java b/gerrit-sshd/src/main/java/com/google/gerrit/sshd/commands/StreamEvents.java
index 3f7914e..379f1b9 100644
--- a/gerrit-sshd/src/main/java/com/google/gerrit/sshd/commands/StreamEvents.java
+++ b/gerrit-sshd/src/main/java/com/google/gerrit/sshd/commands/StreamEvents.java
@@ -95,6 +95,11 @@
     public void cancel() {
       onExit(0);
     }
+
+    @Override
+    public String toString() {
+      return "Stream Events (" + currentUser.getAccount().getUserName() + ")";
+    }
   };
 
   /** True if {@link #droppedOutputEvent} needs to be sent. */