Commit 78514218 authored by iannucci@chromium.org's avatar iannucci@chromium.org

Only check for clean repos when not (--force or --reset).

This allows cache_dir to be enabled on bots when the individual repo path has
changes (like android_tools, which has a bunch of generated, non-ignored .h
files)

R=agable@chromium.org, szager@chromium.org
BUG=

Review URL: https://codereview.chromium.org/488273003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@290943 0039d316-1c4b-4281-b951-d872f2087c98
parent 3ce636bc
......@@ -426,8 +426,9 @@ class GitWrapper(SCMWrapper):
['git', 'config', 'remote.%s.gclient-auto-fix-url' % self.remote],
cwd=self.checkout_path).strip() != 'False'):
self.Print('_____ switching %s to a new upstream' % self.relpath)
# Make sure it's clean
self._CheckClean(rev_str)
if not (options.force or options.reset):
# Make sure it's clean
self._CheckClean(rev_str)
# Switch over to the new upstream
self._Run(['remote', 'set-url', self.remote, url], options)
self._FetchAndReset(revision, file_list, options)
......
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