<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I've recommitted with a bunch of fixes:<div class=""><br class=""></div><div class=""><div class="">Sending        INSTALL.txt</div><div class="">Sending        scripts/Xcode/build-llvm.py</div><div class="">Adding         scripts/Xcode/repo.py</div><div class="">Adding         scripts/Xcode/repos</div><div class="">Adding         scripts/Xcode/repos/FALLBACK</div><div class="">Adding         scripts/Xcode/repos/svn-trunk.json</div><div class="">Transmitting file data .....done</div><div class="">Committing transaction...</div><div class="">Committed revision 295922.</div><div class=""><br class=""></div><div class="">Please let me know if you see any problems.</div><div class=""><br class=""></div><div class="">Sean</div><div class=""><br class=""></div><div><blockquote type="cite" class=""><div class="">On Feb 22, 2017, at 4:56 PM, Sean Callanan via lldb-commits <<a href="mailto:lldb-commits@lists.llvm.org" class="">lldb-commits@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=us-ascii" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I'll roll it back pending some fixes on my end.<div class="">Sorry for the break.<br class=""><div class=""><br class=""></div><div class="">Sean</div><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Feb 22, 2017, at 4:40 PM, Tim Hammerquist <<a href="mailto:penryu@gmail.com" class="">penryu@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hi Sean,<div class=""><br class=""></div><div class="">Looks like this is breaking builds in Green Dragon (and locally for me from master branch). Can you take a look at the failures here?</div><div class=""><br class=""></div><div class=""><a href="http://lab.llvm.org:8080/green/view/LLDB/job/lldb_build_test/26076/console" class="">http://lab.llvm.org:8080/green/view/LLDB/job/lldb_build_test/26076/console</a><br class=""></div><div class=""><br class=""></div><div class="">Thanks!</div><div class="">-Tim</div><div class=""><br class=""></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Wed, Feb 22, 2017 at 2:57 PM, Sean Callanan via lldb-commits <span dir="ltr" class=""><<a href="mailto:lldb-commits@lists.llvm.org" target="_blank" class="">lldb-commits@lists.llvm.org</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: spyffe<br class="">
Date: Wed Feb 22 16:57:59 2017<br class="">
New Revision: 295897<br class="">
<br class="">
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=295897&view=rev" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-<wbr class="">project?rev=295897&view=rev</a><br class="">
Log:<br class="">
Changed builld-llvm.py to use .json files<br class="">
<br class="">
LLDB has many branches in a variety of repositories.<br class="">
The build-script.py file is subtly different for each set.<br class="">
This is unnecessary and causes merge headaches.<br class="">
<br class="">
This patch makes build-llvm.py consult a directory full<br class="">
of .json files, each one of which matches a particular<br class="">
branch using a regular expression.<br class="">
<br class="">
Differential revision: <a href="https://reviews.llvm.org/D30275" rel="noreferrer" target="_blank" class="">https://reviews.llvm.org/<wbr class="">D30275</a><br class="">
<br class="">
Added:<br class="">
    lldb/trunk/scripts/Xcode/repo.<wbr class="">py<br class="">
    lldb/trunk/scripts/Xcode/<wbr class="">repos/<br class="">
    lldb/trunk/scripts/Xcode/<wbr class="">repos/svn-trunk.json<br class="">
Modified:<br class="">
    lldb/trunk/scripts/Xcode/<wbr class="">build-llvm.py<br class="">
<br class="">
Modified: lldb/trunk/scripts/Xcode/<wbr class="">build-llvm.py<br class="">
URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Xcode/build-llvm.py?rev=295897&r1=295896&r2=295897&view=diff" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-<wbr class="">project/lldb/trunk/scripts/<wbr class="">Xcode/build-llvm.py?rev=<wbr class="">295897&r1=295896&r2=295897&<wbr class="">view=diff</a><br class="">
==============================<wbr class="">==============================<wbr class="">==================<br class="">
--- lldb/trunk/scripts/Xcode/<wbr class="">build-llvm.py (original)<br class="">
+++ lldb/trunk/scripts/Xcode/<wbr class="">build-llvm.py Wed Feb 22 16:57:59 2017<br class="">
@@ -6,6 +6,7 @@ import fnmatch<br class="">
 import os<br class="">
 import platform<br class="">
 import re<br class="">
+import repo<br class="">
 import subprocess<br class="">
 import sys<br class="">
