Revision control

From ENIGMA
Jump to navigation Jump to search

According to Wikipedia, "Revision control, also known as version control and source control... is the management of changes to documents, programs, large web sites and other information, where a team of people may change the same files." Changes are logged in multiple #revisions of code can be stored and recalled from anywhere at any time, similar to Wiki software. ENIGMA and LateralGM originally used #Subversion for collaborating between developers and distributing updates amongst testers, but has since moved to #Git.

Revision

Different versions of software/files with relatively minor modifications are differentiated in a micro-versioning method called Revisions, especially as it pertains to Subversion, Git, and Wiki. Developed software can have hundreds, and even thousands, of revisions. The latest revision is called the head revision, and it's usually what you deal with when you wish to get the bleeding-edge latest developor's version, such as when checking to see if a bug has been corrected, or for getting the latest and greatest set of features. Sometimes, however, bleeding-edge revisions will introduce bugs, making it desirable to continue using an older revision.

Repository

A repository is where all code changes (revisions) are stored. Usually there is some sort of main or central repository for the main project, from which you will either fork or checkout to get your own working copy which you can make changes on. The official repository URLs for each project are:

Clients

Should you choose to download software from its repository, you will need a client. Note that this is not the preferred method of downloading or updating ENIGMA for typical use: downloading/installing should be handled by a installation package, if available, documented at the Install page; updating is either handled by the same package, or with the in-built automatic update mechanism, neither of which depend on a client. Otherwise, the installation process is documented on the relevant install page:

Subversion

Subversion is a centralized revision control system. You keep a working copy, but all changes are sent to, and received from a single central repository. This is a simple and popular system for projects with a coordinated team, and used to be the system of choice for ENIGMA and LateralGM, until we learned how to use git. Now, both projects are maintained in a Git repository. Because of this, obtaining Subversion should no longer be necessary.

Linux usually provides a command-line subversion client in its package manager. For instance, if it's not already installed,

  • Apt-get: sudo apt-get install subversion
  • Yum: sudo yum install subversion
  • Pacman: sudo pacman -S subversion
  • Pkg: sudo pkg ins subversion

There are also Graphical clients, if you are less inclined to using the command line, or if your platform doesn't provide an easy way to get a simple command-line client. We recommend one of the following cross-platform clients:

A more comprehensive list of subversion clients is available on Wikipedia, but you are on your own for figuring out how to use them.

Git

Git is a distributed and fast revision control system. Your working copy is an entire repository in itself, and you may send your changes upstream to another, more centralized repository, which may or may not be the main project's repository (if not, they may further submit their changes to the main project's repository). This is perfect for micro-managed teams or people who just want to do their own thing, which may or may not be in line with the main project's vision. Because of the freedom that this system gives, it has become the new system of choice for ENIGMA and LateralGM.

Downsides: Some coordination is still necessary to prevent everyone from splintering off and doing their own thing. The learning curve can be a little steep at first, but this wonderful guide makes it a piece of cake, even if you do have to keep looking back to reference it.

Linux usually provides a command-line git client in its package manager. For instance, if it's not already installed,

  • Apt-get: sudo apt-get install git
  • Yum: sudo yum install git
  • Pacman: sudo pacman -S git
  • Pkg: sudo pkg ins git

For graphical clients, if you're less inclined to use the command line, you might try TortoiseGit, although it appears to be Windows only. Also, gitk is a very popular graphical git tool to have. The Eclipse standard plugin tool is EGit, but it can be difficult to figure out. For the most part, you're on your own as far as graphical clients go. We recommend you just familiarize yourself with the command line, because it's not that difficult.

Why Git

For the purposes that we kept running into, Git has a clear advantage. Whereas SVN "just works" and git is more complex (or steeper learning curve), once you get the hang of Git (which we have quickly done with the help of some wonderful git tutorials - namely, this one), it's the clear winner, providing elegant solutions to things that we hacked around in SVN in the past - such as subprojects and forks.

And all this, considering that User:IsmAvatar was a diehard SVN fan, with a little loathing for the complexity (and documentation overflow) of git. Now she's converted pretty much all of her projects to Git. Read the tutorial, and it's really not that much of a hastle after all.

Further discussion on the conversion from SVN to Git as it relates to this project can be found in the Forum Announcement Topic.