Skip to content

Instantly share code, notes, and snippets.

@svparijs
Created April 18, 2013 12:29
Show Gist options
  • Save svparijs/5412359 to your computer and use it in GitHub Desktop.
Save svparijs/5412359 to your computer and use it in GitHub Desktop.
#!/bin/bash
if [ ! -d "Web" -o ! -d "Packages" -o ! -d "Configuration" ]; then
echo Make sure you run this from the TYPO3 Flow root directory!
echo
exit 1
fi
BASE_DIR=$(pwd)
function applyPatchIfNecessary {
if [[ -z `git log --grep="Change-Id: $patchSet"` ]]; then
echo Fetching Gerrit information for patch set $patchSet in $project
refPath=$(ssh -p 29418 review.typo3.org gerrit query --current-patch-set $patchSet | grep 'ref:' | sed -e 's/\s*ref:\s\([a-z0-9\/]*\)/\1/g')
echo Applying $refPath for PS $patchSet
git fetch git://git.typo3.org/$project $refPath && git cherry-pick FETCH_HEAD
echo
fi
}
cd $BASE_DIR/Packages/Framework/TYPO3.Flow/
git checkout -B GerritPending
project="FLOW3/Packages/TYPO3.FLOW3"
for patchSet in I93acc3ed I6aa50f69 Ide840f8b Iedf9f2ce I66d99e31
do
applyPatchIfNecessary
done
cd $BASE_DIR/Packages/Framework/TYPO3.Fluid/
git checkout -B GerritPending
project="FLOW3/Packages/TYPO3.Fluid"
for patchSet in I7596f6fc Ic600a9e5
do
applyPatchIfNecessary
done
cd $BASE_DIR/Packages/Application/TYPO3.Neos/
git checkout -B GerritPending
project="FLOW3/Packages/TYPO3.TYPO3"
for patchSet in I5ac315b4 If00fd173
do
applyPatchIfNecessary
done
cd $BASE_DIR/Packages/Application/TYPO3.TypoScript/
git checkout -B GerritPending
project="FLOW3/Packages/TYPO3.TypoScript"
for patchSet in I90e76067
do
applyPatchIfNecessary
done
cd $BASE_DIR/Packages/Application/TYPO3.Neos.NodeTypes/
git checkout -B GerritPending
project="FLOW3/Packages/TYPO3.Phoenix.ContentTypes"
for patchSet in Iae94312a
do
applyPatchIfNecessary
done
cd $BASE_DIR/Packages/Application/MooTools.Packager/
git submodule init && git submodule update
echo
echo Pending reviews have been applied.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment