From 57e0b92f47c2e95ce088470acf9e8542d959126c Mon Sep 17 00:00:00 2001
From: Arnaud Fontaine <arnaud.fontaine@nexedi.com>
Date: Mon, 24 Jun 2013 21:18:06 +0900
Subject: [PATCH] ZODB Components: Meaningless to remove ZODB Components
 migrated from FS.

This will not work when there are several nodes anyway, so just display a
message to the user instead.
---
 .../BusinessTemplate_migrateSourceCodeFromFilesystem.xml       | 2 +-
 product/ERP5/bootstrap/erp5_core/bt/change_log                 | 3 +++
 product/ERP5/bootstrap/erp5_core/bt/revision                   | 2 +-
 product/ERP5Type/mixin/component.py                            | 3 ---
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BusinessTemplate_migrateSourceCodeFromFilesystem.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BusinessTemplate_migrateSourceCodeFromFilesystem.xml
index 384081248e..27d1cb02b5 100644
--- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BusinessTemplate_migrateSourceCodeFromFilesystem.xml
+++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BusinessTemplate_migrateSourceCodeFromFilesystem.xml
@@ -71,7 +71,7 @@ if failed_import_dict:\n
 \n
  message = "The following component could not be imported: " + \', \'.join(failed_import_formatted_list)\n
 else:\n
- message = "All components were successfully imported from filesystem to ZODB."\n
+ message = "All components were successfully imported from filesystem to ZODB. You can now delete them from your instance home."\n
 \n
 return context.Base_redirect(\'view\',\n
                              keep_items={\'portal_status_message\': message})\n
diff --git a/product/ERP5/bootstrap/erp5_core/bt/change_log b/product/ERP5/bootstrap/erp5_core/bt/change_log
index 7a1dce076e..845e777c63 100644
--- a/product/ERP5/bootstrap/erp5_core/bt/change_log
+++ b/product/ERP5/bootstrap/erp5_core/bt/change_log
@@ -1,3 +1,6 @@
+2013-06-24 arnaud.fontaine
+* Meaningless to remove ZODB Components migrated from FS. This will not work when there are several nodes anyway, so just display a message to the user.
+
 2013-06-19 arnaud.fontaine
 * Add 'does' to the closed-class words list in naming convention checking script.
 
diff --git a/product/ERP5/bootstrap/erp5_core/bt/revision b/product/ERP5/bootstrap/erp5_core/bt/revision
index e385724606..9e192aaca3 100644
--- a/product/ERP5/bootstrap/erp5_core/bt/revision
+++ b/product/ERP5/bootstrap/erp5_core/bt/revision
@@ -1 +1 @@
-41097
+41098
\ No newline at end of file
diff --git a/product/ERP5Type/mixin/component.py b/product/ERP5Type/mixin/component.py
index 2d4564a58f..f13694f518 100644
--- a/product/ERP5Type/mixin/component.py
+++ b/product/ERP5Type/mixin/component.py
@@ -383,7 +383,4 @@ class ComponentMixin(PropertyRecordableMixin, Base):
     # straightaway as there should be no error
     new_component.validate()
 
-    # Remove now useless Component on filesystem
-    os.remove(path)
-
     return new_component
-- 
2.30.9