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 Wed, Jun 16, 2010 at 6:36 PM, Alex Blewitt <alex.blewitt@xxxxxxxxx> wrote:
> I'm not sure why I'm getting a failure to push to Gerrit, but when I try to push, it gives me:
>
> 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'
>
> The commit I'm trying to push is this one, which I included the 'Change-Id' from before (not sure if I'm supposed to re-use that one if it's already been merged?)
>
> commit d1edeb193a205d874640d63b56a7dc8883ba86ae
> Author: Alex Blewitt <alex.blewitt@xxxxxxxxx>
> Date:   Thu Jun 17 02:23:08 2010 +0100
>
>    Ensure that the http(s) clipboard selections aren't greedy
>
>    When capturing http:// or https:// from the clipboard, additionally
>    look for the tell-tale sign '.git' in the URL, which if present, will be
>    a giveaway that it's a Git URL. Otherwise, assume it's a webpage
>    and don't pre-fill the dialog automatically.
>
>    Bug: 315589
>    Change-Id: I2fd6f0d68b4908f938eb5b2df8cd4f99e674e74d
>    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.

> 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 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.

-- 
Shawn.


Back to the top