Class Capistrano::Deploy::SCM::Bzr
In: lib/capistrano/recipes/deploy/scm/bzr.rb
lib/capistrano/recipes/deploy/scm/bzr.rb
Parent: Base

Implements the Capistrano SCM interface for the Bazaar-NG revision control system (bazaar-vcs.org/).

Methods

checkout   checkout   diff   diff   export   export   head   head   log   log   next_revision   next_revision   query_revision   query_revision   sync   sync  

Public Instance methods

Returns the command that will check out the given revision to the given destination.

[Source]

    # File lib/capistrano/recipes/deploy/scm/bzr.rb, line 23
23:         def checkout(revision, destination)
24:           scm :checkout, "--lightweight", revswitch(revision), repository, destination
25:         end

Returns the command that will check out the given revision to the given destination.

[Source]

    # File lib/capistrano/recipes/deploy/scm/bzr.rb, line 23
23:         def checkout(revision, destination)
24:           scm :checkout, "--lightweight", revswitch(revision), repository, destination
25:         end

The bzr "diff" command doesn‘t accept a repository argument, so it must be run from within a working tree.

[Source]

    # File lib/capistrano/recipes/deploy/scm/bzr.rb, line 43
43:         def diff(from, to=nil)
44:           switch = "-r#{from}"
45:           switch << "..#{to}" if to
46: 
47:           scm :diff, switch
48:         end

The bzr "diff" command doesn‘t accept a repository argument, so it must be run from within a working tree.

[Source]

    # File lib/capistrano/recipes/deploy/scm/bzr.rb, line 43
43:         def diff(from, to=nil)
44:           switch = "-r#{from}"
45:           switch << "..#{to}" if to
46: 
47:           scm :diff, switch
48:         end

The bzr ‘export’ does an export similar to other SCM systems

[Source]

    # File lib/capistrano/recipes/deploy/scm/bzr.rb, line 37
37:         def export(revision, destination)
38:           scm :export, revswitch(revision), destination, repository
39:         end

The bzr ‘export’ does an export similar to other SCM systems

[Source]

    # File lib/capistrano/recipes/deploy/scm/bzr.rb, line 37
37:         def export(revision, destination)
38:           scm :export, revswitch(revision), destination, repository
39:         end

Bazaar-NG doesn‘t support any pseudo-id‘s, so we‘ll use the convention in this adapter that the :head symbol means the most recently committed revision.

[Source]

    # File lib/capistrano/recipes/deploy/scm/bzr.rb, line 17
17:         def head
18:           :head
19:         end

Bazaar-NG doesn‘t support any pseudo-id‘s, so we‘ll use the convention in this adapter that the :head symbol means the most recently committed revision.

[Source]

    # File lib/capistrano/recipes/deploy/scm/bzr.rb, line 17
17:         def head
18:           :head
19:         end

Returns a log of changes between the two revisions (inclusive).

[Source]

    # File lib/capistrano/recipes/deploy/scm/bzr.rb, line 51
51:         def log(from, to=nil)
52:           scm :log, "--short", "-r#{from}..#{to}", repository
53:         end

Returns a log of changes between the two revisions (inclusive).

[Source]

    # File lib/capistrano/recipes/deploy/scm/bzr.rb, line 51
51:         def log(from, to=nil)
52:           scm :log, "--short", "-r#{from}..#{to}", repository
53:         end

Increments the given revision number and returns it.

[Source]

    # File lib/capistrano/recipes/deploy/scm/bzr.rb, line 66
66:         def next_revision(revision)
67:           revision.to_i + 1
68:         end

Increments the given revision number and returns it.

[Source]

    # File lib/capistrano/recipes/deploy/scm/bzr.rb, line 66
66:         def next_revision(revision)
67:           revision.to_i + 1
68:         end

Attempts to translate the given revision identifier to a "real" revision. If the identifier is :head, the "bzr revno" command will be yielded, and the block must execute the command and return the output. The revision will be extracted from the output and returned. If the ‘revision’ argument, on the other hand, is not :head, it is simply returned.

[Source]

    # File lib/capistrano/recipes/deploy/scm/bzr.rb, line 61
61:         def query_revision(revision)
62:           revision
63:         end

Attempts to translate the given revision identifier to a "real" revision. If the identifier is :head, the "bzr revno" command will be yielded, and the block must execute the command and return the output. The revision will be extracted from the output and returned. If the ‘revision’ argument, on the other hand, is not :head, it is simply returned.

[Source]

    # File lib/capistrano/recipes/deploy/scm/bzr.rb, line 61
61:         def query_revision(revision)
62:           revision
63:         end

The bzr ‘update’ command does not support updating to a specific revision, so this just does update, followed by revert (unless updating to head).

[Source]

    # File lib/capistrano/recipes/deploy/scm/bzr.rb, line 30
30:         def sync(revision, destination)
31:           commands = [scm(:update, destination)]
32:           commands << [scm(:revert, revswitch(revision), destination)] if revision != head
33:           commands.join(" && ")
34:         end

The bzr ‘update’ command does not support updating to a specific revision, so this just does update, followed by revert (unless updating to head).

[Source]

    # File lib/capistrano/recipes/deploy/scm/bzr.rb, line 30
30:         def sync(revision, destination)
31:           commands = [scm(:update, destination)]
32:           commands << [scm(:revert, revswitch(revision), destination)] if revision != head
33:           commands.join(" && ")
34:         end

[Validate]