[SCM] Vim packaging branch, debian, updated. upstream/7.1.285-206-g455f524

James Vega jamessan at debian.org
Fri Jun 27 01:51:18 UTC 2008


The following commit has been merged in the debian branch:
commit 455f524e2112d93e769a4dfce0053e0d21e5f6a1
Author: James Vega <jamessan at debian.org>
Date:   Thu Jun 26 21:30:24 2008 -0400

    Update for 7.2a beta.  Cleanup some code.
    
    Move the merge handling into a function.  Change it to use "if ! cmd" instead
    of "cmd\nif [ $? -ne 0 ]" since that allows the script to be set -e again.
    
    Merge upstream-runtime instead of upstream into debian and deb/runtime.
    
    Signed-off-by: James Vega <jamessan at debian.org>

diff --git a/debian/update-patches b/debian/update-patches
index 01020b9..025a8c8 100755
--- a/debian/update-patches
+++ b/debian/update-patches
@@ -1,4 +1,5 @@
 #!/bin/sh
+set -e
 
 OPTIONS_SPEC="\
 $(basename $0)
@@ -17,9 +18,21 @@ git rev-parse --verify HEAD > /dev/null && \
     || die "Your tree is unclean, can't do that..."
 
 
+checkout_and_merge() {
+    git checkout $1
+    if ! git merge $2; then
+        echo "Merge conflict -- fix the problem and then exit the subshell to continue"
+        if ! $SHELL; then
+            echo "Non-zero exit status from merge conflict.  Exiting update script."
+            exit
+        fi
+    fi
+}
+
 host='ftp.vim.org'
-version='7.1'
-dir="pub/vim/patches/$version"
+version='7.2a'
+snapshot='unstable/'
+dir="pub/vim/${snapshot}patches/$version"
 
 curpatch=$(git show debian:debian/README | tail -n1 | awk '{print $2}' | sed s/^$version\.//)
 curpatch=$(($curpatch + 1))
@@ -53,19 +66,16 @@ for p in $(seq -f $version.%03g $curpatch $newpatch); do
 done
 
 for b in $(git for-each-ref --format="%(refname)" "refs/heads/deb/*" | sed 's at refs/heads/@@') upstream-runtime; do
-    git checkout $b
-    git merge upstream
-    if [ $? -ne 0 ]; then
-        echo "Merge conflict -- fix the problem and then exit the subshell to continue"
-        $SHELL
-        if [ $? -ne 0 ]; then
-            echo "Non-zero exit status from merge conflict.  Exiting update script."
-            exit
-        fi
+    # Handle deb/runtime afterward to keep consistent with it being branched
+    # off upstream-runtime
+    if [ "$b" = "deb/runtime" ];
+        continue
     fi
+    checkout_and_merge $b upstream
 done
 
-git checkout debian
-git merge upstream
+for b in deb/runtime debian; do
+    checkout_and_merge $b upstream-runtime
+done
 
 echo "Patches $curpatch - $newpatch comitted and merged."

-- 
Vim packaging



More information about the pkg-vim-maintainers mailing list