Re: welcome! :)
Detlev Zundel <[email protected]> Fri, 01 Oct 2010 13:37:22 +0200
| Newsgroups | gmane.lisp.guile.gtk |
|---|---|
| Organization | Church of Emacs - Missionary division |
| Message-ID | <[email protected]> |
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
_______________________________________________
guile-gtk-general mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/guile-gtk-general
0001-scripts-pull-packages-Correctly-pull-sub-projects-al.patch
(text/x-diff, 1.7 KB)
From ce4a68023b7468b89471a6b565c1ec82b6f35746 Mon Sep 17 00:00:00 2001 From: Detlev Zundel <[email protected]> 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 <[email protected]> --- 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