Checkout mbed Workspace Version Control!


The new beta version of the mbed Online Compiler now lets any of your programs start using Version Control by simply making your first commit. Here is a video for an intro to some of the features in action:

As you can see, it is now pretty simple to use version control on your programs to let you version, branch and merge code, with a nice representation of the state of your project history:

http://mbed.org/media/uploads/simon/_scaled_version-control.png

The approach we're taking should be familiar to those of you with experience of distributed version control models (as used by mercurial/git); each program has its own local repository, so you can commit and perform actions on it within your own workspace (such as updating, branching, showing changes).

The main things you can do so far include:

  • Commit a version of your project, and view the revision history
  • View changes a version made, and compare changes between versions
  • Update or revert to a different version
  • Branch and merge

Note that you can't do any collaboration aspects with this yet; no pulling, pushing, named branches etc; it is all just local to your workspace project for now. This beta is stage one of a number of features we'll be adding that will eventually form the backbone of collaborative development.

Here is a quick outline of the functionality:

Your program, as before, is the "Working Copy". You can "Commit" changes to its local repository to create new "Revisions". You can see the changes between your current working copy to the previous revision, and changes between revisions.

/media/uploads/simon/_scaled_screen_shot_2011-06-14_at_21.08.49.png

You can choose to "Update" to a particular revision, which updates your working copy to that revision (e.g. a state of your program in the past). This is the way you can "Branch"; do some commits, update to a previous revision, do some more commits; you now have two branches of development derived from a common revision.

You can then "Merge" a revision, often the head of one branch, in to your working copy. This creates a working copy that is the merge of these two branches, and when you commit, your back to one (less) branch of development.

There is also the option to "Discard" your working copy, and "Revert" your working copy to a particular revision; unlike "Update", this creates a working copy with the changes you need to get back to that previous state, more like an "undo" than a branch.

To test it out, enable betamode by visiting the betamode link at the top of the page when you are logged in.

Hope you like it! Any bug reports to the forum as usual.

3 comments on Checkout mbed Workspace Version Control!:

15 Jun 2011

Cool! Thanks for great work! Is there any way to access versioning information as a string to be compiled into the binary. So I can deduce the versioning information of the source files from a binary?

15 Jun 2011

Much needed improvement. I used to have to do this manually by downloading a .zip file each evening. Good work, guys!

15 Jun 2011

Will any direct access to the repository be allowed? I think you should allow this.

You need to log in to post a discussion