lib/rscm/base.rb in rscm-0.3.8 vs lib/rscm/base.rb in rscm-0.3.9
- old
+ new
@@ -19,10 +19,11 @@
# * edit
# * move
# * revisions
# * uptodate?
# * file
+ # * destroy_working_copy
#
# In addition to operations related to working copies, the same instance should provide
# methods to administer the working copy's associated 'central' repository. These are:
#
# * central_exists?
@@ -88,9 +89,14 @@
def to_yaml_properties
props = instance_variables
props.delete("@checkout_dir")
props.sort!
+ end
+
+ # Destroys the working copy
+ def destroy_working_copy
+ FileUtils.rm_rf(checkout_dir) unless checkout_dir.nil?
end
# Whether the physical SCM represented by this instance exists.
#
def central_exists?