Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [egit-dev] Pushing to Gerrit failed


On 17 Jun 2010, at 06:01, Shawn Pearce wrote:

On Wed, Jun 16, 2010 at 6:36 PM, Alex Blewitt <alex.blewitt@xxxxxxxxx> wrote:
apple:egit alex$ git push review
Counting objects: 21, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (7/7), done.
Writing objects: 100% (11/11), 1.01 KiB, done.
Total 11 (delta 6), reused 0 (delta 0)
To ssh://alblue@xxxxxxxxxxxxxxxx:29418/egit.git
 ! [remote rejected] HEAD -> refs/for/master (no new changes)
error: failed to push some refs to 'ssh://alblue@xxxxxxxxxxxxxxxx:29418/egit.git'
   Signed-off-by: Alex Blewitt <alex.blewitt@xxxxxxxxx>

Yea, you can't reuse a Change-Id.  Once its been marked as merged by
Gerrit (and that change merged on June 4th if you look at its page),
that change is conceptually over and a new change has to be started.

That seems reasonable, but is there any way we can get that message back to the user in the push? All I see is here that 'remote rejected' which doesn't give much of an indication that that is the problem. If it is, let me know and I'll file a bug on Gerrit.

In any case, if I remove the Change-Id then it got through to Gerrit. Is this a case of user error, or is it expected that if someone pushes a change with a Change-Id that has already been merged, that it will fail?

Right, by removing the Change-Id Gerrit was forced to create a new one
on the fly for you, and was then able to accept your commit as a new
change.

I suppose it wouldn't make sense to just create a new one anyway because then the commit message would be out, right? 

I abandoned the change that I did push (http://egit.eclipse.org/r/883) and will plan to push it again during a live demo of EGit and Gerrit as part of the London Eclipse DemoCamp tomorrow.

That commit SHA-1 is also now known to Gerrit.  You'll need to at
least amend it to force a new SHA-1 (by virtue of having a new
committer timestamp) to be created if you want to "reuse" that same
commit.

OK, thanks for letting me know. I'll be doing the talk sometime around 18:30-19:30 London time, demo'ing EGit - probably will be doing the push to review around 19:00 or so. If someone sees a simple review request come in like the one above (http://egit.eclipse.org/r/883) and is able to approve it on the fly, it would be a nice way of demonstrating the power of Gerrit :-) 

Alex

Back to the top