[0.11] common: update-common: add support for branches

Tim Müller tpm at kemper.freedesktop.org
Wed Jan 4 11:48:48 PST 2012


Module: common
Branch: 0.11
Commit: f6f82ff0bb7024a6d0348c0b2579e799d9908fad
URL:    http://cgit.freedesktop.org/gstreamer/common/commit/?id=f6f82ff0bb7024a6d0348c0b2579e799d9908fad

Author: Tim-Philipp Müller <tim.muller at collabora.co.uk>
Date:   Wed Jan  4 19:34:03 2012 +0000

update-common: add support for branches

---

 update-common |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/update-common b/update-common
index 0d56dcd..6bafa37 100755
--- a/update-common
+++ b/update-common
@@ -15,6 +15,7 @@
 # Set this variable to point to any directory containing existing
 # git # checkouts, and git will pull objects from there, decreasing
 # network usage.
+BRANCH=0.10
 reference=~/gst
 
 set -e
@@ -38,11 +39,18 @@ do
     git clone ssh://git.freedesktop.org/git/gstreamer/$module
   fi
   cd $dir/$module
+
+  # ignore modules that don't have such a branch
+  if ! git show-ref origin/$BRANCH >/dev/null; then
+    continue;
+  fi
+
+  git checkout -b $BRANCH origin/$BRANCH
   git submodule init
   git submodule update
   cd $dir/$module/common
   ref_from=`git log --pretty=format:%h -n 1 HEAD`
-  git checkout master
+  git checkout -b $BRANCH origin/$BRANCH
   git pull origin
   ref_to=`git log --pretty=format:%h -n 1 HEAD`
   echo updating common from $ref_from to $ref_to
@@ -59,7 +67,9 @@ done
 for module in $modules
 do
   cd $dir/$module
-  git push origin
+  if git show-ref origin/$BRANCH >/dev/null; then
+    git push origin $BRANCH
+  fi
 done
 
 rm -rf $dir



More information about the gstreamer-commits mailing list