Class: Braid::Operations::GitSvn
- Inherits:
-
Proxy
- Object
- Proxy
- Braid::Operations::GitSvn
show all
- Defined in:
- lib/braid/operations.rb
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
246
|
# File 'lib/braid/operations.rb', line 246
def self.command; "git svn"; end
|
Instance Method Details
#commit_hash(remote, revision) ⇒ Object
248
249
250
251
252
253
|
# File 'lib/braid/operations.rb', line 248
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.instance.rev_parse(part)
end
|
#fetch(remote) ⇒ Object
255
256
257
258
259
260
|
# File 'lib/braid/operations.rb', line 255
def fetch(remote)
system("git svn fetch #{remote} &> /dev/null")
raise ShellExecutionError, "could not fetch" unless $? == 0
true
end
|
#init(remote, path) ⇒ Object
262
263
264
265
|
# File 'lib/braid/operations.rb', line 262
def init(remote, path)
invoke(:init, "-R", remote, "--id=#{remote}", path)
true
end
|