Class: Amp::Core::Repositories::AbstractVersionedFile
- Inherits:
-
Object
- Object
- Amp::Core::Repositories::AbstractVersionedFile
- Includes:
- CommonVersionedFileMethods
- Defined in:
- lib/amp-core/repository/abstract/abstract_versioned_file.rb
Instance Method Summary collapse
-
#==(vfile) ⇒ Boolean
Are two versioned files the same? This means same path and revision indexes.
-
#changeset ⇒ AbstractChangeset
The changeset to which this versioned file belongs.
-
#cmp(item) ⇒ Boolean
Compares to either a bit of text or another versioned file.
-
#data ⇒ String
The contents of a file at the given revision.
-
#flags ⇒ String
Gets the flags for this file (‘x’, ‘l’, or ”).
-
#hash ⇒ Integer
The hash value for sticking this fucker in a hash.
-
#path ⇒ String
The path to this file.
-
#renamed? ⇒ Boolean
Has this file been renamed? If so, return some useful info.
-
#repo ⇒ AbstractLocalRepository
(also: #repository)
The repo to which this VersionedFile belongs.
-
#revision ⇒ Integer
The revision of the file.
-
#size ⇒ Integer
The size of this file.
Methods included from CommonVersionedFileMethods
#===, #branch, #children, #clean?, #date, #description, #unified_diff_with, #user
Instance Method Details
#==(vfile) ⇒ Boolean
Are two versioned files the same? This means same path and revision indexes.
102 103 104 |
# File 'lib/amp-core/repository/abstract/abstract_versioned_file.rb', line 102 def ==(vfile) raise NotImplementedError.new("==() must be implemented by subclasses of AbstractVersionedFile.") end |
#changeset ⇒ AbstractChangeset
The changeset to which this versioned file belongs.
25 26 27 |
# File 'lib/amp-core/repository/abstract/abstract_versioned_file.rb', line 25 def changeset raise NotImplementedError.new("changeset() must be implemented by subclasses of AbstractVersionedFile.") end |
#cmp(item) ⇒ Boolean
Compares to either a bit of text or another versioned file. Returns true if different, false for the same. (much like <=> == 0 for the same)
93 94 95 |
# File 'lib/amp-core/repository/abstract/abstract_versioned_file.rb', line 93 def cmp(item) raise NotImplementedError.new("cmp() must be implemented by subclasses of AbstractVersionedFile.") end |
#data ⇒ String
The contents of a file at the given revision
68 69 70 |
# File 'lib/amp-core/repository/abstract/abstract_versioned_file.rb', line 68 def data raise NotImplementedError.new("data() must be implemented by subclasses of AbstractVersionedFile.") end |
#flags ⇒ String
Gets the flags for this file (‘x’, ‘l’, or ”)
110 111 112 |
# File 'lib/amp-core/repository/abstract/abstract_versioned_file.rb', line 110 def flags raise NotImplementedError.new("flags() must be implemented by subclasses of AbstractVersionedFile.") end |
#hash ⇒ Integer
The hash value for sticking this fucker in a hash.
76 77 78 |
# File 'lib/amp-core/repository/abstract/abstract_versioned_file.rb', line 76 def hash raise NotImplementedError.new("hash() must be implemented by subclasses of AbstractVersionedFile.") end |
#path ⇒ String
The path to this file
42 43 44 |
# File 'lib/amp-core/repository/abstract/abstract_versioned_file.rb', line 42 def path raise NotImplementedError.new("path() must be implemented by subclasses of AbstractVersionedFile.") end |
#renamed? ⇒ Boolean
Has this file been renamed? If so, return some useful info
82 83 84 |
# File 'lib/amp-core/repository/abstract/abstract_versioned_file.rb', line 82 def renamed? raise NotImplementedError.new("renamed() must be implemented by subclasses of AbstractVersionedFile.") end |
#repo ⇒ AbstractLocalRepository Also known as: repository
The repo to which this VersionedFile belongs
33 34 35 |
# File 'lib/amp-core/repository/abstract/abstract_versioned_file.rb', line 33 def repo raise NotImplementedError.new("repo() must be implemented by subclasses of AbstractVersionedFile.") end |
#revision ⇒ Integer
The revision of the file. This can be vague, so let me explain: This is the revision of the repo from which this VersionedFile is. If this is unclear, please submit a patch fixing it.
52 53 54 |
# File 'lib/amp-core/repository/abstract/abstract_versioned_file.rb', line 52 def revision raise NotImplementedError.new("revision() must be implemented by subclasses of AbstractVersionedFile.") end |
#size ⇒ Integer
The size of this file
60 61 62 |
# File 'lib/amp-core/repository/abstract/abstract_versioned_file.rb', line 60 def size raise NotImplementedError.new("size() must be implemented by subclasses of AbstractVersionedFile.") end |