3 # pull from a darcs repository and create a new git commit from it; put
4 # instructions for reproducing this commit with darcs into the commit message
6 # Author: Bertram Felgenhauer <int-e@gmx.de>
9 git checkout darcs ||
exit 1
12 # extract the hash of the latest commit
13 HASH
="$(darcs changes --last=1 --xml-output | grep '^<patch ' | sed 's/^.* hash=.\(.*\).gz.>$/\1/')"
15 darcs show files
--no-directories | git update-index
--add --stdin
16 git commit
-a -F- <<EOF
17 pull from upstream repository
20 darcs unpull --from-match=\"hash $HASH\" -a
21 darcs pull --matches=\"hash $HASH\" -a