Class: BuildTool::VCS::MercurialConfiguration

Inherits:
BaseConfiguration show all
Defined in:
lib/build-tool/vcs/mercurial.rb

Instance Attribute Summary collapse

Attributes inherited from BaseConfiguration

#module

Instance Method Summary collapse

Methods inherited from BaseConfiguration

#local_path, #remote_path, #repository

Constructor Details

#initialize(mod = nil) ⇒ MercurialConfiguration

Returns a new instance of MercurialConfiguration.



16
17
18
19
# File 'lib/build-tool/vcs/mercurial.rb', line 16

def initialize( mod = nil )
    super( mod )
    @remote = {}
end

Instance Attribute Details

#remoteObject

Returns the value of attribute remote.



14
15
16
# File 'lib/build-tool/vcs/mercurial.rb', line 14

def remote
  @remote
end

Instance Method Details

#branchObject



27
28
29
# File 'lib/build-tool/vcs/mercurial.rb', line 27

def branch
    self.module.remote_path
end

#copy_configuration(other) ⇒ Object



31
32
33
34
# File 'lib/build-tool/vcs/mercurial.rb', line 31

def copy_configuration( other )
    super
    @remote = {}     # Do not copy the remote
end

#nameObject



10
11
12
# File 'lib/build-tool/vcs/mercurial.rb', line 10

def name
    "mercurial"
end

#vcs(mod) ⇒ Object

Raises:

  • (StandardError)


21
22
23
24
25
# File 'lib/build-tool/vcs/mercurial.rb', line 21

def vcs( mod )
    raise StandardError if @module and ! mod.equal?( @module )
    @module = mod
    Mercurial.new( self )
end