Class: PuppetFixtures::Repository::Mercurial
- Inherits:
-
Base
- Object
- Base
- PuppetFixtures::Repository::Mercurial
show all
- Defined in:
- lib/puppet_fixtures.rb
Instance Method Summary
collapse
Methods inherited from Base
#download, #initialize
Instance Method Details
#clone(flags = nil) ⇒ Object
579
580
581
582
583
584
585
586
|
# File 'lib/puppet_fixtures.rb', line 579
def clone(flags = nil)
command = %w[hg clone]
command.push('-b', @branch) if @branch
command.push(flags) if flags
command.push(@remote, @target)
run_command(command)
end
|
#remote_url_changed? ⇒ Boolean
602
603
604
605
|
# File 'lib/puppet_fixtures.rb', line 602
def remote_url_changed?
false
end
|
#revision ⇒ Object
592
593
594
595
596
597
598
599
600
|
# File 'lib/puppet_fixtures.rb', line 592
def revision
return true unless @ref
command = ['hg', 'update', '--clean', '-r', @ref]
result = run_command(command, chdir: @target)
raise "Invalid ref #{@ref} for #{@target}" unless result
result
end
|
#update ⇒ Object
588
589
590
|
# File 'lib/puppet_fixtures.rb', line 588
def update
run_command(%w[hg pull])
end
|