[SCM] Vim packaging branch, debian, updated. upstream/7.1.ds-297-g6ddf7f8

James Vega jamessan at debian.org
Tue Mar 25 01:38:28 UTC 2008


The following commit has been merged in the debian branch:
commit 6ddf7f8ff4c095863eb1ca77975a2baa89047342
Author: James Vega <jamessan at debian.org>
Date:   Mon Mar 24 21:38:00 2008 -0400

    Add debian/update-patches.
    This script automates the process of commiting the new upstream patches to
    the upstream branch and then merging upstream into the rest of the
    branches.

diff --git a/debian/update-patches b/debian/update-patches
new file mode 100755
index 0000000..b1bb8ab
--- /dev/null
+++ b/debian/update-patches
@@ -0,0 +1,52 @@
+#!/bin/sh
+set -e
+
+host='ftp.vim.org'
+version='7.1'
+dir="pub/vim/patches/$version"
+
+if [ "X$0" != "Xdebian/update-patches" ]; then
+    echo "This must be run from the top-level of the git repo"
+    exit
+fi
+
+git checkout debian
+
+curpatch=$(dpkg-parsechangelog | awk '/^Version:/{print $2}' | sed 's/.*-\([0-9]*\)+.*/\1/')
+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"
+    exit
+fi
+
+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)"
+    rm $p
+done
+
+for b in $(git for-each-ref --format="%(refname)" "refs/heads/deb/*" | sed 's at refs/heads/@@') upstream-runtime debian; do
+    git checkout $b
+    git merge upstream
+    if [ $? -ne 0 ]; then
+        echo "Merge conflict -- fix the problem and then exit the subshell to continue"
+        sh
+        if [ $? -ne 0 ]; then
+            echo "Non-zero exit status from merge conflict.  Exiting update script."
+            exit
+        fi
+    fi
+done
+
+echo 'updating debian/README to latest upstream ...'
+lftp -c "open $host; cd $dir; get README -o debian/README"
+git add debian/README
+
+echo "All done.  Patches $curpatch - $newpatch comitted and merged."

-- 
Vim packaging



More information about the pkg-vim-maintainers mailing list