|
|||||
|
|||||
SCM Extensions
Source Control Management (SCM) pluginsThis is a guide for people who want to write a new SCM plugin for DamageControl. Writing the SCM classDamageControl relies on the RubySCM API for interaction with underlying SCMs. To prove compliance with the RubySCM API we have written a test suite that you can use. If your class passes that test suite, Write a test class that uses RubySCMs test suiteand a skeleton of your SCM class Try to run the test: This will probably fail, and it is time to fix the first error - implement the create method. Run the test again. Assuming your code is correct, you should now get a different error, which should lead you to If your SCM's command line interface writes output that needs to be parsed, we recommend you implement the parsing RubySCM APIHere is a more detailed description of the required methods in the RubySCM API. create(&line_proc)(Local method) Parameters
import(import_dir, &line_proc)(Local method) Parameters
checkout(checkout_dir, scm_from_time, scm_to_time, &line_proc)(Regular method) Parameters
Return values
commit(checkout_dir, commit_message, &line_proc)(Local method) Parameters
RubySCM optional APIIf the SCM supports triggers, you can implement the following methods to allow installation (and uninstallation) of install_trigger(trigger_command, trigger_files_checkout_dir, &line_proc)This method should install the trigger command in such a way that it is executed when a commit to the SCM occurs. Parameters
trigger_installed?(trigger_command, trigger_files_checkout_dir, &line_proc)This method should return true if the trigger_command is installed, otherwise false. uninstall_trigger(trigger_command, trigger_files_checkout_dir, &line_proc)This method should install the trigger command in such a way that it no longer executed when a commit to the SCM occurs. Web interfaceIf you write your own SCM plugin you would probably also want the DamageControl web admin to display it as a supported SCM in the project configuration pages. Every SCM has its own set of values that needs to be specified in order to check out code. To enable your SCM to be configured from the web you need to implement something we call an SCMWebConfigurator. See CVSWebConfigurator for an example on how to implement one. Basically you need to create an To inform the DamageControl server about your new SCM you edit CreditIf you contribute all of this with unit tests (see the SVNTest.rb and SVNLogParserTest.rb for inspiration) you will earn lots of DamageControl points. If you know how to write working code, but not how to write unit tests, we'd of course be happy to accept your contribution regardless. If you don't know RubyIf all of this is too big a task for you you can still contribute. The DaamageControl development team doesn't have acces to or knowledge of every single SCM out there. But we'd be able to implement this for you if you help us out with some extra information such as:
Please contact us on dev@damagecontrol.codehaus.org for further information. |
|||||
|
Copyright 2003-2006 - The Codehaus. All rights reserved unless otherwise noted.
Powered by Atlassian Confluence
|
|||||