From 785142189ea8a2bd760649ae0e28a48c58d51330 Mon Sep 17 00:00:00 2001 From: "iannucci@chromium.org" Date: Wed, 20 Aug 2014 23:08:00 +0000 Subject: [PATCH] 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 --- gclient_scm.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gclient_scm.py b/gclient_scm.py index acebb0996..0dabd265e 100644 --- a/gclient_scm.py +++ b/gclient_scm.py @@ -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)