Index: gclient.py |
diff --git a/gclient.py b/gclient.py |
index 8d67b5a9eb1a3c4cc5d88ce297e9b32bd7390065..c45d73157e6184e398346331b1ba878def75b175 100755 |
--- a/gclient.py |
+++ b/gclient.py |
@@ -535,12 +535,22 @@ class Dependency(gclient_utils.WorkItem, DependencySettings): |
deps_content = None |
use_strict = False |
- filepath = os.path.join(self.root.root_dir, self.name, self.deps_file) |
- if not os.path.isfile(filepath): |
+ |
+ # First try to locate the configured deps file. If it's missing, fallback |
+ # to DEPS. |
+ deps_files = set([self.deps_file, 'DEPS']) |
iannucci
2014/07/01 22:13:58
yeah but order is still important and set() orderi
|
+ for deps_file in deps_files: |
+ filepath = os.path.join(self.root.root_dir, self.name, deps_file) |
+ if os.path.isfile(filepath): |
+ logging.info( |
+ 'ParseDepsFile(%s): %s file found at %s' % ( |
+ self.name, deps_file, filepath)) |
+ break |
logging.info( |
'ParseDepsFile(%s): No %s file found at %s' % ( |
- self.name, self.deps_file, filepath)) |
- else: |
+ self.name, deps_file, filepath)) |
+ |
+ if os.path.isfile(filepath): |
deps_content = gclient_utils.FileRead(filepath) |
logging.debug('ParseDepsFile(%s) read:\n%s' % (self.name, deps_content)) |
use_strict = 'use strict' in deps_content.splitlines()[0] |