[Dune] Using a dune project create with v2.1 with the trunk

Felix Albrecht felix.albrecht at uni-muenster.de
Tue Mar 20 12:04:59 CET 2012


If you are familiar with git [1], you could make use of the git
submodule feature [2] (as we do quite a lot). The general idea is the
following: consider your dune-module to be dune-foo, you would create a
git repository dune-foo-super. Its layout would be

dune-foo-super/
  dune-common
  dune-istl
  ...
  dune-foo
  config.opts

where each folder is a git repository itself. These are maintained as
git-submodules inside the super repository. In a way the super
repository only keeps track of the different commit hashes of the
submodules. So for every commit of your module dune-foo the supermodule
knows all the right versions of the other submodules that are required
for your module to work.

In practice it works like this:
* you clone the super module dune-foo-super
* you call 'git submodule update --init'
  This clones all the git repositories of the submodules and
  checks out the right versions
* you are done

Once you need a newer dune version you would commit your module dune-foo
and would check out the newer dune version inside the submodules folders
and then commit this set of versions in your supermodule.

Of course this requires some knowledge of git so that you can really
benefit instead of invest too much time. But since we already have git
mirrors of all major dune modules in the Dune User Wiki (i.e.
dune-common [3]) and setting up a git-svn [4] clone of your dune module
is quite easy it might be worth a look...

Greetings,

Felix Albrecht

[1]: http://git-scm.com/
[2]: http://book.git-scm.com/5_submodules.html
[3]: http://users.dune-project.org/projects/dune-common/repository
[4]: http://schacon.github.com/git/git-svn.html

On Tue, 2012-03-20 at 10:43 +0000, Eike Mueller wrote:
> Dear dune-list,
> 
> if I created a dune project with version 2.1, can I still use this with 
> the trunk? Obviously, I need to adapt my source code, so I will need to 
> put in some preprocessor flags to check the version at compile time, but 
> it would make code a lot management easier if I do not end up with two 
> different dune projects in my svn repository. Or is putting the entire 
> dune project under version control (obviously not including the files 
> that are generated by automake/configure/make) a bad idea anyway?
> 
> I will need to use dune-geometry, which did not exist in 2.1, so I 
> suspect that it will not work and I will have to create an entirely new 
> project, with DUNE_CONTROL_PATH set to the trunk installation and using 
> the duneproject executable from the trunk, then copy my source code 
> across and maintain this separately.
> 
> Thanks for any ideas,
> 
> Eike
> 
> _______________________________________________
> Dune mailing list
> Dune at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune

-- 
--
----------------------------------------------------------- 
 Felix Albrecht 

 Institut fuer Numerische und Angewandte 
 Mathematik, FB Mathematik und Informatik 
 Universitaet Muenster, Room 120.012 
 Orleans-Ring 10 
 D-48149 Muenster 

 Tel.: +49 251 83 35130 
 Fax:  +49 251 83 32729 
 Mail: felix.albrecht at uni-muenster.de 
 WWW:  www.uni-muenster.de/math/u/felix.albrecht/ 
-----------------------------------------------------------





More information about the Dune mailing list