Class: Svp::Delete

Inherits:
Change show all
Defined in:
lib/svp/delete.rb

Instance Method Summary collapse

Methods inherited from Change

#diff, #initialize, #rollback, #status

Constructor Details

This class inherits a constructor from Svp::Change

Instance Method Details

#commitObject



17
18
19
# File 'lib/svp/delete.rb', line 17

def commit
  FileUtils.rm_rf(@base_file)
end

#prepare_to_commit(p4) ⇒ Object



11
12
13
14
15
# File 'lib/svp/delete.rb', line 11

def prepare_to_commit(p4)
  super(p4, "Deleting")
  p4.sync("-k #{@work_file}")
  p4.delete(@work_file)
end

#revertObject



6
7
8
9
# File 'lib/svp/delete.rb', line 6

def revert
  FileUtils.cp(@base_file, @work_file)
  super
end