Sha256: 167057c787278554f0f1e189bee08810e92ecf66132a9d41960a7868601debfa
Contents?: true
Size: 578 Bytes
Versions: 37
Compression:
Stored size: 578 Bytes
Contents
module OhlohScm::Adapters class BzrAdapter < AbstractAdapter def pull(from, &block) raise ArgumentError.new("Cannot pull from #{from.inspect}") unless from.is_a?(BzrAdapter) logger.info { "Pulling #{from.url}" } yield(0,1) if block_given? # Progress bar callback unless self.exist? run "mkdir -p '#{self.url}'" run "rm -rf '#{self.url}'" run "bzr branch '#{from.url}' '#{self.url}'" else run "cd '#{self.url}' && bzr revert && bzr pull --overwrite '#{from.url}'" end yield(1,1) if block_given? # Progress bar callback end end end
Version data entries
37 entries across 37 versions & 1 rubygems