Bug 1332797 - Clear out the current double-conversion copy before updating it so that our copying properly handles added/removed files. r=froydnj
authorJeff Walden <jwalden@mit.edu>
Mon, 23 Jan 2017 15:10:47 -0800
changeset 331731 de8d389998d33716e5c4a5f8a5a161f733373cfe
parent 331730 552a1604e5efb423267a5e2ac0b71afc8cd5f94b
child 331732 89b895c219f2b97fc0ded8877b30c337e697bdaa
push id86340
push userjwalden@mit.edu
push dateTue, 31 Jan 2017 00:13:34 +0000
treeherdermozilla-inbound@def2e655ff13 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1332797
milestone54.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1332797 - Clear out the current double-conversion copy before updating it so that our copying properly handles added/removed files. r=froydnj
mfbt/double-conversion/update.sh
--- a/mfbt/double-conversion/update.sh
+++ b/mfbt/double-conversion/update.sh
@@ -3,38 +3,53 @@
 # Copies the needed files from a directory containing the original
 # double-conversion source that we need.  If no revision is specified, the tip
 # revision is used.
 
 # This was last updated with git rev 04cae7a8d5ef3d62ceffb03cdc3d38f258457a52.
 
 set -e
 
+LOCAL_PATCHES=""
+
+LOCAL_PATCHES="$LOCAL_PATCHES add-mfbt-api-markers.patch"
+LOCAL_PATCHES="$LOCAL_PATCHES use-StandardInteger.patch"
+LOCAL_PATCHES="$LOCAL_PATCHES use-mozilla-assertions.patch"
+LOCAL_PATCHES="$LOCAL_PATCHES use-static_assert.patch"
+LOCAL_PATCHES="$LOCAL_PATCHES ToPrecision-exponential.patch"
+LOCAL_PATCHES="$LOCAL_PATCHES fix-Wshadow-issues.patch"
+
 TMPDIR=`mktemp --directory`
 LOCAL_CLONE="$TMPDIR/double-conversion"
 
 git clone https://github.com/google/double-conversion.git "$LOCAL_CLONE"
 
 REV=""
 
 if [ "$1" !=  "" ]; then
   git -C "$LOCAL_CLONE" checkout "$1"
 fi
 
+# First clear out everything already present.
+rm -rf ./*
+
+# Restore non-upstream files
+hg revert update.sh
+hg revert $LOCAL_PATCHES
+
+# Copy over critical files.
 cp "$LOCAL_CLONE/LICENSE" ./
 cp "$LOCAL_CLONE/README" ./
 
 # Includes
 for header in "$LOCAL_CLONE/src/"*.h; do
   cp "$header" ./
 done
 
 # Source
 for ccfile in "$LOCAL_CLONE/src/"*.cc; do
   cp "$ccfile" ./
 done
 
-patch -p3 < add-mfbt-api-markers.patch
-patch -p3 < use-StandardInteger.patch
-patch -p3 < use-mozilla-assertions.patch
-patch -p3 < use-static_assert.patch
-patch -p3 < ToPrecision-exponential.patch
-patch -p3 < fix-Wshadow-issues.patch
+# Now apply our local patches.
+for patch in $LOCAL_PATCHES; do
+  patch -p3 < "$patch"
+done