From 2074a4b78d8919cceeeab565ed2c9b46e5cfd795 Mon Sep 17 00:00:00 2001 From: Andrii Shyshkalov Date: Tue, 14 Feb 2017 18:27:01 +0000 Subject: [PATCH] Revert "bot_update: speculative fix for gerrit patch application failure." MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 2b4da1228f58c6da5c9c76da5076365ef4b81ff4. 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 > Reviewed-by: Michael Achenbach > 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 Reviewed-by: Andrii Shyshkalov --- recipe_modules/bot_update/resources/bot_update.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/recipe_modules/bot_update/resources/bot_update.py b/recipe_modules/bot_update/resources/bot_update.py index c6b12e686..2d9d87eef 100755 --- a/recipe_modules/bot_update/resources/bot_update.py +++ b/recipe_modules/bot_update/resources/bot_update.py @@ -659,12 +659,6 @@ 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)