[SCM] Vim packaging branch, debian, updated. upstream/7.2b.001-241-g479045a
James Vega
jamessan at debian.org
Wed Aug 6 22:34:54 UTC 2008
The following commit has been merged in the debian branch:
commit 5cfc22a4ad463442674495caeba953b4ae60c18b
Author: James Vega <jamessan at debian.org>
Date: Wed Aug 6 16:06:23 2008 -0400
Add --only-upstream option to update-patches
Signed-off-by: James Vega <jamessan at debian.org>
diff --git a/debian/update-patches b/debian/update-patches
index eb1fe81..b8e0f1a 100755
--- a/debian/update-patches
+++ b/debian/update-patches
@@ -2,10 +2,11 @@
set -e
OPTIONS_SPEC="\
-$(basename $0)
+$(basename $0) [options]
updates patches from upstream vim
--
+u,only-upstream Only update the upstream branch. Useful to make sure all patches are synced before updating to a new major release.
"
SUBDIRECTORY_OK=
. git-sh-setup
@@ -17,6 +18,15 @@ git rev-parse --verify HEAD > /dev/null && \
git diff-index --cached --quiet HEAD -- \
|| die "Your tree is unclean, can't do that..."
+onlyupstream=0
+case "$1" in
+ -u)
+ onlyupstream=1
+ ;;
+ *)
+ usage
+ ;;
+esac
checkout_and_merge() {
git checkout $1
@@ -48,15 +58,17 @@ fi
curpatch=$(($curpatch + 1))
-git checkout debian
+if [ $onlyupstream -eq 0 ]; then
+ git checkout debian
-echo 'updating debian/README to latest upstream ...'
-lftp -c "open $host; cd $dir; get README -o debian/README"
+ echo 'updating debian/README to latest upstream ...'
+ lftp -c "open $host; cd $dir; get README -o debian/README"
-# Specifically using "git add" instead of "git commit -- debian/README" since
-# debian/README may not always be tracked
-git add debian/README
-git commit -m "Update README for patches $curpatch - $newpatch"
+ # Specifically using "git add" instead of "git commit -- debian/README" since
+ # debian/README may not always be tracked
+ git add debian/README
+ git commit -m "Update README for patches $curpatch - $newpatch"
+fi
git checkout upstream
@@ -72,17 +84,21 @@ for p in $(seq -f $version.%03g $curpatch $newpatch); do
rm $p
done
-for b in $(git for-each-ref --format="%(refname)" "refs/heads/deb/*" | sed 's at refs/heads/@@') upstream-runtime; do
- # Handle deb/runtime afterward to keep consistent with it being branched
- # off upstream-runtime
- if [ "$b" = "deb/runtime" ]; then
- continue
- fi
- checkout_and_merge $b upstream
-done
-
-for b in deb/runtime debian; do
- checkout_and_merge $b upstream-runtime
-done
+if [ $onlyupstream -eq 0 ]; then
+ for b in $(git for-each-ref --format="%(refname)" "refs/heads/deb/*" | sed 's at refs/heads/@@') upstream-runtime; do
+ # Handle deb/runtime afterward to keep consistent with it being branched
+ # off upstream-runtime
+ if [ "$b" = "deb/runtime" ]; then
+ continue
+ fi
+ checkout_and_merge $b upstream
+ done
+
+ for b in deb/runtime debian; do
+ checkout_and_merge $b upstream-runtime
+ done
+else
+ git checkout debian
+fi
echo "Patches $curpatch - $newpatch comitted and merged."
--
Vim packaging
More information about the pkg-vim-maintainers
mailing list