sync_chrome: Don't sync twice when run with --reset.
This workaround is no longer needed.
BUG=chromium:470935
TEST=Release trybot run.
Change-Id: I0444f120ace3965a22632b0947c7ddb58ce210ca
Reviewed-on: https://chromium-review.googlesource.com/262646
Reviewed-by: David James <davidjames@chromium.org>
Commit-Queue: David James <davidjames@chromium.org>
Tested-by: David James <davidjames@chromium.org>
diff --git a/scripts/sync_chrome.py b/scripts/sync_chrome.py
index a9028f2..d01da26 100644
--- a/scripts/sync_chrome.py
+++ b/scripts/sync_chrome.py
@@ -6,7 +6,6 @@
from __future__ import print_function
-import functools
import os
from chromite.cbuildbot import constants
@@ -62,28 +61,6 @@
gclient.WriteConfigFile(gclient_path, options.chrome_root,
options.internal, options.version,
options.gclient_template, options.use_cache)
- sync_fn = functools.partial(
- gclient.Sync, gclient_path, options.chrome_root, reset=options.reset)
+ gclient.Sync(gclient_path, options.chrome_root, reset=options.reset)
- # Sync twice when run with --reset, which implies 'gclient sync -D'.
- #
- # There's a bug with 'gclient sync -D' that gets hit when the location of a
- # dependency checkout (in the DEPS file) is moved to a path that contains
- # (in a directory fashion) its old path. E.g., when Blink is moved from
- # Webkit/Source/ to Webkit/. When this happens, a 'gclient sync -D' will
- # blow away Webkit/Source/ after the sync, since it is no longer in the
- # DEPS file, leaving the Blink checkout missing a Source/ subdirectory.
- #
- # This bug also gets hit the other way around - E.g., if Blink moves from
- # Webkit/ to Webkit/Source/.
- #
- # To work around this, we sync twice, so that any directories deleted by
- # the first sync will be restored in the second.
- #
- # TODO(rcui): Remove this workaround when the bug is fixed in gclient, or
- # replace with a more sophisticated solution that syncs twice only when any
- # paths in the DEPS file cannot be found after initial sync.
- if options.reset:
- sync_fn()
- sync_fn()
return 0