From 60efc5fac431a9abaccca3aa8f2ee2b0772168a1 Mon Sep 17 00:00:00 2001
From: Arnaud Fontaine <arnaud.fontaine@nexedi.com>
Date: Thu, 4 Oct 2012 22:36:40 +0900
Subject: [PATCH] After upgrade, VCS is used instead of SVN in erp5_forge
 (migration has not been implemented).

If an user has set SVN working copies in its preferences, it cannot be
modified anymore after upgrade.
---
 .../Preference_viewVcs/my_preferred_working_copy_list.xml      | 2 +-
 bt5/erp5_forge/bt/change_log                                   | 3 +++
 bt5/erp5_forge/bt/revision                                     | 2 +-
 product/ERP5/Document/BusinessTemplate.py                      | 3 +--
 product/ERP5VCS/WorkingCopy.py                                 | 3 +--
 5 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_vcs/Preference_viewVcs/my_preferred_working_copy_list.xml b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_vcs/Preference_viewVcs/my_preferred_working_copy_list.xml
index 7c0505ed12..4d3cb74562 100644
--- a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_vcs/Preference_viewVcs/my_preferred_working_copy_list.xml
+++ b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_vcs/Preference_viewVcs/my_preferred_working_copy_list.xml
@@ -118,7 +118,7 @@
       <dictionary>
         <item>
             <key> <string>_text</string> </key>
-            <value> <string>python: here.getPreferredWorkingCopyList() or here.getPreferredSubversionWorkingCopyList()</string> </value>
+            <value> <string>python: here.getPreferredWorkingCopyList()</string> </value>
         </item>
       </dictionary>
     </pickle>
diff --git a/bt5/erp5_forge/bt/change_log b/bt5/erp5_forge/bt/change_log
index 736bdb1777..bfd84c1dc6 100644
--- a/bt5/erp5_forge/bt/change_log
+++ b/bt5/erp5_forge/bt/change_log
@@ -1,3 +1,6 @@
+2012-10-04 arnaud.fontaine
+* getPreferredSubversionWorkingCopyList() cannot be set properly.
+
 2012-04-19 Kazuhiko
 * add TypesTool_viewRoleInformationList that lists all Role Informations.
 
diff --git a/bt5/erp5_forge/bt/revision b/bt5/erp5_forge/bt/revision
index c029c62fca..694f34bc62 100644
--- a/bt5/erp5_forge/bt/revision
+++ b/bt5/erp5_forge/bt/revision
@@ -1 +1 @@
-672
\ No newline at end of file
+673
\ No newline at end of file
diff --git a/product/ERP5/Document/BusinessTemplate.py b/product/ERP5/Document/BusinessTemplate.py
index 41c68ffd85..1c3576a170 100644
--- a/product/ERP5/Document/BusinessTemplate.py
+++ b/product/ERP5/Document/BusinessTemplate.py
@@ -5494,8 +5494,7 @@ Business Template is a set of definitions, such as skins, portal types and categ
       bt_name = self.getTitle()
       from App.config import getConfiguration
       instance_home = getConfiguration().instancehome
-      for path in (preferences.getPreferredWorkingCopyList() or # BBB
-                   preferences.getPreferredSubversionWorkingCopyList() or ['bt5']):
+      for path in (preferences.getPreferredWorkingCopyList() or ['bt5']):
         if not os.path.isabs(path):
           path = os.path.join(instance_home, path)
         bt_path = os.path.join(path, bt_name)
diff --git a/product/ERP5VCS/WorkingCopy.py b/product/ERP5VCS/WorkingCopy.py
index 46789a3384..a4fee5af98 100644
--- a/product/ERP5VCS/WorkingCopy.py
+++ b/product/ERP5VCS/WorkingCopy.py
@@ -97,8 +97,7 @@ class WorkingCopy(Implicit):
   def getWorkingCopyList(self):
     working_copy_list = []
     preferences = self.getPortalObject().portal_preferences
-    for path in (preferences.getPreferredWorkingCopyList() or # BBB
-                 preferences.getPreferredSubversionWorkingCopyList()):
+    for path in preferences.getPreferredWorkingCopyList():
       try:
         getVcsTool(vcs=self.reference, path=path)
         working_copy_list.append(path)
-- 
2.30.9