Class: Svp::Add
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
#commit ⇒ Object
16
17
18
19
|
# File 'lib/svp/add.rb', line 16
def commit
FileUtils.mkdir_p(File.dirname(@base_file))
FileUtils.cp(@work_file, @base_file)
end
|
#prepare_to_commit(p4) ⇒ Object
11
12
13
14
|
# File 'lib/svp/add.rb', line 11
def prepare_to_commit(p4)
super
p4.add(@work_file)
end
|
#revert ⇒ Object
6
7
8
9
|
# File 'lib/svp/add.rb', line 6
def revert
FileUtils.rm_rf(@work_file)
super
end
|