Module: Origen::RevisionControl

Defined in:
lib/origen/revision_control.rb,
lib/origen/revision_control/git.rb,
lib/origen/revision_control/base.rb,
lib/origen/revision_control/perforce.rb,
lib/origen/revision_control/subversion.rb,
lib/origen/revision_control/design_sync.rb

Defined Under Namespace

Classes: Base, DesignSync, Git, Perforce, Subversion

Constant Summary collapse

IGNORE_DIRS =
%w(
  .ws .lsf log output web coverage .ref .yardoc .collection .bin
  .session .bundle .tpc pkg tmp .git
)
IGNORE_FILES =
%w(
  target/.default release_note.txt *.swp *.swo *~ .bin
  list/referenced.list tags .ref .pdm/pi_attributes.txt
  environment/.default
)

Class Method Summary collapse

Class Method Details

.new(options = {}) ⇒ Object

Creates a new revision controller object based on the supplied :local and :remote options.

The revision control system will be worked out from the supplied remote value. This method should therefore be used whenever the remote is a variable that could refer to many different systems.

Examples:


# I know that the remote refers to DesignSync
rc = Origen::RevisionControl::DesignSync.new remote: "sync//....", local: "my/path"

# The remote is a variable and I don't know the type
rc = Origen::RevisionControl.new remote: rc_url, local: "my/path"


34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/origen/revision_control.rb', line 34

def self.new(options = {})
  case
  when options[:remote] =~ /^sync/
    DesignSync.new(options)
  when options[:remote] =~ /git/
    Git.new(options)
  when options[:remote] =~ /^p4/
    Perforce.new(options)
  else
    fail "Could not work out the revision control system for: #{options[:remote]}"
  end
end