update readmes
[git-darcs-import.git] / scripts / update-upstream
blob05d1b7dced812ccd21f066d7ef12f0787cbe4263
1 #! /bin/sh
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
11 darcs pull -a
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
19 darcs pull -a
20 darcs unpull --from-match=\"hash $HASH\" -a
21 darcs pull --matches=\"hash $HASH\" -a
22 EOF
24 git-checkout master