Sha256: d6002686180c1d14cbdfd8341473453cf3f077ed875cc6972efce71ab3d690a1

Contents?: true

Size: 560 Bytes

Versions: 7

Compression:

Stored size: 560 Bytes

Contents

# frozen_string_literal: true

module OhlohScm
  module Bzr
    class Scm < OhlohScm::Scm
      def pull(from, callback)
        callback.update(0, 1)

        if status.exist?
          run "cd '#{url}' && bzr revert && bzr pull --overwrite '#{from.url}'"
        else
          run "rm -rf '#{url}'"
          run "bzr branch '#{from.url}' '#{url}'"
        end

        callback.update(1, 1)
      end

      def vcs_path
        "#{url}/.bzr"
      end

      def checkout_files(_names)
        # Files are already checked out.
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
ohloh_scm-4.0.4 lib/ohloh_scm/bzr/scm.rb
ohloh_scm-4.0.3 lib/ohloh_scm/bzr/scm.rb
ohloh_scm-4.0.2 lib/ohloh_scm/bzr/scm.rb
ohloh_scm-4.0.1 lib/ohloh_scm/bzr/scm.rb
ohloh_scm-3.0.21 lib/ohloh_scm/bzr/scm.rb
ohloh_scm-3.0.19 lib/ohloh_scm/bzr/scm.rb
ohloh_scm-3.0.17 lib/ohloh_scm/bzr/scm.rb