Open GoogleCodeExporter opened 9 years ago
I think this might be related to this discussion:
http://groups.google.com/group/repo-discuss/browse_thread/thread/8aeef7d09964fd9
b/5d7d519166f8ed5b
I think push to rfes/for/master would create a new branch and cause the changes
to get merged, just as happened here. But I can't explain why the wayward
branch did not show up in the repo.
Original comment by phil.hord
on 5 Mar 2011 at 11:53
I've confirmed this is a duplicate of #635. I suspect the OrmDuplicateKey
error is caused by two changesets having the same changeid and the DB not
handling it. But the main problem is repeatable and is the same as bug #635.
Having said that, I see there has been some improvement on this problem and
#635 has been closed. But the problem covered here still exists:
# Developer wants a patch reviewed
git push origin HEAD:refs/for/master
# Developer (intentionally or not) pushes the same commit to a public branch
git push origin HEAD:refs/heads/share/public
# At this point the original patchset is marked as merged
Should this be closed as a dup?
I still want the original issue addressed (also covered in #635). Should #635
be re-opened, a new bug created, or this one cleaned up?
Demo:
{
Push commit for review.
Check status of our commit; see that it is "Open"
Push commit to share/public branch
Check status of our commit; see that it is "Merged"
}
echo foo >> foo && git add foo && git commit -mFoo
[detached HEAD ac40f2b] Foo
1 files changed, 1 insertions(+), 0 deletions(-)
CID=$(git log -1 | grep Change-Id: |cut -d: -f2)
echo $CID
I4ca9183e1225ed94e355b2f62b7e255952df2045
git push origin HEAD:refs/for/master
Counting objects: 5, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 291 bytes, done.
Total 3 (delta 1), reused 0 (delta 0)
remote: Resolving deltas: 0% (0/1)
remote:
remote: New Changes:
remote: https://gerrit.myco.com/gerrit/759
remote:
To gerrit:testing
* [new branch] HEAD -> refs/for/master
git
ssh gerrit gerrit query --current-patch-set ${CID}
change I4ca9183e1225ed94e355b2f62b7e255952df2045
project: testing
branch: master
id: I4ca9183e1225ed94e355b2f62b7e255952df2045
number: 759
subject: Foo
owner:
name: Phil Hord
email: hordp@cisco.com
url: https://gerrit.myco.com/gerrit/759
lastUpdated: 2011-11-14 14:54:40 EST
sortKey: 00190b8a000002f7
open: true
status: NEW
currentPatchSet:
number: 1
revision: ac40f2b66323aabd8d62de9d758aadb79e051853
ref: refs/changes/59/759/1
uploader:
name: Phil Hord
email: hordp@cisco.com
type: stats
rowCount: 1
runTimeMilliseconds: 4
git push origin HEAD:refs/heads/share/public
Total 0 (delta 0), reused 0 (delta 0)
To gerrit:testing
25ea87d..ac40f2b HEAD -> share/public
ssh gerrit gerrit query --current-patch-set ${CID}
change I4ca9183e1225ed94e355b2f62b7e255952df2045
project: testing
branch: master
id: I4ca9183e1225ed94e355b2f62b7e255952df2045
number: 759
subject: Foo
owner:
name: Phil Hord
email: hordp@cisco.com
url: https://gerrit.myco.com/gerrit/759
lastUpdated: 2011-11-14 14:55:44 EST
sortKey: 00190b8b000002f7
open: false
status: MERGED
currentPatchSet:
number: 1
revision: ac40f2b66323aabd8d62de9d758aadb79e051853
ref: refs/changes/59/759/1
uploader:
name: Phil Hord
email: hordp@cisco.com
type: stats
rowCount: 1
runTimeMilliseconds: 2
Original comment by phil.hord
on 14 Nov 2011 at 8:20
This is a dup of #1142, but #1142 is more focused and being addressed.
Original comment by phil.hord
on 17 Feb 2012 at 3:20
Can also happen the other way round, at gerrit.wikimedia.org we had one patch
which was marked open by the interface but had one depending change merged,
because it was in fact merged.
Original comment by nemow...@gmail.com
on 6 Feb 2014 at 8:27
Original issue reported on code.google.com by
phil.hord
on 16 Feb 2011 at 1:30