Class: Braid::Operations::GitSvn
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Proxy
#require_version, #require_version!, #version
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Braid::Operations::Proxy
Class Method Details
.command ⇒ Object
295 |
# File 'lib/braid/operations.rb', line 295 def self.command; "git svn"; end |
Instance Method Details
#commit_hash(remote, revision) ⇒ Object
297 298 299 300 301 302 |
# File 'lib/braid/operations.rb', line 297 def commit_hash(remote, revision) out = invoke(:log, "--show-commit --oneline", "-r #{revision}", remote) part = out.to_s.split(" | ")[1] raise UnknownRevision, "r#{revision}" unless part git.rev_parse(part) end |
#fetch(remote) ⇒ Object
304 305 306 |
# File 'lib/braid/operations.rb', line 304 def fetch(remote) sh("git svn fetch #{remote} 2>&1 >/dev/null") end |
#init(remote, path) ⇒ Object
308 309 310 311 |
# File 'lib/braid/operations.rb', line 308 def init(remote, path) invoke(:init, "-R", remote, "--id=#{remote}", path) true end |