Selecting a Source Control Management (SCM)
Source Control Management (SCM) is better known as revision control management. Redmine currently supports the following revision control systems: Subversion (SVN), Git, Mercurial, Bazaar, Darcs, and CVS.
As it has been mentioned, Redmine can use SCMs not just as source code readers. It can also associate a revision with issues (and have revisions listed on issue pages). It can close an issue automatically and/or change its done ratio when an appropriate commit is made to the repository. It allows us to use the Wiki syntax in commit messages. It also allows us to refer to a revision, a commit, or a file from any Wiki-syntax-powered content, which can be a Wiki page, an issue description, a project description, a forum message, and so on. But all this makes Redmine an (advanced) source code browser, not an SCM manager (which can be done with plugins though). Then why is choosing the right SCM so important?
Most likely, you will want a deeper integration between Redmine and SCMs as soon as you know the options. Thus, it can be said that Redmine supports three levels of integration:
- Redmine as a source code browser
- Redmine as an SCM authenticator
- Redmine as an SCM manager
The basic code browser level requires corresponding SCM clients to be installed on the same server on which Redmine is running, so you may want to use only some of the supported SCMs. Also, the basic support is not equivalent for all SCMs. Thus, the revision graph (similar to the one on GitHub; see the following screenshot) is supported only for Git and Mercurial. Also, these two SCMs can be only local (repositories should be on the same server where Redmine is).
Also, Redmine comes with Redmine.pm
—a Perl module for the Apache web server that can be used to authenticate Subversion, Git, and Mercurial users against Redmine. If the Redmine.pm
tool has been integrated, you can control who has access to the project's repository and what kind of access (read or write) they can have by simply managing project members (and roles). Something similar (with additional changes made to Redmine and/or the system) can also be achieved for Bazaar. However, Subversion and Git SCMs are best supported by the Redmine.pm
tool and their support works out of the box. At the same time, you will most likely have problems configuring other SCMs to authenticate against Redmine.
The only missing functionality for Redmine to become a full-featured SCM manager is the ability to create repositories. But such functionality also comes with Redmine and is provided by the reposman.rb
command-line tool. This tool supports Subversion, Darcs, Mercurial, Bazaar, and Git (that is, all except CVS). However, the problem with it is that to make it work, you need to create a cron job that will execute this tool periodically. Luckily, alternative solutions that do not have such problems are provided by third-party plugins such as SCM Creator and Redmine Git Hosting (see also Chapter 10, Plugins and Themes).
When choosing SCM, you should also consider your requirements, your experience, the preferences of your team or audience, ease of use, and so on. However, the best integrable SCMs seem to be Subversion and Git.