Class: Vlad::Darcs

Inherits:
Object
  • Object
show all
Defined in:
lib/vlad/darcs.rb

Instance Method Summary collapse

Instance Method Details

#checkout(revision, destination) ⇒ Object

Ignores revision for now, exports into directory destination



9
10
11
12
13
# File 'lib/vlad/darcs.rb', line 9

def checkout(revision, destination)
  [ %{(test ! -d #{destination}/_darcs && #{darcs_cmd} init "--repodir=#{destination}") || true},
    %{#{darcs_cmd} pull -a "--repodir=#{destination}" #{repository}},
  ].join(" && ")
end

#export(revision, destination) ⇒ Object



15
16
17
18
19
# File 'lib/vlad/darcs.rb', line 15

def export(revision, destination)
  [ %{mkdir -p #{destination}},
    %{ls | grep ^[^_] | xargs -I vlad cp -R vlad #{destination}}
  ].join(" && ")
end

#revision(revision) ⇒ Object



21
22
23
# File 'lib/vlad/darcs.rb', line 21

def revision(revision)
  revision
end