require 'reap/systems/subversion' module Reap class Manager # Branch current version. # # message Optional commit message. This is intended for commandline # usage. (Use -m for shorthand). # # TODO: How should metadata.repository come into play here? def svn_branch(options=nil) options = configure_options(options, 'scm-branch', 'scm') svn_system.branch(options) end # Tag current version. # # message Optional commit message. This is intended for commandline # usage. (Use -m for shorthand). # # TODO: How should metadata.repository come into play here? def svn_tag(options=nil) options = configure_options(options, 'scm-tag', 'scm') svn_system.tag(options) end # Create changelog. # # change File path to store rdoc formated changelog. Default is 'log/changelog.txt'. # xmlchange File path to store XML formated changelog. Default is 'doc/log/changelog.xml'. # # Set either to false to supress creation. def svn_log(options=nil) txtlog = options['txtlog'] xmllog = options['xmllog'] svn_system.log(txtlog) svn_system.log_xml(xmllog) if xmllog end private # Branch current version. # # repository Developers URL to repository. Defaults to Rubyforge address. # username Username. Defaults to ENV['RUBYFORGE_USERNAME']. # protocol The URL protocol to use. Defaults to "svn+ssh". # prefix Prefix to use on tag folder. Default is no prefix. # tagpath Directory to store tags. Defaults to tags/. # branchpath Directory to store branches. Defaults to branches/. # def svn_system @svn_system ||= ( options = configuration['svn'] || {} rubyforge = configuration['rubyforge'] || {} options['repository'] ||= metadata.repository options['dryrun'] ||= dryrun? options['project'] ||= rubyforge['project'] || metadata.project options['version'] = metadata.version Subversion.new(options) ) end end end