author Miko Mynttinen <>
Sat, 18 May 2019 20:11:27 +0000
changeset 536340 40280b1c2aff496375f2acf8bae2d4b332f6f404
parent 529816 912fb96c21b3946b50e462b5ff00fda9f55050d9
child 548825 c21e82e313c4770a03d0d50a15ab3555768d42fb
permissions -rwxr-xr-x
Bug 1529698 - Part 3: Move DisplayItemData to nsPaintedDisplayItem r=mattwoodrow Differential Revision:

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at

set -e

# Update to an ICU release:
#   Usage: <URL of ICU GIT> <release tag name>
#   E.g., for ICU 62.1: release-62-1
# Update to an ICU maintenance branch:
#   Usage: <URL of ICU GIT> <maintenance name>
#   E.g., for ICU 62.1: maint/maint-62

if [ $# -lt 2 ]; then
  echo "Usage: <URL of ICU GIT> <release tag name>"
  exit 1

# Ensure that $Date$ in the checked-out git files expands timezone-agnostically,
# so that this script's behavior is consistent when run from any time zone.
export TZ=UTC

# Also ensure GIT-INFO is consistently English.
export LANG=en_US.UTF-8
export LANGUAGE=en_US
export LC_ALL=en_US.UTF-8

icu_dir=`dirname $0`/icu

# Remove intl/icu/source, then replace it with a clean export.
rm -rf ${icu_dir}/source
tmpclonedir=$(mktemp -d)
git clone --depth 1 --branch $2 $1 ${tmpclonedir}
cp -r ${tmpclonedir}/icu4c/source ${icu_dir}/source

# Record `git log`.
# (This ensures that if ICU modifications are performed properly, it's always
# possible to run the command at the top of this script and make no changes to
# the tree.)
git -C ${tmpclonedir} log -1 > ${icu_dir}/GIT-INFO

# Clean up after ourselves.
rm -rf ${tmpclonedir}

# Remove layoutex, tests, and samples, but leave makefiles and test data in place.
find ${icu_dir}/source/layoutex -name '*' -prune -or -type f -print | xargs rm
find ${icu_dir}/source/test -name '*' -prune -or -name 'testdata' -prune -or -type f -print | xargs rm
find ${icu_dir}/source/samples -name '*' -prune -or -type f -print | xargs rm

for patch in \
 bug-915735 \
 suppress-warnings.diff \
 bug-1172609-timezone-recreateDefault.diff \
 bug-1198952-workaround-make-3.82-bug.diff \
; do
  echo "Applying local patch $patch"
  patch -d ${icu_dir}/../../ -p1 --no-backup-if-mismatch < ${icu_dir}/../icu-patches/$patch

topsrcdir=`dirname $0`/../
python ${topsrcdir}/js/src/tests/non262/String/ $topsrcdir

# Update our files in config/external/icu, and
# build a new ICU data file.
python `dirname $0`/ $topsrcdir

hg addremove "${icu_dir}/source" "${icu_dir}/GIT-INFO" ${topsrcdir}/config/external/icu

# Check local tzdata version.
`dirname $0`/ -c