<br class="">
@@ -17,42 +18,38 @@ from lldbbuild import *<br class="">
 def LLVM_HASH_INCLUDES_DIFFS():<br class="">
     return False<br class="">
<br class="">
-# The use of "x = "..."; return x" here is important because tooling looks for<br class="">
-# it with regexps.  Only change how this works if you know what you are doing.<br class="">
-<br class="">
-<br class="">
-def LLVM_REF():<br class="">
-    llvm_ref = "master"<br class="">
-    return llvm_ref<br class="">
-<br class="">
-<br class="">
-def CLANG_REF():<br class="">
-    clang_ref = "master"<br class="">
-    return clang_ref<br class="">
-<br class="">
 # For use with Xcode-style builds<br class="">
<br class="">
+def process_vcs(vcs):<br class="">
+    return {<br class="">
+        "svn": VCS.svn,<br class="">
+        "git": VCS.git<br class="">
+    }[vcs]<br class="">
+<br class="">
+def process_root(name):<br class="">
+    return {<br class="">
+        "llvm": llvm_source_path(),<br class="">
+        "clang": clang_source_path(),<br class="">
+        "ninja": ninja_source_path()<br class="">
+    }[name]<br class="">
+<br class="">
+def process_repo(r):<br class="">
+    return {<br class="">
+        'name': r["name"],<br class="">
+        'vcs': process_vcs(r["vcs"]),<br class="">
+        'root': process_root(r["name"]),<br class="">
+        'url': r["url"],<br class="">
+        'ref': r["ref"]<br class="">
+    }<br class="">
<br class="">
 def XCODE_REPOSITORIES():<br class="">
-    return [<br class="">
-        {'name': "llvm",<br class="">
-         'vcs': VCS.git,<br class="">
-         'root': llvm_source_path(),<br class="">
-         'url': "<a href="http://llvm.org/git/llvm.git" rel="noreferrer" target="_blank" class="">http://llvm.org/git/llvm.git</a>"<wbr class="">,<br class="">
-         'ref': LLVM_REF()},<br class="">
-<br class="">
-        {'name': "clang",<br class="">
-         'vcs': VCS.git,<br class="">
-         'root': clang_source_path(),<br class="">
-         'url': "<a href="http://llvm.org/git/clang.git" rel="noreferrer" target="_blank" class="">http://llvm.org/git/clang.git</a><wbr class="">",<br class="">
-         'ref': CLANG_REF()},<br class="">
-<br class="">
-        {'name': "ninja",<br class="">
-         'vcs': VCS.git,<br class="">
-         'root': ninja_source_path(),<br class="">
-         'url': "<a href="https://github.com/ninja-build/ninja.git" rel="noreferrer" target="_blank" class="">https://github.com/ninja-<wbr class="">build/ninja.git</a>",<br class="">
-         'ref': "master"}<br class="">
-    ]<br class="">
+    identifier = repo.identifier()<br class="">
+    if identifier == None:<br class="">
+        sys.exit("Couldn't identify the current branch")<br class="">
+    set = repo.find(identifier)<br class="">
+    if set == None:<br class="">
+        sys.exit("Couldn't find a repository set for the current branch")<br class="">
+    return [process_repo(r) for r in set]<br class="">
<br class="">
<br class="">
 def get_c_compiler():<br class="">
<br class="">
Added: lldb/trunk/scripts/Xcode/repo.<wbr class="">py<br class="">
URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Xcode/repo.py?rev=295897&view=auto" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-<wbr class="">project/lldb/trunk/scripts/<wbr class="">Xcode/repo.py?rev=295897&view=<wbr class="">auto</a><br class="">
==============================<wbr class="">==============================<wbr class="">==================<br class="">
--- lldb/trunk/scripts/Xcode/repo.<wbr class="">py (added)<br class="">
+++ lldb/trunk/scripts/Xcode/repo.<wbr class="">py Wed Feb 22 16:57:59 2017<br class="">
@@ -0,0 +1,33 @@<br class="">
+import json<br class="">
+import os<br class="">
+import re<br class="">
+import subprocess<br class="">
+<br class="">
+def identifier():<br class="">
+       try:<br class="">
+               svn_output = subprocess.check_output(["svn"<wbr class="">, "info", "--show-item", "url"], stderr=subprocess.STDOUT).<wbr class="">rstrip()<br class="">
+               return svn_output<br class="">
+       except:<br class="">
+               pass<br class="">
+       try:<br class="">
+               git_remote_and_branch = subprocess.check_output(["git"<wbr class="">, "rev-parse", "--abbrev-ref", "--symbolic-full-name", "@{u}"]).rstrip()<br class="">
+               git_remote = git_remote_and_branch.split("/<wbr class="">")[0]<br class="">
+               git_branch = "/".join(git_remote_and_<wbr class="">branch.split("/")[1:])<br class="">
+               git_url = subprocess.check_output(["git"<wbr class="">, "remote", "get-url", git_remote]).rstrip()<br class="">
+               return git_url + ":" + git_branch<br class="">
+       except:<br class="">
+               pass<br class="">
+       return None<br class="">
+<br class="">
+def find(identifier):<br class="">
+       dir = os.path.dirname(os.path.<wbr class="">realpath(__file__))<br class="">
+       repos_dir = os.path.join(dir, "repos")<br class="">
+       json_regex = re.compile(r"^.*.json$")<br class="">
+       override_path = os.path.join(repos_dir, "OVERRIDE.json")<br class="">
+       if os.path.isfile(override_path):<br class="">
+               override_set = json.load(open(override_path))<br class="">
+               return override_set["repos"]<br class="">
+       for set in [json.load(open(os.path.join(<wbr class="">repos_dir, f))) for f in filter(json_regex.match, os.listdir(repos_dir))]:<br class="">
+               if re.match(set["regexp"], identifier):<br class="">
+                       return set["repos"]<br class="">
+       return None<br class="">
<br class="">
Added: lldb/trunk/scripts/Xcode/<wbr class="">repos/svn-trunk.json<br class="">
URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Xcode/repos/svn-trunk.json?rev=295897&view=auto" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-<wbr class="">project/lldb/trunk/scripts/<wbr class="">Xcode/repos/svn-trunk.json?<wbr class="">rev=295897&view=auto</a><br class="">
==============================<wbr class="">==============================<wbr class="">==================<br class="">
--- lldb/trunk/scripts/Xcode/<wbr class="">repos/svn-trunk.json (added)<br class="">
+++ lldb/trunk/scripts/Xcode/<wbr class="">repos/svn-trunk.json Wed Feb 22 16:57:59 2017<br class="">
@@ -0,0 +1,19 @@<br class="">
+{<br class="">
+    "regexp" : ".*llvm\\.org.*",<br class="">
+    "repos" : [<br class="">
+        {"name": "llvm",<br class="">
+         "vcs": "git",<br class="">
+         "url": "<a href="http://llvm.org/git/llvm.git" rel="noreferrer" target="_blank" class="">http://llvm.org/git/llvm.git</a>"<wbr class="">,<br class="">
+         "ref": "master"},<br class="">
+<br class="">
+        {"name": "clang",<br class="">
+         "vcs": "git",<br class="">
+         "url": "<a href="http://llvm.org/git/clang.git" rel="noreferrer" target="_blank" class="">http://llvm.org/git/clang.git</a><wbr class="">",<br class="">
+         "ref": "master"},<br class="">
+<br class="">
+        {"name": "ninja",<br class="">
+         "vcs": "git",<br class="">
+         "url": "<a href="https://github.com/ninja-build/ninja.git" rel="noreferrer" target="_blank" class="">https://github.com/ninja-<wbr class="">build/ninja.git</a>",<br class="">
+         "ref": "master"}<br class="">
+    ]<br class="">
+}<br class="">
<br class="">
<br class="">
______________________________<wbr class="">_________________<br class="">
lldb-commits mailing list<br class="">
<a href="mailto:lldb-commits@lists.llvm.org" class="">lldb-commits@lists.llvm.org</a><br class="">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits" rel="noreferrer" target="_blank" class="">http://lists.llvm.org/cgi-bin/<wbr class="">mailman/listinfo/lldb-commits</a><br class="">
</blockquote></div><br class=""><br clear="all" class=""><div class=""><br class=""></div>-- <br class=""><div class="gmail_signature" data-smartmail="gmail_signature">Tim <<a href="mailto:penryu@gmail.com" target="_blank" class="">penryu@gmail.com</a>></div>
</div>
</div></blockquote></div><br class=""></div></div></div>_______________________________________________<br class="">lldb-commits mailing list<br class=""><a href="mailto:lldb-commits@lists.llvm.org" class="">lldb-commits@lists.llvm.org</a><br class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits<br class=""></div></blockquote></div><br class=""></div></body></html>