lib/rscm/revision.rb in rscm-0.3.14 vs lib/rscm/revision.rb in rscm-0.3.15
- old
+ new
@@ -1,15 +1,13 @@
-require 'xmlrpc/utils'
require 'rscm/time_ext'
require 'rscm/revision_file'
module RSCM
# A collection of Revision.
class Revisions
include Enumerable
- include XMLRPC::Marshallable
attr_accessor :revisions
def initialize(revisions=[])
@revisions = revisions
@@ -113,11 +111,10 @@
# Non-transactional SCMs (such as CVS and StarTeam) emulate Revision
# by grouping File s that were committed by the same developer, with the
# same commit message, and within a "reasonably" small timespan.
class Revision
include Enumerable
- include XMLRPC::Marshallable
attr_reader :files
attr_accessor :identifier
attr_accessor :developer
attr_accessor :message
@@ -165,20 +162,19 @@
raise "can't set time to an inferiour value than the previous value" if @time && (t < @time)
@time = t
end
def ==(other)
- return false if !other.is_a?(self.class)
- @files == other.files
+ other.is_a?(self.class) && @files == other.files
end
def <=>(other)
@time <=> other.time
end
# Whether this instance can contain a File. Used
# by non-transactional SCMs.
- def can_contain?(file)
+ def can_contain?(file) #:nodoc:
self.developer == file.developer &&
self.message == file.message &&
(self.time - file.time).abs < 60
end