Created
June 14, 2013 19:58
-
-
Save rnewman/5784788 to your computer and use it in GitHub Desktop.
Dump an individual git commit.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REPO=~/moz/hg/mozilla-inbound | |
COMMIT=$1 | |
echo "Processing commit $COMMIT into repo $REPO..." | |
SUMMARY=$(git show --format="%s" $COMMIT | head -n 1) | |
FILENAME=$(echo "$SUMMARY" | cut -c 1-24 | sed 's/[^_A-Za-z0-9]/-/g' | tr [A-Z] [a-z]) | |
echo "Summary is \"$SUMMARY\"..." | |
echo "Filename is \"$FILENAME\"..." | |
git hgshow $COMMIT | sed 's,src/main/java/org/mozilla/gecko/sync/,mobile/android/base/sync/,g' | sed 's,twinql\.com,mozilla.com,' | hg -R $REPO qimport -g -P -n $FILENAME - |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment