[DRE-commits] [SCM] pkg-ruby-extras.git branch, master, updated. 85f42656a4efb3e17b8ed9a016df20b49934178a

Antonio Terceiro terceiro at debian.org
Sat Jan 28 12:45:35 UTC 2012


The following commit has been merged in the master branch:
commit 85f42656a4efb3e17b8ed9a016df20b49934178a
Author: Antonio Terceiro <terceiro at debian.org>
Date:   Sat Jan 28 10:41:57 2012 -0200

    Add quick-update script
    
    This script is smart enough to not try updating repositories that don't
    need to be updated. This way you get super fast updates of all packages.
    In the best case (no packages to be updated at all), the update
    finishes in about 10 seconds.

diff --git a/.gitignore b/.gitignore
index 8843ded..e7f1c98 100644
--- a/.gitignore
+++ b/.gitignore
@@ -121,6 +121,7 @@ ruby-mathml
 ruby-mecab
 ruby-mechanize
 ruby-metaclass
+ruby-method-source
 ruby-mime-types
 ruby-minitest
 ruby-mixlib-cli
@@ -245,3 +246,4 @@ yard
 *.changes
 *.build
 *.upload
+*.heads
diff --git a/.mrconfig b/.mrconfig
index d7c688f..66a00af 100644
--- a/.mrconfig
+++ b/.mrconfig
@@ -385,6 +385,9 @@ checkout = git_checkout ruby-mechanize
 [ruby-metaclass]
 checkout = git_checkout ruby-metaclass
 
+[ruby-method-source]
+checkout = git_checkout ruby-method-source
+
 [ruby-mime-types]
 checkout = git_checkout ruby-mime-types
 
diff --git a/make-mrconfig b/make-mrconfig
index d2636ee..395b6c0 100755
--- a/make-mrconfig
+++ b/make-mrconfig
@@ -73,6 +73,7 @@ cat >> .gitignore <<EOF
 *.changes
 *.build
 *.upload
+*.heads
 EOF
 
 
diff --git a/quick-update b/quick-update
new file mode 100755
index 0000000..8768655
--- /dev/null
+++ b/quick-update
@@ -0,0 +1,50 @@
+#!/bin/sh -e
+
+./make-mrconfig
+
+packages=$(echo */.git | sed -e 's/\/\.git//g')
+list_heads="
+for package in $packages; do
+  (
+    echo -n \"\$package \"
+    cat \$package/.git/refs/heads/master
+  )
+done
+"
+remote_list_heads=$(echo "$list_heads" | sed -e 's/\/\.git/.git/g')
+
+echo "Listing remote master branches ..."
+ssh git.debian.org "cd /git/pkg-ruby-extras/ && $remote_list_heads" > remote.heads
+
+echo "Listing local master branches ..."
+sh -c "$list_heads" > local.heads
+
+need_push=""
+need_pull=""
+diff remote.heads local.heads | grep '^<' | cut -d ' ' -f 2-3 | while read package read; do
+  for package in $diff; do
+    if (cd $package && git show $head >/dev/null 2>&1); then
+      need_push="$need_push $package"
+    else
+      need_pull="$need_pull $package"
+    fi
+  done
+done
+
+if [ -n "$need_push" ]; then
+  for package in $need_push; do
+    echo "W: Package $package needs to be pushed!"
+  done
+fi
+
+if [ -n "$need_pull" ]; then
+  echo "Packages that need to be pulled: $need_pull"
+  for package in $need_pull; do
+    echo "Updating $package ..."
+    (cd $package && git pull)
+  done
+fi
+
+echo "Cloning new packages.."
+mr checkout
+

-- 
pkg-ruby-extras.git



More information about the Pkg-ruby-extras-commits mailing list