guile-gtk-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: welcome! :)


From: Detlev Zundel
Subject: Re: welcome! :)
Date: Fri, 01 Oct 2010 13:37:22 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Hi Andy,

[...]

> Hm, as Greg (I think) notes, pull-packages doesn't do the right
> thing. 

Nope, that was me.

> Hmm. Anyway, the fixes all look great. I guess we need to figure out
> something different for pull-packages though.

Attached is the best I could come up with.  I'm really uncomfortable
about the setup (mis-)using branches for entirely disjunct sub-projects.
Did anyone ever look into "git submodules"?  Maybe I have to do this now
for real ;)

Cheers
  Detlev

-- 
As  far as  the laws  of mathematics  refer to  reality, they  are not
certain; and as far as they are certain, they do not refer to reality.
                                            -- Einstein
>From ce4a68023b7468b89471a6b565c1ec82b6f35746 Mon Sep 17 00:00:00 2001
From: Detlev Zundel <address@hidden>
Date: Fri, 1 Oct 2010 13:28:50 +0200
Subject: [PATCH] scripts/pull-packages: Correctly pull sub-projects also.

In order to update the sub-projects mapped to branches in our repository,
we have to propagate the remote changes into our local branches first
before the sub-projects can pull from these.

In order to do this, we have to do a "git pull" on every local branch.
Unfortunately for this we need to checkout the branch, so this is somewhat
file intensive.

With the current setup I fail to see an easier way to achieve correct
semantics.

Signed-off-by: Detlev Zundel <address@hidden>
---
 scripts/pull-packages |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/scripts/pull-packages b/scripts/pull-packages
index 141b962..e1a470d 100755
--- a/scripts/pull-packages
+++ b/scripts/pull-packages
@@ -5,10 +5,27 @@ root=`cd $(dirname $0)/.. && pwd`
 echo "$root: git pull $@"
 ( cd $root; git pull "$@" )
 
+# We must be in branch 'master' as this script exists only there.  We
+# need this for later
+need_stash=`git status --porcelain`
+if [ -n "$need_stash" ]; then
+    echo "Setting aside local changes while merging branches"
+    git stash save "stashed away by scripts/pull-packages"
+fi
+
 for dir in $root/*; do
     if test -d $dir -a -d $dir/.git; then
         package=`basename $dir`
+        echo "git checkout $package; git pull"
+       git checkout ${package}
+       git pull
         echo "$root/$package: git pull $@"
         ( cd $dir; git pull "$@" )
     fi
 done
+
+git checkout master
+if [ -n "$need_stash" ]; then
+    echo "Recovering local changes"
+    git stash pop
+fi
-- 
1.7.1


reply via email to

[Prev in Thread] Current Thread [Next in Thread]