MATLAB: Path management for different versions of projects

idemanagementpathsource controlversion

Imagine that you develop a large Matlab program, which uses hundrets of functions. To keep the different modules independent from eachother, the corresponding functions are store in separate folders, e.g.:
project1\gui\
project1\calculations\
project1\export\
During the development your create different version of e.g. the GUI and the export functions and get this hierarchy:
project1\gui1.01\
project1\gui1.02\
project1\calculations\
project1\export1.01\
project1\export1.02\
project1\export1.03\
Which tools are you using (do you recommend) to manage these folders in your MATLAB path? Do your tools consider dependencies, e.g. export1.03\ needs gui1.02\ or higher?
Due to the different folders GENPATH does not match. If you're working on project2\, project3\, etc., using the PATHTOOL and storing the different path strings does not work also, because the versions of the different projects cannot be set independently.
I've written a tool for this job, but it is far too specific and complex to be published. In addition it includes folders of the compiled MEX files for the different Matlab versions and patchs of the toolbox functions (e.g. a TYPECAST and BSXFUN for Matlab 6.5). Using a standard source control system helps to manage the files, but I did not find a comfortable method to care about the set of folders in the MATLAB path. Some of my projects are used for clinical studies and the users must be able to reproduce the results for 10 years after a publication. "Sorry, I cannot get my old source control system to run under Window 14" is not an option.
I think this is a common problem and therefore I'm interested in your solutions.

Best Answer

In my MyStartup.m I have a call to a function LOADPROJECTS that lets me choose projects, then the paths required gets added to the matlab path. To my LOADPROJECTS I also have EDITPROJECTS, ADDPROJECTS, etc. So I can set up the paths for Project6p5 then unset and set the paths for Project7p2p.
Maybe you're asking for something more extensive, but this covers my current needs to keep separate versions apart. I'd be very interested in hearing what others do.