Imagine the following scenario: user A is developing a project with documentation in workbench. She wants to share her (unfinished) work with a small group (4-5) of users (B,C,D,E) , so that all users can work on the project simultaneously. The users might have different operating systems and work in different places, connected on internet. The users have heard that WB supports CVS technology, but they know next to nothing about it, assuming that it is the right thing to use. The users have Workbench (not Eclipse + WB plugin or other fancy setting) and would like to stay that way. So what is the best way to accomplish all this with Workbench?

Please assume that the users only know Mathematica and Workbench and little else in this field, and that they would prefer to use WRI tools only.

There is a similar question here in MMA.SE, but it looks to me more like a high level discussion between experts and does not seem to be very helpful for absolute beginners in this area

  • 1
    $\begingroup$ So many restricting assumptions... Isn't that a bit too localized? The trend is to go with a distributed source control version, but even CVS is better than nothing. Also, perhaps WB could be persuaded to instal EGit. $\endgroup$
    – Ajasja
    Apr 11, 2013 at 18:57
  • 3
    $\begingroup$ You need a CVS server. $\endgroup$ Apr 11, 2013 at 19:12
  • 1
    $\begingroup$ It would likely be less hassle to switch to (learn) Git or Mercurial and use free (or not free) web-based services such as GitHub or Bitbucket, than to maintain your own CVS server. There are no short-cuts here, the team members will have to learn at least the basics of some version control system and how to use it in WB. By the way, it is not necessary to integrate it with WB - what I usually do is to use a separate CVS (or SVN, or Git) client. $\endgroup$ Apr 11, 2013 at 19:15
  • $\begingroup$ @Leonid And out of Git/Mercurial I'd recommend Mercurial because there's a client which already supports Mathematica notebook diffing: TortoiseHg. Also, the Hg documentation and community just feels friendlier than git ... $\endgroup$
    – Szabolcs
    Apr 11, 2013 at 19:21
  • 1
    $\begingroup$ @Szabolcs Not sure if I consider this an advantage, since I think that sensible development should not be based on notebooks in any case. I also have this project to drastically simplify versioning for Mathematica projects, based on Githib gists, so if I ever finish it, this may be an option - but it will work directly from Mathematica, not WB. $\endgroup$ Apr 11, 2013 at 19:24

1 Answer 1


This is my personal opinion, taking into consideration that you need an easy to learn solution and that you are working with documentation notebooks and not plain code (.m files), so it's more difficult to effectively diff them.

Using version control may be beneficial for your project. The main reason is that it will make it easy to keep track of who changed exactly what.

However, I do not recommend that you use Workbench for this because the tools available for it (eclipse plugins) will not be friendly to Mathematica notebooks. They will not make it possible for you to compare two Mathematica notebook and see what has changed in a human readable way, so you would lose the main benefit.

There are tools that make it possible to diff two Mathematica notebook graphically: the old AuthorTools` package and the NotebookTools`NotebookDiff function which is included by default (no packages needed) and seems to do exactly the same as AuthorTools. To use these tools manually is too much trouble, and to set them up to work with a version control system is again not user friendly. So I recommend that you use version control tools which already support Mathematica's diffing tools out of the box.

Such tools do exist: TortoiseSVN for Windows knows how to diff Mathematica notebooks out of the box---no setup needed. ToirtoiseHg has borrowed the same code from TortoiseSVN. The Git tools are generally less user friendly on Windows and as far as I know they didn't borrow the Mathematica diffing tools from TortoiseSVN. Of SVN and Hg I suggest Hg because there are free and popular services that give you Hg hosting, so you can synchronize your repositories. BitBucket is nice and offers public repositories with many users or private repositories with no more than 5 users.

To sum up:

  • I recommend that you use Mercurial (Hg) and use BitBucket or a similar service to synchronize your repositories.

  • I do not recommend using the Workbench for version control (there are many plugins, but they're not user friendly enough and they don't support Mathematica specifically). Use TortoiseHg which has support for Mathematica out of the box on Windows (not on other operating systems).

  • This will make it easy to keep track of changes, see what has been changed precisely and who has changed it, or to go back to previous revisions. However, there will still be a learning curve. I think this will be manageable for your collaborators.

Using any kind of version control will require people to learn a bit about it. Perhaps it's simpler to just use a shared Dropbox folder. This will make sharing the documents much easier (no need for email any more), it's very user friendly, and you have the option to revert to previous versions (for up to 30 days, I think). Disadvantage: you can't see at a glance what exactly was changed; it'll only tell you which file was changed, but not which part of the file.

Personally I use Dropbox when my collaborators are not familiar with version control. For short term projects where you don't really need long term history it's more productive.

  • $\begingroup$ thank you @Szabolcs, I am familiar with dropbox. I was hoping for more advanced features with SVN native in WB $\endgroup$
    – magma
    Apr 11, 2013 at 19:27
  • $\begingroup$ ehm..I meant CVS native in WB $\endgroup$
    – magma
    Apr 11, 2013 at 19:33
  • $\begingroup$ @magma I use (in addition to WB CVS plugin, and as an alternative) the SmartCVS client (its free version), and find it quite nice. They also have clients for other version control systems (I use their SmartGit too). You don't have to tie it to WB. $\endgroup$ Apr 11, 2013 at 19:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.