module Origen::RevisionControl
Constants
- IGNORE_DIRS
- IGNORE_FILES
Public Class Methods
Source
# 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
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.
@example
# 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"