require 'build-tool/application' require 'build-tool/commands' module BuildTool; module Commands; class CtagsError < BuildTool::Error; end # # BuildCommand # class Rebase < ModuleBasedCommand include MJ::Tools::SubProcess name "rebase" description "rebase local checkout against previously fetched remote changes." long_description [ "Invokes the rebase phase for the specified modules." ] # Log this command if $noop is not active def log? ! $noop end def applicable? BuildTool::Application.instance.has_recipe? end def initialize_options @options.banner = "Usage: #{Pathname.new($0).basename} #{self.fullname} MODULES..." super end def is_module_ready?( mod ) isready = true if !mod.checkedout? logger.info "#{mod.name}: Skipping: Not checked out." else isready &= mod.ready_for_rebase if !mod.vcs.fetching_supported? logger.info "#{mod.name}: Skipping: Rebasing not support by #{vcs.name}" end end return isready end def do_execute_module( mod ) if mod.checkedout? and mod.vcs.fetching_supported? logger.info "Skipping: Rebasing not support by #{vcs.name}" rebase( mod ) else logger.info "Skipping: Not checked out." end end end # class Build end; end # module BuildTool::Commands