Merge changes I1dcf439c,I991be7fa
* changes: CreateTag: Remove hook invocation Merge branch 'stable-2.12'
This commit is contained in:
commit
d9ee961309
@ -186,7 +186,7 @@ Gerrit is developed as a self-hosting open source project:
|
||||
* link:https://www.gerritcodereview.com/[Project Homepage]
|
||||
* link:https://www.gerritcodereview.com/download/index.html[Release Versions]
|
||||
* link:https://gerrit.googlesource.com/gerrit[Source]
|
||||
* link:http://code.google.com/p/gerrit/issues/list[Issue Tracking]
|
||||
* link:https://bugs.chromium.org/p/gerrit/issues/list[Issue Tracking]
|
||||
* link:https://review.source.android.com/[Change Review]
|
||||
|
||||
|
||||
|
@ -10,7 +10,7 @@ Every change is expected to have an unique Change-Id.
|
||||
|
||||
Since this error should never occur in practice, you should inform
|
||||
your Gerrit administrator if you hit this problem and/or
|
||||
link:http://code.google.com/p/gerrit/issues/list[open a Gerrit issue].
|
||||
link:https://bugs.chromium.org/p/gerrit/issues/list[open a Gerrit issue].
|
||||
|
||||
In any case to not be blocked with your work, you can simply create a
|
||||
new Change-Id for your commit and then push it as new change to
|
||||
|
@ -81,7 +81,7 @@
|
||||
* link:licenses.html[Licenses and Notices]
|
||||
* link:https://www.gerritcodereview.com/[Homepage]
|
||||
* link:https://www.gerritcodereview.com/download/index.html[Downloads]
|
||||
* link:http://code.google.com/p/gerrit/issues/list[Issue Tracking]
|
||||
* link:https://bugs.chromium.org/p/gerrit/issues/list[Issue Tracking]
|
||||
* link:https://gerrit.googlesource.com/gerrit[Source Code]
|
||||
* link:https://www.gerritcodereview.com/about.md[A History of Gerrit Code Review]
|
||||
|
||||
|
@ -25,7 +25,7 @@ There is a mirror of the repository on [Github](https://github.com/gerrit-review
|
||||
|
||||
## Reporting bugs
|
||||
|
||||
Please report bugs on the [issue tracker](https://code.google.com/p/gerrit/issues/list).
|
||||
Please report bugs on the [issue tracker](https://bugs.chromium.org/p/gerrit/issues/list).
|
||||
|
||||
## Contribute
|
||||
|
||||
|
@ -62,7 +62,7 @@
|
||||
</mailingLists>
|
||||
|
||||
<issueManagement>
|
||||
<url>http://code.google.com/p/gerrit/issues/list</url>
|
||||
<system>Google Code Issue Tracker</system>
|
||||
<url>https://bugs.chromium.org/p/gerrit/issues/list</url>
|
||||
<system>Gerrit Issue Tracker</system>
|
||||
</issueManagement>
|
||||
</project>
|
||||
|
@ -1099,15 +1099,15 @@ public class ChangeIT extends AbstractDaemonTest {
|
||||
@Test
|
||||
public void commitFooters() throws Exception {
|
||||
LabelType verified = category("Verified",
|
||||
value(1, "Failed"), value(0, "No score"), value(-1, "Passes"));
|
||||
value(1, "Passes"), value(0, "No score"), value(-1, "Failed"));
|
||||
LabelType custom1 = category("Custom1",
|
||||
value(1, "Positive"), value(0, "No score"), value(-1, "Negative"));
|
||||
LabelType custom2 = category("Custom2",
|
||||
value(1, "Positive"), value(0, "No score"), value(-1, "Negative"));
|
||||
ProjectConfig cfg = projectCache.checkedGet(project).getConfig();
|
||||
cfg.getLabelSections().put(verified.getName(), verified);
|
||||
cfg.getLabelSections().put(custom1.getName(), verified);
|
||||
cfg.getLabelSections().put(custom2.getName(), verified);
|
||||
cfg.getLabelSections().put(custom1.getName(), custom1);
|
||||
cfg.getLabelSections().put(custom2.getName(), custom2);
|
||||
String heads = "refs/heads/*";
|
||||
AccountGroup.UUID anon =
|
||||
SystemGroupBackend.getGroup(ANONYMOUS_USERS).getUUID();
|
||||
|
@ -62,7 +62,7 @@
|
||||
</mailingLists>
|
||||
|
||||
<issueManagement>
|
||||
<url>http://code.google.com/p/gerrit/issues/list</url>
|
||||
<system>Google Code Issue Tracker</system>
|
||||
<url>https://bugs.chromium.org/p/gerrit/issues/list</url>
|
||||
<system>Gerrit Issue Tracker</system>
|
||||
</issueManagement>
|
||||
</project>
|
||||
|
@ -62,7 +62,7 @@
|
||||
</mailingLists>
|
||||
|
||||
<issueManagement>
|
||||
<url>http://code.google.com/p/gerrit/issues/list</url>
|
||||
<system>Google Code Issue Tracker</system>
|
||||
<url>https://bugs.chromium.org/p/gerrit/issues/list</url>
|
||||
<system>Gerrit Issue Tracker</system>
|
||||
</issueManagement>
|
||||
</project>
|
||||
|
@ -102,7 +102,7 @@ limitations under the License.
|
||||
</mailingLists>
|
||||
|
||||
<issueManagement>
|
||||
<url>http://code.google.com/p/gerrit/issues/list</url>
|
||||
<system>Google Code Issue Tracker</system>
|
||||
<url>https://bugs.chromium.org/p/gerrit/issues/list</url>
|
||||
<system>Gerrit Issue Tracker</system>
|
||||
</issueManagement>
|
||||
</project>
|
||||
|
@ -102,7 +102,7 @@ limitations under the License.
|
||||
</mailingLists>
|
||||
|
||||
<issueManagement>
|
||||
<url>http://code.google.com/p/gerrit/issues/list</url>
|
||||
<system>Google Code Issue Tracker</system>
|
||||
<url>https://bugs.chromium.org/p/gerrit/issues/list</url>
|
||||
<system>Gerrit Issue Tracker</system>
|
||||
</issueManagement>
|
||||
</project>
|
||||
|
@ -62,7 +62,7 @@
|
||||
</mailingLists>
|
||||
|
||||
<issueManagement>
|
||||
<url>http://code.google.com/p/gerrit/issues/list</url>
|
||||
<system>Google Code Issue Tracker</system>
|
||||
<url>https://bugs.chromium.org/p/gerrit/issues/list</url>
|
||||
<system>Gerrit Issue Tracker</system>
|
||||
</issueManagement>
|
||||
</project>
|
||||
|
@ -102,7 +102,7 @@ limitations under the License.
|
||||
</mailingLists>
|
||||
|
||||
<issueManagement>
|
||||
<url>http://code.google.com/p/gerrit/issues/list</url>
|
||||
<system>Google Code Issue Tracker</system>
|
||||
<url>https://bugs.chromium.org/p/gerrit/issues/list</url>
|
||||
<system>Gerrit Issue Tracker</system>
|
||||
</issueManagement>
|
||||
</project>
|
||||
|
@ -18,7 +18,6 @@ import static org.eclipse.jgit.lib.Constants.R_REFS;
|
||||
import static org.eclipse.jgit.lib.Constants.R_TAGS;
|
||||
|
||||
import com.google.common.base.Strings;
|
||||
import com.google.gerrit.common.ChangeHooks;
|
||||
import com.google.gerrit.common.TimeUtil;
|
||||
import com.google.gerrit.common.data.Permission;
|
||||
import com.google.gerrit.extensions.api.projects.TagInfo;
|
||||
@ -29,7 +28,6 @@ import com.google.gerrit.extensions.restapi.MethodNotAllowedException;
|
||||
import com.google.gerrit.extensions.restapi.ResourceConflictException;
|
||||
import com.google.gerrit.extensions.restapi.RestApiException;
|
||||
import com.google.gerrit.extensions.restapi.RestModifyView;
|
||||
import com.google.gerrit.reviewdb.client.Branch;
|
||||
import com.google.gerrit.server.IdentifiedUser;
|
||||
import com.google.gerrit.server.extensions.events.GitReferenceUpdated;
|
||||
import com.google.gerrit.server.git.GitRepositoryManager;
|
||||
@ -65,7 +63,6 @@ public class CreateTag implements RestModifyView<ProjectResource, TagInput> {
|
||||
private final GitRepositoryManager repoManager;
|
||||
private final TagCache tagCache;
|
||||
private final GitReferenceUpdated referenceUpdated;
|
||||
private final ChangeHooks hooks;
|
||||
private String ref;
|
||||
|
||||
@Inject
|
||||
@ -73,13 +70,11 @@ public class CreateTag implements RestModifyView<ProjectResource, TagInput> {
|
||||
GitRepositoryManager repoManager,
|
||||
TagCache tagCache,
|
||||
GitReferenceUpdated referenceUpdated,
|
||||
ChangeHooks hooks,
|
||||
@Assisted String ref) {
|
||||
this.identifiedUser = identifiedUser;
|
||||
this.repoManager = repoManager;
|
||||
this.tagCache = tagCache;
|
||||
this.referenceUpdated = referenceUpdated;
|
||||
this.hooks = hooks;
|
||||
this.ref = ref;
|
||||
}
|
||||
|
||||
@ -150,9 +145,6 @@ public class CreateTag implements RestModifyView<ProjectResource, TagInput> {
|
||||
referenceUpdated.fire(resource.getNameKey(), ref,
|
||||
ObjectId.zeroId(), result.getObjectId(),
|
||||
identifiedUser.get().getAccount());
|
||||
hooks.doRefUpdatedHook(new Branch.NameKey(resource.getNameKey(), ref),
|
||||
ObjectId.zeroId(), result.getObjectId(),
|
||||
identifiedUser.get().getAccount());
|
||||
try (RevWalk w = new RevWalk(repo)) {
|
||||
return ListTags.createTagInfo(result, w);
|
||||
}
|
||||
|
@ -17,10 +17,6 @@ package com.google.gerrit.testutil;
|
||||
import static com.google.common.base.Preconditions.checkState;
|
||||
import static java.util.concurrent.TimeUnit.MILLISECONDS;
|
||||
|
||||
import org.eclipse.jgit.lib.Config;
|
||||
import org.eclipse.jgit.storage.file.FileBasedConfig;
|
||||
import org.eclipse.jgit.util.FS;
|
||||
import org.eclipse.jgit.util.SystemReader;
|
||||
import org.joda.time.DateTime;
|
||||
import org.joda.time.DateTimeUtils;
|
||||
import org.joda.time.DateTimeUtils.MillisProvider;
|
||||
@ -67,57 +63,11 @@ public class TestTimeUtil {
|
||||
return clockMs.getAndAdd(clockStepMs);
|
||||
}
|
||||
});
|
||||
|
||||
SystemReader.setInstance(null);
|
||||
final SystemReader defaultReader = SystemReader.getInstance();
|
||||
SystemReader r = new SystemReader() {
|
||||
@Override
|
||||
public String getHostname() {
|
||||
return defaultReader.getHostname();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getenv(String variable) {
|
||||
return defaultReader.getenv(variable);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getProperty(String key) {
|
||||
return defaultReader.getProperty(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FileBasedConfig openUserConfig(Config parent, FS fs) {
|
||||
return defaultReader.openUserConfig(parent, fs);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FileBasedConfig openSystemConfig(Config parent, FS fs) {
|
||||
return defaultReader.openSystemConfig(parent, fs);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getCurrentTime() {
|
||||
return clockMs.getAndAdd(clockStepMs);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getTimezone(long when) {
|
||||
return defaultReader.getTimezone(when);
|
||||
}
|
||||
};
|
||||
SystemReader.setInstance(r);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset the clock to use the actual system clock.
|
||||
* <p>
|
||||
* As a side effect, resets the {@link SystemReader} to the original default
|
||||
* instance.
|
||||
*/
|
||||
/** Reset the clock to use the actual system clock. */
|
||||
public static synchronized void useSystemTime() {
|
||||
DateTimeUtils.setCurrentMillisSystem();
|
||||
SystemReader.setInstance(null);
|
||||
}
|
||||
|
||||
private TestTimeUtil() {
|
||||
|
@ -62,7 +62,7 @@
|
||||
</mailingLists>
|
||||
|
||||
<issueManagement>
|
||||
<url>http://code.google.com/p/gerrit/issues/list</url>
|
||||
<system>Google Code Issue Tracker</system>
|
||||
<url>https://bugs.chromium.org/p/gerrit/issues/list</url>
|
||||
<system>Gerrit Issue Tracker</system>
|
||||
</issueManagement>
|
||||
</project>
|
||||
|
Loading…
Reference in New Issue
Block a user