Class RSCM::P4Client::P4Changelist
In: lib/rscm/scm/perforce.rb
Parent: Object

Methods

new  

Attributes

developer  [R] 
files  [R] 
message  [R] 
number  [R] 
time  [R] 

Public Class methods

[Source]

     # File lib/rscm/scm/perforce.rb, line 413
413:       def initialize(log)
414:         debug log
415:         if(log =~ /^Change (\d+) by (.*) on (.*)$/)
416:           #@number, @developer, @time = $1.to_i, $2, Time.utc(*ParseDate.parsedate($3)[0..5])
417:           @number, @developer, @time = $1.to_i, $2, Time.utc(*ParseDate.parsedate($3))
418:         else
419:           raise "Bad log format: '#{log}'"
420:         end
421: 
422:         if log =~ /Change (.*)\n\n(.*)\n\nAffected/m
423:           @message = $2.strip.gsub(/\n\t/, "\n")
424:         end
425: 
426:         @files = []
427:         log.each do |line|
428:           if line =~ /^\.\.\. \/\/depot\/(.+)#(\d+) (.+)/
429:             files << FileSpec.new($1, Integer($2), $3)
430:           end
431:         end
432:       end

[Validate]