Module: Autoproj::Ops::Tools

Extended by:
Tools
Included in:
CLI::Base, CLI::Bootstrap, Tools
Defined in:
lib/autoproj/ops/tools.rb

Defined Under Namespace

Classes: FakePackage

Instance Method Summary collapse

Instance Method Details

#common_options(parser) ⇒ Object



59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# File 'lib/autoproj/ops/tools.rb', line 59

def common_options(parser)
    parser.on "--silent" do
        Autoproj.silent = true
    end

    parser.on "--verbose" do
        Autoproj.verbose  = true
        Autobuild.verbose = true
        Rake.application.options.trace = false
        Autobuild.debug = false
    end

    parser.on "--debug" do
        Autoproj.verbose  = true
        Autobuild.verbose = true
        Rake.application.options.trace = true
        Autobuild.debug = true
    end

    parser.on("--[no-]color", "enable or disable color in status messages (enabled by default)") do |flag|
        Autoproj.color = flag
        Autobuild.color = flag
    end

    parser.on("--[no-]progress", "enable or disable progress display (enabled by default)") do |flag|
        Autobuild.progress_display_enabled = flag
    end
end

#create_autobuild_package(vcs, text_name, into) ⇒ Object

Creates an autobuild package whose job is to allow the import of a specific repository into a given directory.

vcs is the VCSDefinition file describing the repository, text_name the name used when displaying the import progress, pkg_name the internal name used to represent the package and into the directory in which the package should be checked out.



42
43
44
45
46
47
# File 'lib/autoproj/ops/tools.rb', line 42

def create_autobuild_package(vcs, text_name, into)
    importer = vcs.create_autobuild_importer
    FakePackage.new(text_name, into, importer)
rescue Autobuild::ConfigException => e
    raise ConfigError.new, "cannot import #{text_name}: #{e.message}", e.backtrace
end

#load_autoprojrcObject



49
50
51
52
# File 'lib/autoproj/ops/tools.rb', line 49

def load_autoprojrc
    Autoproj.warn_deprecated __method__, "use workspace.load_autoprojrc instead"
    Autoproj.workspace.load_autoprojrc
end

#load_main_initrb(*args) ⇒ Object



54
55
56
57
# File 'lib/autoproj/ops/tools.rb', line 54

def load_main_initrb(*args)
    Autoproj.warn_deprecated __method__, "use workspace.load_main_initrb instead"
    Autoproj.workspace.load_main_initrb
end