[SCM] Vim packaging branch, debian, updated. upstream/7.1.ds-305-gb15d57f
James Vega
jamessan at debian.org
Thu Mar 27 01:57:44 UTC 2008
The following commit has been merged in the debian branch:
commit b15d57f116a846eceec68219dab451744c0fe523
Author: James Vega <jamessan at debian.org>
Date: Wed Mar 26 21:17:57 2008 -0400
Improve commit messages update-patches uses.
Extract the author and long-description from the patch file.
Extract the short description from debian/README.
diff --git a/debian/update-patches b/debian/update-patches
index b1bb8ab..e5f8e68 100755
--- a/debian/update-patches
+++ b/debian/update-patches
@@ -17,18 +17,29 @@ curpatch=$(($curpatch + 1))
newpatch=$(lftp -c "open $host; cd $dir; ls $version.*" | tail -n1 | awk -F. '{print $3}')
if [ $curpatch -ge $newpatch ]; then
- echo "Up-to-date"
+ echo "Nothing to do."
exit
fi
+echo 'updating debian/README to latest upstream ...'
+lftp -c "open $host; cd $dir; get README -o debian/README"
+git add debian/README
+# Store debian/README while we update the other branches. The debian branch
+# will get reset to before this commit at the end of the script.
+git commit -m 'Stash'
+
git checkout upstream
lftp -c "open $host; cd $dir; get $(seq -f $version.%03g -s' ' $curpatch $newpatch)"
for p in $(seq -f $version.%03g $curpatch $newpatch); do
patch -Np0 < $p
git add $(lsdiff $p)
- # XXX Should we set the author to Bram here?
- git commit -m "$(sed -n '/^Patch /,/^Files:/{s/^Files:.*//;t;s/\\([\`\"\$]\\)/\\\\\\1/g;p}' $p)"
+ author="$(git cat-file blob debian:debian/README | \
+ sed -n -e 's/^From: *//;t done;d;: done')"
+ subject="s/^ *[0-9]* *$p *//;t done;d;: done;p"
+ msg='/^Patch /,/^Files:/{s/^Files:.*//;t;p}'
+ (git cat-file blob debian:debian/README | sed -n "$subject"; \
+ sed -n "$msg" $p) | git commit -A "$author" -F -
rm $p
done
@@ -37,7 +48,7 @@ for b in $(git for-each-ref --format="%(refname)" "refs/heads/deb/*" | sed 's at re
git merge upstream
if [ $? -ne 0 ]; then
echo "Merge conflict -- fix the problem and then exit the subshell to continue"
- sh
+ $SHELL
if [ $? -ne 0 ]; then
echo "Non-zero exit status from merge conflict. Exiting update script."
exit
@@ -45,8 +56,9 @@ for b in $(git for-each-ref --format="%(refname)" "refs/heads/deb/*" | sed 's at re
fi
done
-echo 'updating debian/README to latest upstream ...'
-lftp -c "open $host; cd $dir; get README -o debian/README"
-git add debian/README
+# Undo the debian/README commit but leave the new README in tact so the user
+# can add add/update debian/changelog
+git reset HEAD~1
-echo "All done. Patches $curpatch - $newpatch comitted and merged."
+echo "Patches $curpatch - $newpatch comitted and merged."
+echo "Update debian/changelog and commit debian/README."
--
Vim packaging
More information about the pkg-vim-maintainers
mailing list