Class URI::Svn
In: lib/uri/svn.rb
Parent: GenericEx

Methods

Constants

COMPONENT = [ :scheme, :host, :path

Public Instance methods

[Source]

# File lib/uri/svn.rb, line 32
    def checkout
      tmp = TempPath.new('svn-checkout')
      tmp.mkpath
      tmp += pathname.basename
      [tmp, shell.svn!('checkout', svn_uri_string, tmp)]
    end

[Source]

# File lib/uri/svn.rb, line 26
    def fingerprint
      shell(:raise).
        svn!('info', svn_uri_string).
        output.read[/Revision: (\d+)/, 1]
    end

[Source]

# File lib/uri/svn.rb, line 39
    def save
      raise SaveError unless scheme.downcase == 'svn.file'
      repos = pathname
      raise SaveError unless (repos + 'format').exist?
      out = TempPath.new('save', "#{repos.basename}.svndump")
      data = shell! do
        svnadmin('dump', repos, '--incremental', '--quiet', '--deltas') > out
      end
      [out, data]
    end

[Source]

# File lib/uri/svn.rb, line 18
    def svn_uri_string
      to_s.sub(/^svn\./, '')
    end

[Source]

# File lib/uri/svn.rb, line 22
    def to_s
      super.sub(/^(svn\.file:\/)([^\/])/, '\1//\2')
    end

[Validate]