Cruise_logo_large

Source Control

Cruise Control currently ships with only Subversion support. Mercurial and Git support is planned for the next release.

Configuring Subversion

If you want to configure Subversion, you can do it in your cruise_config.rb file.

Project.configure do |project|
  project.source_control = Subversion.new
end

Since Subversion is the default, you shouldn’t have to specify this. However, you might want to in order to change the default settings.

By default cruise checks externals for changes. If you don’t want it to, you can turn it off like this:

Project.configure do |project|
  project.source_control = Subversion.new :check_externals => false
end

Adding other source controls

We have NOT actually tested this. However, we’ve thought a lot about it, hopefully enough to give you a good place to start.

To use another source control system, you will need to implement the “source_control” interface Subversion does, it will be something like (check the subversion.rb for the uptodate interface) :


  checkout(target_directory, revision = nil)  # you don't need checkout
  latest_revision(project)
  revisions_since(project, revision_number)
  update(project, revision = nil)

you should be able to create a project directory in


  CRUISE/projects/PROJECT_NAME

and in that project directory, create a cruise_config.rb file that has something like this in it :


Project.configure do |project|
  project.source_control =
      Perforce.new(:user => 'cruise', :password => 'something cute')
end

where you replace “Perforce” with your source control class. for now, you’ll also have to manually checkout your project to


  CRUISE/projects/PROJECT_NAME/work

However, once we support a couple different source controls, we should add a flag to ”./cruise add …” that will let you specify which to use as well as options for it.

Anyway, that should do it. Try it and let us know how it goes!