Index: ensure_dependencies.py |
diff --git a/ensure_dependencies.py b/ensure_dependencies.py |
index def9a7e9803cf29d8f8f70d644c599981b206163..f664abb991451b7b14a7411b4976fbad386ad7ec 100755 |
--- a/ensure_dependencies.py |
+++ b/ensure_dependencies.py |
@@ -240,6 +240,14 @@ def update_repo(target, revisions): |
return |
resolved_revision = repo_types[type].get_revision_id(target, revision) |
+ current_revision = repo_types[type].get_revision_id(target) |
+ |
+ if (resolved_revision != current_revision and |
Sebastian Noack
2015/05/07 13:17:19
I think the code structure below below can be simp
kzar
2015/05/07 13:44:29
Done.
|
+ os.environ.get("SKIP_ENSURE_DEPENDENCIES", "").lower() not in ("", "0", "false")): |
Sebastian Noack
2015/05/07 13:17:19
We agreed on SKIP_DEPENDENCY_UPDATES rather than S
kzar
2015/05/07 13:44:29
Done.
|
+ logging.warning("SKIP_ENSURE_DEPENDENCIES environment variable set, " |
+ "%s not checked out to %s" % (target, revision)) |
+ return |
+ |
if not resolved_revision: |
logging.info("Revision %s is unknown, downloading remote changes" % revision) |
repo_types[type].pull(target) |
@@ -247,7 +255,6 @@ def update_repo(target, revisions): |
if not resolved_revision: |
raise Exception("Failed to resolve revision %s" % revision) |
- current_revision = repo_types[type].get_revision_id(target) |
if resolved_revision != current_revision: |
logging.info("Updating repository %s to revision %s" % (target, resolved_revision)) |
repo_types[type].update(target, resolved_revision) |