Commit 58e31a89 authored by Andrii Shyshkalov's avatar Andrii Shyshkalov Committed by Commit Bot

Revert "Revert "bot_update: speculative fix for gerrit patch application failure.""

This reverts commit 2074a4b7.

Reason for revert: this is a reland, because it didn't actually break Angle.

Original change's description:
> Revert "bot_update: speculative fix for gerrit patch application failure."
> 
> This reverts commit 2b4da122.
> 
> Reason for revert: likely broke Angle http://crbug.com/692140
> 
> Original change's description:
> > bot_update: speculative fix for gerrit patch application failure.
> > 
> > bot_update doesn't properly cleanup git index state from unmerged paths,
> > which are likely if Rietveld patches were failed to be applied in prior
> > runs in the same checkout dir.
> > 
> > R=​machenbach@chromium.org
> > BUG=692067
> > 
> > Change-Id: I8fd326caefce8623731697a368cbad3159405257
> > Reviewed-on: https://chromium-review.googlesource.com/442426
> > Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
> > Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> > 
> 
> TBR=machenbach@chromium.org,tandrii@chromium.org,chromium-reviews@chromium.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=692067,692140
> 
> Change-Id: Iec808f28f3a0af99914a279536bb20a8975e02ba
> Reviewed-on: https://chromium-review.googlesource.com/442485
> Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
> Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
> 

TBR=machenbach@chromium.org,tandrii@chromium.org,chromium-reviews@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=692067,692140

Change-Id: I4b4b66fa74f11e73e066602a9e7efabd5a29a974
Reviewed-on: https://chromium-review.googlesource.com/443345
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: 's avatarAndrii Shyshkalov <tandrii@chromium.org>
parent 3c2e098b
......@@ -661,6 +661,12 @@ def apply_gerrit_ref(gerrit_repo, gerrit_ref, root, gerrit_reset,
print '===Applying gerrit ref==='
print 'Repo is %r @ %r, ref is %r, root is %r' % (
gerrit_repo, base_rev, gerrit_ref, root)
# TODO(tandrii): move the fix below to common rietveld/gerrit codepath.
# Speculative fix: prior bot_update run with Rietveld patch may leave git
# index with unmerged paths. bot_update calls 'checkout --force xyz' thus
# ignoring such paths, but potentially never cleaning them up. The following
# command will do so. See http://crbug.com/692067.
git('reset', '--hard', cwd=root)
try:
git('retry', 'fetch', gerrit_repo, gerrit_ref, cwd=root, tries=1)
git('checkout', 'FETCH_HEAD', cwd=root)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment