Class: Autobuild::Importer::Status

Inherits:
Object
  • Object
show all
Defined in:
lib/autobuild/importer.rb

Overview

Instances of the Importer::Status class represent the status of a current checkout w.r.t. the remote repository.

Direct Known Subclasses

Git::Status

Constant Summary collapse

UP_TO_DATE =

Remote and local are at the same point

0
ADVANCED =

Local contains all data that remote has, but has new commits

1
NEEDS_MERGE =

Next update will require a merge

2
SIMPLE_UPDATE =

Next update will be simple (no merge)

3

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(status = -1)) ⇒ Status

Returns a new instance of Status.



64
65
66
67
68
69
70
# File 'lib/autobuild/importer.rb', line 64

def initialize(status = -1)
    @status = status
    @unexpected_working_copy_state = Array.new
    @uncommitted_code = false
    @remote_commits = Array.new
    @local_commits  = Array.new
end

Instance Attribute Details

#local_commitsObject

An array of strings that represent commits that are in the local repository and not in the remote one (would be pushed by an update)



62
63
64
# File 'lib/autobuild/importer.rb', line 62

def local_commits
  @local_commits
end

#remote_commitsObject

An array of strings that represent commits that are in the remote repository and not in this one (would be merged by an update)



59
60
61
# File 'lib/autobuild/importer.rb', line 59

def remote_commits
  @remote_commits
end

#statusObject

The update status



45
46
47
# File 'lib/autobuild/importer.rb', line 45

def status
  @status
end

#uncommitted_codeObject

True if there is code in the working copy that is not committed



47
48
49
# File 'lib/autobuild/importer.rb', line 47

def uncommitted_code
  @uncommitted_code
end

#unexpected_working_copy_stateArray<String> (readonly)

A list of messages describing differences between the local working copy and its expected state

On git, it would for instance mention that currently checked out branch is not the one autoproj expects

Returns:

  • (Array<String>)


55
56
57
# File 'lib/autobuild/importer.rb', line 55

def unexpected_working_copy_state
  @unexpected_working_copy_state
end