[Lldb-commits] [lldb] r249705 - syncsource.py: a specific dir's source_excludes may now include the special entry "<no-defaults>".

Todd Fiala via lldb-commits lldb-commits at lists.llvm.org
Thu Oct 8 10:43:02 PDT 2015


Author: tfiala
Date: Thu Oct  8 12:43:02 2015
New Revision: 249705

URL: http://llvm.org/viewvc/llvm-project?rev=249705&view=rev
Log:
syncsource.py: a specific dir's source_excludes may now include the special entry "<no-defaults>".

The <no-defaults> special entry will prevent that specific directory's excludes from
receiving the global default source excludes.  This allows overriding the global default
in a specific instance, simplifying the syntax for that case.

Modified:
    lldb/trunk/utils/sync-source/syncsource.py

Modified: lldb/trunk/utils/sync-source/syncsource.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/utils/sync-source/syncsource.py?rev=249705&r1=249704&r2=249705&view=diff
==============================================================================
--- lldb/trunk/utils/sync-source/syncsource.py (original)
+++ lldb/trunk/utils/sync-source/syncsource.py Thu Oct  8 12:43:02 2015
@@ -203,9 +203,18 @@ def sync_configured_sources(options, con
         # If excludes are specified for this dir_id, then pass along
         # the excludes.  These are relative to the dir_id directory
         # source, and get passed along that way as well.
-        transfer_source_excludes = list(default_excludes)
+        transfer_source_excludes = []
+
+        # Add the source excludes for this dir.
+        skip_defaults = False
         if source_excludes and dir_key in source_excludes:
             transfer_source_excludes.extend(source_excludes[dir_key])
+            if "<no-defaults>" in source_excludes[dir_key]:
+                skip_defaults = True
+                transfer_source_excludes.remove("<no-defaults>")
+
+        if not skip_defaults and default_excludes is not None:
+            transfer_source_excludes.extend(list(default_excludes))
 
         # Build the destination-base-relative dest dir into which
         # we'll be syncing.  Relative directory defaults to the




More information about the lldb-commits mailing list