Skip to content

Instantly share code, notes, and snippets.

@brendandahl
Last active December 22, 2015 00:58
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brendandahl/6392652 to your computer and use it in GitHub Desktop.
Save brendandahl/6392652 to your computer and use it in GitHub Desktop.
Create mozilla-<beta/aurora> uplift patch for pdf.js.
#!/bin/sh
set -e
if [ "$#" -ne 4 ]; then
echo "Usage: $0 1_NAME 2_MESSAGE 3_BASELINE 4_CHERRY-PICK" >&2
echo "Example: $0 annot-ap-beta \"Bug 890259 - Use text widget annotation appearance stream if it is available.\" 4e83123 feafb39" >&2
echo "Run in your mozilla-<branch> directory." >&2
exit 1
fi
read -p "Did you 1) pop all hg patches, 2) update mozilla-<version>, 3) make sure pdf.js is clean?[y\n] " -n 1
if [[ ! $REPLY =~ ^[Yy]$ ]]
then
exit 1
fi
pushd .
cd ~/projects/mine/pdf.js
git checkout $3
git cherry-pick $4
BASELINE=$3 node make mozcentralbaseline
node make mozcentraldiff
popd
hg qimport -n $1 ~/projects/mine/pdf.js/build/mozcentral.diff
hg qpush
hg qref -m "$2" -X "*"
echo "REMEBER to wipe out commit id changes..."
echo "Then:"
echo "hg qref && hg export qtip > ~/projects/mozilla-central/patches~/$1.patch"
@brendandahl
Copy link
Author

Example usage:
uplift.sh annot-ap-beta "Bug 890259 - Use text widget annotation appearance stream if it is available." 4e83123 feafb39

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment