Method: Origen::RevisionControl::Base#changes
- Defined in:
- lib/origen/revision_control/base.rb
#changes(dir = nil, options = {}) ⇒ Object
Returns a hash containing the list of files that have changes compared to the given tag or compared to the latest version (on the server).
{
:added => [], # Paths to files that have been added since the previous tag
:removed => [], # Paths to files that have been removed since the previous tag
:changed => [], # Paths to files that have changed since the previous tag
:present => true/false, # Convenience attribute for the caller to check if there are any changes, when
# true at least one of the other arrays will contain a value
}
The dir argument is optional and when not supplied the entire directory will be checked for changes.
Note that added files only refers to those files which have been checked into revision control since the compared to version, it does not refer to unmanaged files in the workspace. Use the unmanaged method to get a list of those.
Note also that while a file is considered added or removed depends on the chronological relationship between the current version (the user’s workspace) and the reference version. If the reference version is older than the current version (i.e. an earlier tag), then an added file means a file that the current version has and the reference (previous) version did not have.
However if the reference version is newer than the current version (e.g. when comparing to a newer tag or the latest version on the server), then an added file means a file that the current version does not have and which has been added in a newer version of the remote directory.
120 121 122 |
# File 'lib/origen/revision_control/base.rb', line 120 def changes(dir = nil, = {}) fail "The #{self.class} driver does not support the changes method!" end |