Cannot cherry-pick merged commit

Showing 1-3 of 3 messages
Cannot cherry-pick merged commit Luciano Carvalho 10/3/12 1:08 PM
Hi,

We have just upgraded our production server from 2.1.8 to 2.4.2 and now we are running into some issues while cherry-picking the "merge patch".
Notice that we are using "cherry-pick" as our submit method.

Let's use change # 483894 for example:
- Patch # 2 has been approved and submitted, then I wanted to cherry pick the merged commit into another branch.
- I ran the command below to get the ref for that change:
    $ ssh -n -p 29418 review-server gerrit query --current-patch-set "483894" | grep "ref: " | awk 'BEGIN { FS = ": " } ; { print $2 }'
    refs/changes/94/483894/3

When I run "git fetch origin refs/changes/94/483894/3" Gerrit returns:  fatal: Couldn't find remote ref refs/changes/94/483894/3

If I try it with /2 in the end, it works.


Another way to get to the same issue. Go to: http://review_server/#/c/483894  (remember, the change is merged)

Go to the download session, copy the cherry-pick command and paste it into the terminal:

    $ git fetch ssh://lscarval@review_server:29418/platform/some-repo refs/changes/94/483894/3 && git cherry-pick FETCH_HEAD
    fatal: Couldn't find remote ref refs/changes/94/483894/3


Has this ever been reported?  Is there a quick fix for it?

Thanks,

Luciano.

Re: Cannot cherry-pick merged commit Edwin Kempin 10/4/12 10:54 PM


2012/10/4 Luciano Carvalho <lsca...@gmail.com>
Thanks Edwin.

I'll build it with the fix.
It's a bit bad that this fix depends on the MergeOp refactoring.
I've now redone the fix for stable-2.5 [1]. I think it makes sense to have this fixed in Gerrit 2.5.

[1] https://gerrit-review.googlesource.com/38220

 

On Thu, Oct 4, 2012 at 2:19 AM, Edwin Kempin <edwin....@gmail.com> wrote:


2012/10/3 Luciano Carvalho <lsca...@gmail.com>
Yes, this is a known issue [1]. A bug-fix is available in review [2].

[1] https://code.google.com/p/gerrit/issues/detail?id=1548
[2] https://gerrit-review.googlesource.com/37684
 

Thanks,

Luciano.

--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en



Re: Cannot cherry-pick merged commit Brad Larson 10/5/12 12:01 PM


On Friday, October 5, 2012 12:54:35 AM UTC-5, Edwin Kempin wrote:


2012/10/4 Luciano Carvalho <lsca...@gmail.com>
Thanks Edwin.

I'll build it with the fix.
It's a bit bad that this fix depends on the MergeOp refactoring.
I've now redone the fix for stable-2.5 [1]. I think it makes sense to have this fixed in Gerrit 2.5.

I agree, it'd be nice to get this fixed in 2.5.