Re: [Flightgear-devel] download_and_compile.sh one git repository or serveral.

2013-02-27 Thread Pat
On Mon, 25 Feb 2013 12:19:54 +0100
Stefan Seifert n...@detonation.org wrote:

 On Sunday 24 February 2013 22:18:05 Pat wrote:
 
Anders made a suggestion on IRC I'm going to follow up on. 
You can have local git clones that share the same .git/* files
via file links
   
   ..you feed 4 build trees from 1 git clone, how?
   A du -sch $git-n-build-trees on them all? - Arnt
 
 You probably don't want to symlink all the files in .git. You just
 want to symlink the objects subdirectory. This is the place where all
 the real data is and it would be the same for all local repositories.
 The other files list for example branches and tags and very
 important: the currently checked out branch. So if you want several
 local repositories with different branches checked out, you may not
 share these files.
 snip
 Stefan

Thanks! With the one above, and one each from Anders and James, I now
have three good suggestions with two alternative new approaches to look
into.  

However this may all be moot unless the new approaches save
considerable time and effort down the road.  I'm not sure they would
so I'm not going to pursue them at this time.

My original purpose was to avoid  cloning from git for each test build.
I'm using download and compile.sh to create builds for several sets of
option combinations.  Do this for more than one version and you end up
with more than enough complete copies of git to satisfy an army of
coders.

This wastes bandwidth on gitorious. 

I'm thinking that one local git for each version (next, master, maint 
2.10.0 ) is simple enough.  Its four copies of git but that's not too
bad... I can make change to the script to allow concurrent separate
builds with different options off these separate gits without too much
change.

The single git method could come later if anyone thinks it's worth
doing.
 

 -Pat

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] download_and_compile.sh one git repository or serveral.

2013-02-27 Thread Pat

I thought there would be a benefit to moving fgdata out from under
${CBD}/install. Currently, if you do mulitple builds with different
options in different folders, you end up with multiple copies of the
same version of fgdata, even though a related build has a perfectly
good copy.


I've got it set up like this:

build/
download_and_compile.sh
fgdata-2.11.0
fgdata
fgdata-2.10.0
fgdata
master  
install
fgfs
fgdata symlink

stable
install
fgfs
fgdata symlink

stable-e
install
fgfs
fgdata symlink
stable-ei 
etc.

I'm trying this out and will send a patch when its working right.

-Pat

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


[Flightgear-devel] download_and_compile.sh one git repository or serveral.

2013-02-25 Thread Pat

  patch-1.9-8-xv.patch adds the x and v options for debugging.  

  patch-1.9-8-w.patch adds the w option, w standing for Where to
  Build
  patch-1.9-8-wxv.patch combines both changes.
 
 ..alongside those, I like to see _what_ I build|t _when_, so I
 auto-rename my logs, and I believe -s should build 2.10 now:
 arnt@celsius:~/FG-git$ ll download_and_compile-1.9-8a.patch \
 md5sum download_and_compile-1.9-8a.patch 
 -rw-r--r-- 1 arnt arnt 1441 Feb 24 23:24
 download_and_compile-1.9-8a.patch 
 a342d108f121322f076ef7de063ab1e4  download_and_compile-1.9-8a.patch
 arnt@celsius:~/FG-git$ 
 
how about two types of logging:
1. Timestamped record of the start,finish and status of
   each run
2. full log with logrotate feature


  Anders made a suggestion on IRC I'm going to follow up on.  You can
  have local git clones that share the same .git/* files via file
  links
 
 ..you feed 4 build trees from 1 git clone, how?  
 A du -sch $git-n-build-trees on them all?  
 
 I'm just learning how to work with git, one
baby step at a time.  I'm sure the suggestion is valid.  My
interpretation of it may not be.

From what I'm reading its possible to have multiple source trees
working off one git repository.  You'd do the git operations as usual.
Again, I'm not sure how all this works but I'm learning.

Does anyone have a script for something like this for any application?


  I think that means we could have several local clones of a single
  local git repository.  The various local clones would support
  building multiple branches and  versions, without having to sync
  each clone independently with gitorious.
 
 ..you only do an e.g. git branch 2.10 ;git checkout, 
 and no git pull???
 
Its a good bet the usual git operations will apply.

Thanks
Pat

There's an old joke about a city guy asking a farmer how to get to a
nearby town.  The farmer looks at him with a straight face and replies
You can't get there from here.  I'm the city guy.



--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] download_and_compile.sh one git repository or serveral.

2013-02-25 Thread Stefan Seifert
On Sunday 24 February 2013 22:18:05 Pat wrote:

   Anders made a suggestion on IRC I'm going to follow up on.  You can
   have local git clones that share the same .git/* files via file
   links
  
  ..you feed 4 build trees from 1 git clone, how?
  A du -sch $git-n-build-trees on them all?

You probably don't want to symlink all the files in .git. You just want to 
symlink the objects subdirectory. This is the place where all the real data is 
and it would be the same for all local repositories. The other files list for 
example branches and tags and very important: the currently checked out 
branch. So if you want several local repositories with different branches 
checked out, you may not share these files.

So in essence, you have one plain normal clone of the repository:
git clone git://... fg-master

For the other repositories, you could set them up like:

# create a local clone (no download)
git clone fg-master fg-whatever

# copy the config of master so both use gitorious as remote
cp fg-master/.git/config fg-whatever/.git/config

# replace objects in the clone by the symlink
rm -Rf fg-whatever/.git/objects
ln -s fg-master fg-whatever/.git/objects

Repeat these steps for all the branches you want to test.

This gives you several local clones of the repository which can have different 
branches checked out and which share the meat of the repository data. You can 
work in them just like in any normal repository. Just do the usual git pull / 
git checkout / ...

When you do git pull, git will download new objects and then merge the remote 
into the local branch. It should not matter in which branch you download the 
new objects since git does not change old ones.

Just don't do any history changing like git rebase.

  ..you only do an e.g. git branch 2.10 ;git checkout,

Btw. the shortcut would be just:
git checkout -b 2.10
creates the branch and checks it out.

Stefan

signature.asc
Description: This is a digitally signed message part.
--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] download_and_compile.sh one git repository or serveral.

2013-02-25 Thread Anders Gidenstam
On Sun, 24 Feb 2013, Pat wrote:


 Anders made a suggestion on IRC I'm going to follow up on.  You can
 have local git clones that share the same .git/* files via file
 links

 ..you feed 4 build trees from 1 git clone, how?
 A du -sch $git-n-build-trees on them all?

 I'm just learning how to work with git, one
 baby step at a time.  I'm sure the suggestion is valid.  My
 interpretation of it may not be.

What you want to do is a --local clone, e.g.:
git clone --local ~/FlightGear/build/SimGear/simgear.git

It creates hard links between the (or some) .git/* files in the new and 
origin repositories. It only works if both are on the same file system.

I'm not sure if the repositories continue to share (new) changes when 
these are fetched from upstream. If not you need to run git fetch or git 
pull in first the local origin repository and then in the clone(s) to 
propagate new changes.

Cheers,

Anders
-- 
---
Anders Gidenstam
WWW: http://gitorious.org/anders-hangar
  http://www.gidenstam.org/FlightGear/

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] download_and_compile.sh one git repository or serveral.

2013-02-25 Thread James Turner

On 25 Feb 2013, at 14:54, Anders Gidenstam anders-...@gidenstam.org wrote:

 What you want to do is a --local clone, e.g.:
 git clone --local ~/FlightGear/build/SimGear/simgear.git
 
 It creates hard links between the (or some) .git/* files in the new and 
 origin repositories. It only works if both are on the same file system.
 
 I'm not sure if the repositories continue to share (new) changes when 
 these are fetched from upstream. If not you need to run git fetch or git 
 pull in first the local origin repository and then in the clone(s) to 
 propagate new changes.

Yet another option is:

http://stackoverflow.com/questions/6270193/multiple-working-directories-with-git

Which was also mentioned on IRC - I've tried it with other projects and it 
works just fine, but need a little bit of care, especially avoid having the 
same branch live in both working directories. Essentially it automates creating 
the links described above.

James


--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel