Module: Pullr::SCM::Mercurial
- Includes:
- CommandLine
- Defined in:
- lib/pullr/scm/mercurial.rb
Instance Method Summary collapse
-
#scm_pull(uri, dest = nil) ⇒ Object
Pulls down a copy of a Mercurial repository.
-
#scm_update(path, uri = nil) ⇒ Object
Updates a local Mercurial repository.
Methods included from CommandLine
Instance Method Details
#scm_pull(uri, dest = nil) ⇒ Object
Pulls down a copy of a Mercurial repository.
17 18 19 20 21 22 23 |
# File 'lib/pullr/scm/mercurial.rb', line 17 def scm_pull(uri,dest=nil) if dest sh 'hg', 'clone', uri, dest else sh 'hg', 'clone', uri end end |
#scm_update(path, uri = nil) ⇒ Object
Updates a local Mercurial repository.
34 35 36 37 38 39 |
# File 'lib/pullr/scm/mercurial.rb', line 34 def scm_update(path,uri=nil) cd(path) do sh 'hg', 'pull' sh 'hg', 'update', '-C' end end |