Change Cannot Merge

498 views
Skip to first unread message

mani chandel

unread,
Nov 20, 2013, 4:10:42 AM11/20/13
to repo-d...@googlegroups.com
Hello All,

I have posted a change in gerrit - https://gerrit-review.googlesource.com/#/c/51882/
But is it showing the status "Cannot merge" although change has got a -1 and we are working upon correcting it.
Can you please let me know what is the  meaning of Cannot merge and how can we rectify it in the change?

Thanks,
Mani

Shawn Pearce

unread,
Nov 20, 2013, 4:19:00 AM11/20/13
to mani chandel, repo-discuss
Hmm, maybe "Cannot Merge" is the wrong text to use. It generally means
there is a merge conflict that must be resolved by hand. A file your
change modifies was already modified by someone else and Gerrit cannot
merge the two edits automatically.

mani chandel

unread,
Nov 20, 2013, 4:23:01 AM11/20/13
to repo-d...@googlegroups.com, mani chandel
Thanks Shawn!
Does that mean if I upload a new patch which was prepared from a fresh clone of master then it will be resolved ?
Or I need to check something else? As it does not mention which files have conflict.

Regards,
Mani

Magnus Bäck

unread,
Nov 20, 2013, 8:49:22 AM11/20/13
to repo-d...@googlegroups.com
On Wednesday, November 20, 2013 at 04:23 EST,
mani chandel <mani.c...@gmail.com> wrote:

> On Wednesday, 20 November 2013 11:19:00 UTC+2, Shawn Pearce wrote:
>
> > Hmm, maybe "Cannot Merge" is the wrong text to use. It generally
> > means there is a merge conflict that must be resolved by hand.
> > A file your change modifies was already modified by someone else
> > and Gerrit cannot merge the two edits automatically.
>
> Does that mean if I upload a new patch which was prepared from a fresh
> clone of master then it will be resolved ?

You don't have to clone the git again, but yes. The easiest way
for you is probably

git pull --rebase origin

which will fetch updates from the upstream server and rebase the
commit(s) you've made on the currently checked-out branch on top
of the tip of the upstream branch. There may be conflicts that Git
can't resolve automatically, in which case you'll have to step in
and help out. If your commit message is tagged with a Change-Id
line you can just push the resulting commits and Gerrit will figure
out that it's a new patch set for an existing change.

> Or I need to check something else? As it does not mention which files
> have conflict.

Which files are causing the conflict probably isn't so useful at this
point; either way you have to rebase your commit.

--
Magnus Bäck
ba...@google.com

mani chandel

unread,
Nov 25, 2013, 4:06:19 AM11/25/13
to repo-d...@googlegroups.com
Thanks Magnus for the useful information :)
Reply all
Reply to author
Forward
0 new messages