Merge branch 'stable-2.8'
* stable-2.8: Update 2.8.2 release notes Bump version to 2.8.2 in plugin API and archetypes Prevent duplicate commits in same project when uploading to refs/changes/n Bump GERRIT_VERSION to 2.8.2 Update 2.8.2 release notes PostReview: update and insert comments/approvals in a single step Conflicts: VERSION gerrit-plugin-archetype/pom.xml gerrit-plugin-gwt-archetype/pom.xml gerrit-plugin-gwtui/pom.xml gerrit-plugin-js-archetype/pom.xml gerrit-server/src/main/java/com/google/gerrit/server/change/PostReview.java gerrit-server/src/main/java/com/google/gerrit/server/git/ReceiveCommits.java Change-Id: I7a611d4f9c16b8d5f3abdcd8228fca0b636d792c
This commit is contained in:
commit
c2ba9a65a7
@ -1,9 +1,18 @@
|
|||||||
= commit already exists
|
= commit already exists
|
||||||
|
|
||||||
With this error message Gerrit rejects to push a commit to an
|
With "commit already exists (as current patchset)" or
|
||||||
existing change via `refs/changes/n` if the commit was already
|
"commit already exists (in the change)" error message
|
||||||
successfully pushed to the change. In this case there is no
|
Gerrit rejects to push a commit to an existing change via
|
||||||
new commit and consequently there is nothing for Gerrit to do.
|
`refs/changes/n` if the commit was already successfully
|
||||||
|
pushed to the change.
|
||||||
|
|
||||||
|
With "commit already exists (in the project)" error message
|
||||||
|
Gerrit rejects to push a commit to an existing change via
|
||||||
|
`refs/changes/n` if the commit was already successfully
|
||||||
|
pushed to a change in project scope.
|
||||||
|
|
||||||
|
In any above case there is no new commit and consequently
|
||||||
|
there is nothing for Gerrit to do.
|
||||||
|
|
||||||
For further information about how to resolve this error, please
|
For further information about how to resolve this error, please
|
||||||
refer to link:error-no-new-changes.html[no new changes].
|
refer to link:error-no-new-changes.html[no new changes].
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
= no new changes
|
= no new changes
|
||||||
|
|
||||||
With this error message Gerrit rejects to push a commit if the pushed
|
With this error message Gerrit rejects to push a commit if the pushed
|
||||||
commit was already successfully pushed to Gerrit. In this case there
|
commit was already successfully pushed to Gerrit in project scope.
|
||||||
is no new change and consequently there is nothing for Gerrit to do.
|
In this case there is no new change and consequently there is nothing
|
||||||
|
for Gerrit to do.
|
||||||
|
|
||||||
If your push is failing with this error message, you normally
|
If your push is failing with this error message, you normally
|
||||||
don't have to do anything since the commit was already successfully
|
don't have to do anything since the commit was already successfully
|
||||||
@ -30,7 +31,7 @@ means:
|
|||||||
. you cannot reset a change to an old patch set by pushing the old
|
. you cannot reset a change to an old patch set by pushing the old
|
||||||
commit for this change again
|
commit for this change again
|
||||||
. if a commit was pushed to one branch you cannot push this commit
|
. if a commit was pushed to one branch you cannot push this commit
|
||||||
to another branch
|
to another branch in project scope.
|
||||||
. if a commit was pushed directly to a branch (without going through
|
. if a commit was pushed directly to a branch (without going through
|
||||||
code review) you cannot push this commit once again for code
|
code review) you cannot push this commit once again for code
|
||||||
review (please note that in this case searching by the commit ID
|
review (please note that in this case searching by the commit ID
|
||||||
@ -38,11 +39,11 @@ means:
|
|||||||
|
|
||||||
If you need to re-push a commit you may rewrite this commit by
|
If you need to re-push a commit you may rewrite this commit by
|
||||||
link:http://www.kernel.org/pub/software/scm/git/docs/git-commit.html[amending] it or doing an interactive link:http://www.kernel.org/pub/software/scm/git/docs/git-rebase.html[git rebase]. By rewriting the
|
link:http://www.kernel.org/pub/software/scm/git/docs/git-commit.html[amending] it or doing an interactive link:http://www.kernel.org/pub/software/scm/git/docs/git-rebase.html[git rebase]. By rewriting the
|
||||||
commit you actually create a new commit (with a new commit ID) which
|
commit you actually create a new commit (with a new commit ID in
|
||||||
can then be pushed to Gerrit. If the old commit contains a Change-Id
|
project scope) which can then be pushed to Gerrit. If the old commit
|
||||||
in the commit message you also need to replace it with a new
|
contains a Change-Id in the commit message you also need to replace
|
||||||
Change-Id (case 1. and 3. above), otherwise the push will fail with
|
it with a new Change-Id (case 1. and 3. above), otherwise the push
|
||||||
another error message.
|
will fail with another error message.
|
||||||
|
|
||||||
|
|
||||||
GERRIT
|
GERRIT
|
||||||
|
@ -124,6 +124,19 @@ Handle null commits when updating submodules.
|
|||||||
In some edge cases it was possible that a null commit would exist, and this
|
In some edge cases it was possible that a null commit would exist, and this
|
||||||
caused a crash when updating submodules.
|
caused a crash when updating submodules.
|
||||||
|
|
||||||
|
* Update and insert comments/approvals in a single step.
|
||||||
|
+
|
||||||
|
When a review includes both new label scores and updates to existing label
|
||||||
|
scores, use `upsert` to record them all at the same time, rather than in
|
||||||
|
separate `update` and `insert` operations.
|
||||||
|
|
||||||
|
* link:https://code.google.com/p/gerrit/issues/detail?id=2374[Issue 2374]:
|
||||||
|
Prevent duplicate commits in same project when uploading to `refs/changes/n`.
|
||||||
|
+
|
||||||
|
Under certain circumstances, when pushing to `refs/changes/n`, the same
|
||||||
|
commit could be pushed onto multiple changes even if the changes were on the
|
||||||
|
same branch.
|
||||||
|
|
||||||
* Remove dependency on joda time library in gerrit launcher.
|
* Remove dependency on joda time library in gerrit launcher.
|
||||||
+
|
+
|
||||||
The joda time library was being unnecessarily packaged in the root of
|
The joda time library was being unnecessarily packaged in the root of
|
||||||
|
@ -1780,7 +1780,7 @@ public class ReceiveCommits {
|
|||||||
if (newCommit == priorCommit) {
|
if (newCommit == priorCommit) {
|
||||||
// Ignore requests to make the change its current state.
|
// Ignore requests to make the change its current state.
|
||||||
skip = true;
|
skip = true;
|
||||||
reject(inputCommand, "commit already exists");
|
reject(inputCommand, "commit already exists (as current patchset)");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1792,10 +1792,18 @@ public class ReceiveCommits {
|
|||||||
reject(inputCommand, "change " + ontoChange + " closed");
|
reject(inputCommand, "change " + ontoChange + " closed");
|
||||||
return false;
|
return false;
|
||||||
} else if (revisions.containsKey(newCommit)) {
|
} else if (revisions.containsKey(newCommit)) {
|
||||||
reject(inputCommand, "commit already exists");
|
reject(inputCommand, "commit already exists (in the change)");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (final Ref r : rp.getRepository().getRefDatabase()
|
||||||
|
.getRefs("refs/changes").values()) {
|
||||||
|
if (r.getObjectId().equals(inputCommand.getNewId())) {
|
||||||
|
reject(inputCommand, "commit already exists (in the project)");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (RevCommit prior : revisions.keySet()) {
|
for (RevCommit prior : revisions.keySet()) {
|
||||||
// Don't allow a change to directly depend upon itself. This is a
|
// Don't allow a change to directly depend upon itself. This is a
|
||||||
// very common error due to users making a new commit rather than
|
// very common error due to users making a new commit rather than
|
||||||
|
Loading…
x
Reference in New Issue
Block a user