Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1689)

Unified Diff: tools/make_links.py

Issue 1272963004: Add error and message to tools/make_links.py for duplicate packages. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address comments. Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/make_links.py
diff --git a/tools/make_links.py b/tools/make_links.py
index 5599e99880a363d5888dfe766282a87f64675ae3..58bc9cb2df9a8ed24ec5f97dd30d1b29902c3ac9 100644
--- a/tools/make_links.py
+++ b/tools/make_links.py
@@ -28,6 +28,9 @@ import subprocess
import sys
import utils
+# Useful messages when we find orphaned checkouts.
+old_directories = {'package_config':
+ 'Please remove third_party/pkg/package_config.'}
def get_options():
result = optparse.OptionParser()
@@ -86,6 +89,7 @@ def main(argv):
os.remove(full_link)
else:
os.makedirs(target)
+ linked_names = {};
for source in args[1:]:
# Assume the source directory is named ".../NAME/lib".
split = source.split(':')
@@ -98,6 +102,15 @@ def main(argv):
# Remove any additional path components preceding NAME, if one wasn't
# specified explicitly.
if not name: (_, name) = os.path.split(path)
+ # We have an issue with left-behind checkouts in third_party/pkg and
+ # third_party/pkg_tested when we move entries in DEPS. This reports them.
+ if name in linked_names:
+ print 'Duplicate directory %s is linked to both %s and %s.' % (
+ name, linked_names[name], path)
+ if name in old_directories:
+ print old_directories[name]
+ return 1
+ linked_names[name] = path
orig_source = source
if utils.GuessOS() == 'win32':
source = os.path.relpath(source)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698