Class: RSCM::P4Client::P4Changelist
- Inherits:
-
Object
- Object
- RSCM::P4Client::P4Changelist
- Defined in:
- lib/rscm/scm/perforce.rb
Instance Attribute Summary collapse
-
#developer ⇒ Object
readonly
Returns the value of attribute developer.
-
#files ⇒ Object
readonly
Returns the value of attribute files.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#number ⇒ Object
readonly
Returns the value of attribute number.
-
#time ⇒ Object
readonly
Returns the value of attribute time.
Instance Method Summary collapse
-
#initialize(log) ⇒ P4Changelist
constructor
A new instance of P4Changelist.
Constructor Details
#initialize(log) ⇒ P4Changelist
Returns a new instance of P4Changelist.
413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 |
# File 'lib/rscm/scm/perforce.rb', line 413 def initialize(log) debug log if(log =~ /^Change (\d+) by (.*) on (.*)$/) #@number, @developer, @time = $1.to_i, $2, Time.utc(*ParseDate.parsedate($3)[0..5]) @number, @developer, @time = $1.to_i, $2, Time.utc(*ParseDate.parsedate($3)) else raise "Bad log format: '#{log}'" end if log =~ /Change (.*)\n\n(.*)\n\nAffected/m @message = $2.strip.gsub(/\n\t/, "\n") end @files = [] log.each do |line| if line =~ /^\.\.\. \/\/depot\/(.+)#(\d+) (.+)/ files << FileSpec.new($1, Integer($2), $3) end end end |
Instance Attribute Details
#developer ⇒ Object (readonly)
Returns the value of attribute developer.
411 412 413 |
# File 'lib/rscm/scm/perforce.rb', line 411 def developer @developer end |
#files ⇒ Object (readonly)
Returns the value of attribute files.
411 412 413 |
# File 'lib/rscm/scm/perforce.rb', line 411 def files @files end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
411 412 413 |
# File 'lib/rscm/scm/perforce.rb', line 411 def @message end |
#number ⇒ Object (readonly)
Returns the value of attribute number.
411 412 413 |
# File 'lib/rscm/scm/perforce.rb', line 411 def number @number end |
#time ⇒ Object (readonly)
Returns the value of attribute time.
411 412 413 |
# File 'lib/rscm/scm/perforce.rb', line 411 def time @time end |