Skip to content

Instantly share code, notes, and snippets.

@jmoyers
Created September 9, 2011 22:50
Show Gist options
  • Save jmoyers/1207529 to your computer and use it in GitHub Desktop.
Save jmoyers/1207529 to your computer and use it in GitHub Desktop.
git mergetool workflow for svn
#!/bin/sh
for FILEPATH in $(svn status | grep '^C' | awk '{print $2}')
do
FILE=${FILEPATH##*/}
LEFT=$(find . -name ${FILE}.working*)
RIGHT=$(find . -name ${FILE}.merge-right*)
ANCESTOR=$(find . -name ${FILE}.merge-left*)
echo
echo "CONFLICT WITH: "$FILEPATH
echo "LEFT: "$LEFT
echo "RIGHT: "$RIGHT
echo "ANCESTOR: "$ANCESTOR
`opendiff $LEFT $RIGHT -ancestor $ANCESTOR -merge $FILEPATH`
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment