Bug 1458897 Fix svn revert in build-clang so one can re-run it successfully r?glandium draft
authorTom Ritter <tom@mozilla.com>
Thu, 03 May 2018 09:14:12 -0500
changeset 791103 66965bbfa6caa9aea5e96c61046321612e531bed
parent 791102 f6d0eb2d3d1f16af5927fa66f1f17db89dfc1fe3
push id108694
push userbmo:tom@mozilla.com
push dateThu, 03 May 2018 14:13:53 +0000
reviewersglandium
bugs1458897
milestone61.0a1
Bug 1458897 Fix svn revert in build-clang so one can re-run it successfully r?glandium svn revert requires a path, and does not take a revision. This isn't an issue on build machines because we do a fresh checkout every time. But if you're trying to run build-clang locally, with existing checkouts, it will: 1) successfully svn update 2) run svn revert, saying "Skipped <rev>" (except you don't see it because of -q) 3) svn revert returns a successfull eror code 4) patch fails because the file was never reverted and it attempts to re-apply the patch Also I think the revert command needs to come first. MozReview-Commit-ID: 4OfrJNZwJNU
build/build-clang/build-clang.py
--- a/build/build-clang/build-clang.py
+++ b/build/build-clang/build-clang.py
@@ -134,18 +134,18 @@ def install_import_library(build_dir, cl
                  os.path.join(clang_dir, "lib"))
 
 
 def svn_co(source_dir, url, directory, revision):
     run_in(source_dir, ["svn", "co", "-q", "-r", revision, url, directory])
 
 
 def svn_update(directory, revision):
+    run_in(directory, ["svn", "revert", "-q", "-R", "."])
     run_in(directory, ["svn", "update", "-q", "-r", revision])
-    run_in(directory, ["svn", "revert", "-q", "-R", revision])
 
 
 def is_darwin():
     return platform.system() == "Darwin"
 
 
 def is_linux():
     return platform.system() == "Linux"