Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What Source Control Has MATLAB Integration?

I am using MATLAB R2008a and I want to know what source control has integration with it. I've heard Visual Source Safe is not so good. Does Subversion have integration with it?

like image 647
iddober Avatar asked Sep 08 '09 09:09

iddober


People also ask

Where is source control in MATLAB?

On the Home tab, in the Environment section, click Preferences. Select MATLAB > Source Control > Git.

What is source control integration?

Source control integration lets you easily collaborate with your team, track changes, and roll back to earlier versions of your runbooks. For example, source control allows you to synchronize different branches in source control with your development, test, and production Automation accounts.

Does MATLAB have version control?

You can use MATLAB® to work with files under source control. You can perform operations such as update, commit, merge changes, and view revision history directly from the Current Folder browser.


1 Answers

I wouldn't worry about the Matlab source control integration. It's convenient, but not necessary.

Every modern source control system has one or more GUIs built for it, which will usually be more powerful than the generic source control GUI that Matlab provides. And most have command line utilities which expose the full power of the system. You can use these by getting them on your system path and then calling them from Matlab with "!". Or you can write your own M-code wrapper functions that call your source control utilities. As a convenience, these can support partial paths by using "which", like so.

function checkin(infile, comments)
file = which(infile);
if ~exist(file, 'file')
    error('Not a file: %s (resolved to %s)', infile, file);
end
cmd = sprintf('cvs commit -m "%s" %s', comments, file);

For external tools, if they make changes to files or dirs and Matlab doesn't see them (e.g. if you're on a network drive that's exhausted its change notification handles), you can use path(path) to force Matlab to rescan.

So, pick your source control system on its own merits (as long as it exposes its functionality in the command line or ActiveX controls), and then wrap it if you feel the need and Matlab doesn't already integrate it. I've worked with CVS, ClearCase, and AccuRev this way, and we've always ended up using the version control tools directly or through custom wrappers instead of the Matlab integration.

like image 105
Andrew Janke Avatar answered Oct 14 '22 09:10

Andrew Janke