[Geany-devel] Stub project files for sharing

Nick Treleaven nick.treleaven at xxxxx
Thu Nov 3 14:45:23 UTC 2011


Hi,
I think I can improve on Lex's recent proposal to split up project 
settings into two files, one for version control and one for local changes.

The problems with that are:

* How do we decide which settings are in each - e.g. build menu commands 
- a project might want to override the make command in the VC settings 
file, but the user will want to add their own build commands too. 
There's a conflict. This becomes increasingly messy as we add project 
settings.

* Backwards compatibility - we would need to handle existing project 
files anyway, which makes code more complex. I don't think we need to 
break compatibility.

* If the user changes a setting which is stored in the VC file they may 
end up committing it, or perhaps sometimes not even realizing they are 
overriding the VC setting.

My solution:

A foo.geanystub project file goes in version control. It is never 
written to. It should be prepared by manually editing a copy of a local 
project file.

On opening a foo.geanystub file, Geany creates foo.geany in the same 
path then opens it.

When opening foo.geany, if foo.geanystub exists, then override settings 
with the stub contents.

This way the VC file can decide which settings are not overridable.

My solution shouldn't require much code to implement. I've only noted 
the bare bones of it, there are some things that could be added to make 
it better. Even with these I think it's simpler and neater.

Nick



More information about the Devel mailing list