Class: Autobuild::Importer::Status
- Inherits:
-
Object
- Object
- Autobuild::Importer::Status
- 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
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
-
#local_commits ⇒ Object
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).
-
#remote_commits ⇒ Object
An array of strings that represent commits that are in the remote repository and not in this one (would be merged by an update).
-
#status ⇒ Object
The update status.
-
#uncommitted_code ⇒ Object
True if there is code in the working copy that is not committed.
-
#unexpected_working_copy_state ⇒ Array<String>
readonly
A list of messages describing differences between the local working copy and its expected state.
Instance Method Summary collapse
-
#initialize(status = -1)) ⇒ Status
constructor
A new instance of Status.
Constructor Details
#initialize(status = -1)) ⇒ Status
Returns a new instance of Status.
61 62 63 64 65 66 67 |
# File 'lib/autobuild/importer.rb', line 61 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_commits ⇒ Object
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)
59 60 61 |
# File 'lib/autobuild/importer.rb', line 59 def local_commits @local_commits end |
#remote_commits ⇒ Object
An array of strings that represent commits that are in the remote repository and not in this one (would be merged by an update)
56 57 58 |
# File 'lib/autobuild/importer.rb', line 56 def remote_commits @remote_commits end |
#status ⇒ Object
The update status
42 43 44 |
# File 'lib/autobuild/importer.rb', line 42 def status @status end |
#uncommitted_code ⇒ Object
True if there is code in the working copy that is not committed
44 45 46 |
# File 'lib/autobuild/importer.rb', line 44 def uncommitted_code @uncommitted_code end |
#unexpected_working_copy_state ⇒ Array<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
52 53 54 |
# File 'lib/autobuild/importer.rb', line 52 def unexpected_working_copy_state @unexpected_working_copy_state end |