Gerrit show path conflict but no conflict during rebase

913 views
Skip to first unread message

Eric Tsai

unread,
Jul 30, 2009, 12:29:38 AM7/30/09
to Repo and Gerrit Discussion
After using Gerrit for several months, many users have met this
problem.
Gerrit shows "Your change could not be merged due to a path conflict.
Please merge (or rebase) the change locally and upload the resolution
for review.".
But when a user do "repo sync", the user's commit can be rebased
without any conflict. Then the user just need to upload rebased commit
for replacement.

Shouldn't Gerrit do this automatically? Gerrit says it's a problem,
but "repo sync" says it's OK. This confuses the user.

Jean-Baptiste Queru

unread,
Jul 30, 2009, 9:03:47 AM7/30/09
to repo-d...@googlegroups.com
Gerrit is currently very conservative and refuses to submit a change
if another user touched a same file in the meantime, even if the two
changes done in that file don't conflict with one another.

For people used to perforce, this is fundamentally the same behavior
(where p4 submit refuses to submit if #have is different from #head
for any of the files being submitted). The unfortunate difference here
is that the git/Gerrit-based workflow can ripple down into a lot more
work than a plain "p4 sync <affected file>; p4 resolve -am ; p4
submit".

I'd like to have Gerrit offer more flexibility here (i.e. show the
diffs on both sides and let the submitter submit anyway, or only
report path conflicts if the lines being changed are less than
20-or-so lines apart), so that in many circumstances there'd be no
need to rebase, as that rebase really hurts the workflow.

JBQ
--
Jean-Baptiste M. "JBQ" Queru
Software Engineer, Android Open-Source Project, Google.

Questions sent directly to me that have no reason for being private
will likely get ignored or forwarded to a public forum with no further
warning.
Reply all
Reply to author
Forward
0 new messages