12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- #!/bin/sh
- [ -d _darcs -a -d .git ] || exit 1
- PREFIX=/usr/local
- DARCS=$PREFIX/bin/darcs
- XSLTPROC=$PREFIX/bin/xsltproc
- TMPDIR=/tmp/darcs2git
- [ -d $TMPDIR -a -w $TMPDIR ] || mkdir -p $TMPDIR
- DARCS2GIT_XSLT=`dirname $0`/darcs2git.xslt
- [ -r $DARCS2GIT_XSLT ] || exit 1
- $DARCS fetch --all --summary --quiet > /dev/null &&
- $DARCS pull --all --quiet --dry-run --xml-output > $TMPDIR/patches.xml
- [ -s $TMPDIR/patches.xml ] || exit 2
- if head -n 1 $TMPDIR/patches.xml | grep "No remote changes to pull in!"
- then
- echo "No remote changes to pull in!" >&2
- exit 2
- fi
- $XSLTPROC --nonet --novalid --stringparam TMPDIR "$TMPDIR/" $DARCS2GIT_XSLT $TMPDIR/patches.xml > $TMPDIR/doit.sh && \
- sh -x $TMPDIR/doit.sh
- exit $?
- 9a10,12
- >
- > \.git$
- >
- ^D
- Hmm... Looks like a normal diff to me...
- Patching file _darcs/prefs/boring using Plan A...
- Hunk
- done
|