lib/rscm/base.rb in rscm-0.3.10 vs lib/rscm/base.rb in rscm-0.3.11
- old
+ new
@@ -1,9 +1,8 @@
require 'fileutils'
require 'rscm/revision'
require 'rscm/path_converter'
-require 'rscm/annotations'
module RSCM
# This class defines the RSCM API. The documentation of the various methods
# uses CVS and Subversion's terminology. (For example, checkout means 'get working copy',
# not 'lock for private edit' as in ClearCase or VSS terminology).
@@ -55,24 +54,10 @@
#
# TODO: rename this superclass to 'Base'
#
class Base
- @@classes = []
- def self.register(cls)
- @@classes << cls unless @@classes.index(cls)
- end
- def self.classes
- @@classes
- end
-
- # Load all sources under scm, so SCM classes can register themselves
- Dir[File.dirname(__FILE__) + "/scm/*.rb"].each do |src|
- require src
- end
-
-
# TODO: Make revisions yield revisions as they are determined, to avoid
# having to load them all into memory before the method exits. Careful not to
# use yielded revisions to do another scm hit - like get diffs. Some SCMs
# might dead lock on this. Implement a guard for that.
# TODO: Add some visitor support here too?
@@ -109,10 +94,11 @@
# Whether or not this SCM is transactional (atomic).
#
def transactional?
false
end
+ alias :atomic? :transactional?
# Creates a new 'central' repository. This is intended only for creation of 'central'
# repositories (not for working copies). You shouldn't have to call this method if a central repository
# already exists. This method is used primarily for testing of RSCM, but can also
# be used if you *really* want to create a central repository.
@@ -286,9 +272,10 @@
def update_commandline(to_identifier=Time.infinity)
raise "Not implemented"
end
# Returns/yields an IO containing the unified diff of the change.
+ # Also see RevisionFile#diff
def diff(change, &block)
return(yield("Not implemented"))
end
def ==(other_scm)