Class: Amp::Core::Repositories::AbstractChangeset

Inherits:
Object
  • Object
show all
Includes:
CommonChangesetMethods, Comparable, Enumerable
Defined in:
lib/amp-core/repository/abstract/abstract_changeset.rb

Instance Method Summary collapse

Methods included from CommonChangesetMethods

#changed_files, #changed_lines_statistics, #include?, #template_for_options, #to_templated_s, #useful_parents, #walk

Instance Method Details

#<=>(other) ⇒ Integer

How does this changeset compare to other? Used in sorting.

Parameters:

Returns:

  • (Integer)

    -1, 0, or 1

Raises:

  • (NotImplementedError)


44
45
46
# File 'lib/amp-core/repository/abstract/abstract_changeset.rb', line 44

def <=>(other)
  raise NotImplementedError.new("<=>() must be implemented by subclasses of AbstractChangeset.")
end

#all_filesArray<String>

Returns a list of all files that are tracked at this current revision.

Returns:

  • (Array<String>)

    the files tracked at the given revision

Raises:

  • (NotImplementedError)


99
100
101
# File 'lib/amp-core/repository/abstract/abstract_changeset.rb', line 99

def all_files
  raise NotImplementedError.new("all_files() must be implemented by subclasses of AbstractChangeset.")
end

#altered_filesArray<String>

What files have been altered in this changeset?

Returns:

  • (Array<String>)

Raises:

  • (NotImplementedError)


91
92
93
# File 'lib/amp-core/repository/abstract/abstract_changeset.rb', line 91

def altered_files
  raise NotImplementedError.new("altered_files() must be implemented by subclasses of AbstractChangeset.")
end

#branchString

Which branch this changeset belongs to

Returns:

  • (String)

    the user who made the changeset

Raises:

  • (NotImplementedError)


77
78
79
# File 'lib/amp-core/repository/abstract/abstract_changeset.rb', line 77

def branch
  raise NotImplementedError.new("branch() must be implemented by subclasses of AbstractChangeset.")
end

#dateTime

When was the changeset made?

Returns:

  • (Time)

Raises:

  • (NotImplementedError)


61
62
63
# File 'lib/amp-core/repository/abstract/abstract_changeset.rb', line 61

def date
  raise NotImplementedError.new("date() must be implemented by subclasses of AbstractChangeset.")
end

#descriptionString

Returns:

  • (String)

Raises:

  • (NotImplementedError)


83
84
85
# File 'lib/amp-core/repository/abstract/abstract_changeset.rb', line 83

def description
  raise NotImplementedError.new("description() must be implemented by subclasses of AbstractChangeset.")
end

#eachAbstractChangeset

Iterates over every tracked file in this changeset.

Returns:

Raises:

  • (NotImplementedError)


35
36
37
# File 'lib/amp-core/repository/abstract/abstract_changeset.rb', line 35

def each
  raise NotImplementedError.new("each() must be implemented by subclasses of AbstractChangeset.")
end

#get_file(filename) ⇒ AbstractVersionedFile Also known as: []

Retrieve filename

Returns:

Raises:

  • (NotImplementedError)


52
53
54
# File 'lib/amp-core/repository/abstract/abstract_changeset.rb', line 52

def get_file(filename)
  raise NotImplementedError.new("get_file() must be implemented by subclasses of AbstractChangeset.")
end

#parentsArray<Abstract Changeset>

the nodes that this node inherits from

Returns:

  • (Array<Abstract Changeset>)

Raises:

  • (NotImplementedError)


27
28
29
# File 'lib/amp-core/repository/abstract/abstract_changeset.rb', line 27

def parents
  raise NotImplementedError.new("parents() must be implemented by subclasses of AbstractChangeset.")
end

#userString

The user who made the changeset

Returns:

  • (String)

    the user who made the changeset

Raises:

  • (NotImplementedError)


69
70
71
# File 'lib/amp-core/repository/abstract/abstract_changeset.rb', line 69

def user
  raise NotImplementedError.new("user() must be implemented by subclasses of AbstractChangeset.")
end

#working?Boolean

Is this changeset a working changeset?

Returns:

  • (Boolean)

    is the changeset representing the working directory?

Raises:

  • (NotImplementedError)


106
107
108
# File 'lib/amp-core/repository/abstract/abstract_changeset.rb', line 106

def working?
  raise NotImplementedError.new("working() must be implemented by subclasses of AbstractChangeset.")
end