From e4bd6f1904cf6fbd9d45ac97a6d5ff79d2d6bbc2 Mon Sep 17 00:00:00 2001
From: Christophe Dumez <christophe@nexedi.com>
Date: Tue, 11 Jul 2006 15:30:59 +0000
Subject: [PATCH] 2006-07-11 chris * Now possible to filter files to commit
 from diff view

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@8411 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../erp5_svn/BusinessTemplate_doSvnCommit.xml         | 11 ++++++++++-
 .../erp5_svn/BusinessTemplate_doSvnDiff.xml           |  3 +++
 .../BusinessTemplate_viewSvnChangelog/added_files.xml |  2 +-
 .../modified_files.xml                                |  2 +-
 .../removed_files.xml                                 |  2 +-
 .../erp5_svn/BusinessTemplate_viewSvnDiff.xml         |  5 -----
 .../BusinessTemplate_viewSvnLogin/your_added.xml      |  2 +-
 .../BusinessTemplate_viewSvnLogin/your_auth.xml       |  2 +-
 .../BusinessTemplate_viewSvnLogin/your_changelog.xml  |  2 +-
 .../BusinessTemplate_viewSvnLogin/your_modified.xml   |  2 +-
 .../BusinessTemplate_viewSvnLogin/your_removed.xml    |  2 +-
 .../BusinessTemplate_viewSvnSSLTrust/your_added.xml   |  2 +-
 .../your_changelog.xml                                |  2 +-
 .../your_modified.xml                                 |  2 +-
 .../BusinessTemplate_viewSvnSSLTrust/your_removed.xml |  2 +-
 bt5/erp5_forge/bt/change_log                          |  3 +++
 bt5/erp5_forge/bt/revision                            |  2 +-
 bt5/erp5_forge/bt/version                             |  2 +-
 18 files changed, 30 insertions(+), 20 deletions(-)

diff --git a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_doSvnCommit.xml b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_doSvnCommit.xml
index 6321b5082d..b62897bfe0 100644
--- a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_doSvnCommit.xml
+++ b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_doSvnCommit.xml
@@ -72,6 +72,14 @@
 
 from Products.ERP5Subversion.SubversionClient import SubversionSSLTrustError, SubversionLoginError\n
 \n
+# XXX: To be compatible with commit from diff view\n
+if same_type(added, []):\n
+  added = \',\'.join(added)\n
+if same_type(modified, []):\n
+  modified = \',\'.join(modified)\n
+if same_type(removed, []):\n
+  removed = \',\'.join(removed)\n
+\n
 commit_non_recurs = added\n
 if commit_non_recurs != \'\' and commit_non_recurs != \'none\':\n
   if modified != \'\' and modified != \'none\':\n
@@ -166,8 +174,9 @@ return context.BusinessTemplate_viewSvnStatus()\n
                             <string>Products.ERP5Subversion.SubversionClient</string>
                             <string>SubversionSSLTrustError</string>
                             <string>SubversionLoginError</string>
-                            <string>commit_non_recurs</string>
+                            <string>same_type</string>
                             <string>_getattr_</string>
+                            <string>commit_non_recurs</string>
                             <string>_getitem_</string>
                             <string>context</string>
                             <string>commit_recurs</string>
diff --git a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_doSvnDiff.xml b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_doSvnDiff.xml
index 1fe40eb023..e30a703f80 100644
--- a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_doSvnDiff.xml
+++ b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_doSvnDiff.xml
@@ -81,6 +81,7 @@ tab_Removed=removed.split(\',\')\n
 \n
 if modified != \'none\':\n
   for f in tab_Modified:\n
+    print \'<input name="modified" value="%s" type="checkbox" checked="checked" />\'%f\n
     f = context.getPortalObject()["portal_subversion"].relativeToAbsolute(f, context)    \n
     print "<span style=\'font-weight: bold; color: black;\'>Index: <a href=\'BusinessTemplate_viewSvnShowFile?file="+f+"\'>"+f+"</a>"\n
     edit_path = context.getPortalObject()["portal_subversion"].editPath(context, f)\n
@@ -92,6 +93,7 @@ if modified != \'none\':\n
 \n
 if added != \'none\':\n
   for f in tab_Added:\n
+    print \'<input name="added" value="%s" type="checkbox" checked="checked" />\'%f\n
     f = context.getPortalObject()["portal_subversion"].relativeToAbsolute(f, context) \n
     print "<span style=\'font-weight: bold; color: black;\'>Index: <a href=\'BusinessTemplate_viewSvnShowFile?file="+f+"\'>"+f+"</a>"\n
     edit_path = context.getPortalObject()["portal_subversion"].editPath(context, f)\n
@@ -102,6 +104,7 @@ if added != \'none\':\n
 \n
 if removed != \'none\':\n
   for f in tab_Removed:\n
+    print \'<input name="removed" value="%s" type="checkbox" checked="checked" />\'%f\n
     f = context.getPortalObject()["portal_subversion"].relativeToAbsolute(f, context) \n
     print "<span style=\'font-weight: bold; color: black;\'>Index: <a href=\'BusinessTemplate_viewSvnShowFile?file="+f+"\'>"+f+"</a>"\n
     edit_path = context.getPortalObject()["portal_subversion"].editPath(context, f)\n
diff --git a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_viewSvnChangelog/added_files.xml b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_viewSvnChangelog/added_files.xml
index e955a935c9..39894d469e 100644
--- a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_viewSvnChangelog/added_files.xml
+++ b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_viewSvnChangelog/added_files.xml
@@ -299,7 +299,7 @@
       <dictionary>
         <item>
             <key> <string>_text</string> </key>
-            <value> <string>python:\'\\n\'.join(here.REQUEST[\'added\'].split(\',\'))</string> </value>
+            <value> <string>python:\'\\n\'.join(here.added.split(\',\'))</string> </value>
         </item>
       </dictionary>
     </pickle>
diff --git a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_viewSvnChangelog/modified_files.xml b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_viewSvnChangelog/modified_files.xml
index 4253577e4e..bb304aa401 100644
--- a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_viewSvnChangelog/modified_files.xml
+++ b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_viewSvnChangelog/modified_files.xml
@@ -299,7 +299,7 @@
       <dictionary>
         <item>
             <key> <string>_text</string> </key>
-            <value> <string>python:\'\\n\'.join(here.REQUEST[\'modified\'].split(\',\'))</string> </value>
+            <value> <string>python:\'\\n\'.join(here.modified.split(\',\'))</string> </value>
         </item>
       </dictionary>
     </pickle>
diff --git a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_viewSvnChangelog/removed_files.xml b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_viewSvnChangelog/removed_files.xml
index c853eb2f12..59a857328c 100644
--- a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_viewSvnChangelog/removed_files.xml
+++ b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_viewSvnChangelog/removed_files.xml
@@ -299,7 +299,7 @@
       <dictionary>
         <item>
             <key> <string>_text</string> </key>
-            <value> <string>python:\'\\n\'.join(here.REQUEST[\'removed\'].split(\',\'))</string> </value>
+            <value> <string>python:\'\\n\'.join(here.removed.split(\',\'))</string> </value>
         </item>
       </dictionary>
     </pickle>
diff --git a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_viewSvnDiff.xml b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_viewSvnDiff.xml
index 5665208006..0b00996009 100644
--- a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_viewSvnDiff.xml
+++ b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_viewSvnDiff.xml
@@ -75,11 +75,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n
                        js_list python: [\'js/menuico.js\', \'js/movableMenu.js\', \'js/BusinessTemplate_doCreateJavaScriptDiff\']">\n
   <tal:block metal:use-macro="here/view_master/macros/master">\n
     <tal:block metal:fill-slot="main">\n
-<!-- Form Hidden : Selected files -->\n
-<input type=\'hidden\' name=\'removed\' tal:attributes="value python:context.REQUEST[\'removed\']"/>\n
-<input type=\'hidden\' name=\'added\' tal:attributes="value python:context.REQUEST[\'added\']"/>\n
-<input type=\'hidden\' name=\'modified\' tal:attributes="value python:context.REQUEST[\'modified\']"/>\n
-<!-- End Hidden -->\n
 <tal:py replace="structure \n
 here/BusinessTemplate_doSvnDiff">diff here</tal:py>\n
 \n
diff --git a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_viewSvnLogin/your_added.xml b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_viewSvnLogin/your_added.xml
index 60f2c655c3..24abe4e901 100644
--- a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_viewSvnLogin/your_added.xml
+++ b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_viewSvnLogin/your_added.xml
@@ -283,7 +283,7 @@
       <dictionary>
         <item>
             <key> <string>_text</string> </key>
-            <value> <string>here/REQUEST/added | nothing</string> </value>
+            <value> <string>here/added | nothing</string> </value>
         </item>
       </dictionary>
     </pickle>
diff --git a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_viewSvnLogin/your_auth.xml b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_viewSvnLogin/your_auth.xml
index 3766953897..80f3f7e801 100644
--- a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_viewSvnLogin/your_auth.xml
+++ b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_viewSvnLogin/your_auth.xml
@@ -283,7 +283,7 @@
       <dictionary>
         <item>
             <key> <string>_text</string> </key>
-            <value> <string>python: here.realm</string> </value>
+            <value> <string>here/realm</string> </value>
         </item>
       </dictionary>
     </pickle>
diff --git a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_viewSvnLogin/your_changelog.xml b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_viewSvnLogin/your_changelog.xml
index 4b50c20f08..d16f207c9e 100644
--- a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_viewSvnLogin/your_changelog.xml
+++ b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_viewSvnLogin/your_changelog.xml
@@ -283,7 +283,7 @@
       <dictionary>
         <item>
             <key> <string>_text</string> </key>
-            <value> <string>here/REQUEST/changelog | nothing</string> </value>
+            <value> <string>here/changelog | nothing</string> </value>
         </item>
       </dictionary>
     </pickle>
diff --git a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_viewSvnLogin/your_modified.xml b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_viewSvnLogin/your_modified.xml
index eafb8d268e..2a9dfee7f4 100644
--- a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_viewSvnLogin/your_modified.xml
+++ b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_viewSvnLogin/your_modified.xml
@@ -283,7 +283,7 @@
       <dictionary>
         <item>
             <key> <string>_text</string> </key>
-            <value> <string>here/REQUEST/modified | nothing</string> </value>
+            <value> <string>here/modified | nothing</string> </value>
         </item>
       </dictionary>
     </pickle>
diff --git a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_viewSvnLogin/your_removed.xml b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_viewSvnLogin/your_removed.xml
index d82bdfe656..ab62507028 100644
--- a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_viewSvnLogin/your_removed.xml
+++ b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_viewSvnLogin/your_removed.xml
@@ -283,7 +283,7 @@
       <dictionary>
         <item>
             <key> <string>_text</string> </key>
-            <value> <string>here/REQUEST/removed | nothing</string> </value>
+            <value> <string>here/removed | nothing</string> </value>
         </item>
       </dictionary>
     </pickle>
diff --git a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_viewSvnSSLTrust/your_added.xml b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_viewSvnSSLTrust/your_added.xml
index 60f2c655c3..24abe4e901 100644
--- a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_viewSvnSSLTrust/your_added.xml
+++ b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_viewSvnSSLTrust/your_added.xml
@@ -283,7 +283,7 @@
       <dictionary>
         <item>
             <key> <string>_text</string> </key>
-            <value> <string>here/REQUEST/added | nothing</string> </value>
+            <value> <string>here/added | nothing</string> </value>
         </item>
       </dictionary>
     </pickle>
diff --git a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_viewSvnSSLTrust/your_changelog.xml b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_viewSvnSSLTrust/your_changelog.xml
index f7ab5939b8..2ba20fce51 100644
--- a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_viewSvnSSLTrust/your_changelog.xml
+++ b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_viewSvnSSLTrust/your_changelog.xml
@@ -283,7 +283,7 @@
       <dictionary>
         <item>
             <key> <string>_text</string> </key>
-            <value> <string>here/REQUEST/changelog | nothing</string> </value>
+            <value> <string>here/changelog | nothing</string> </value>
         </item>
       </dictionary>
     </pickle>
diff --git a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_viewSvnSSLTrust/your_modified.xml b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_viewSvnSSLTrust/your_modified.xml
index eafb8d268e..2a9dfee7f4 100644
--- a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_viewSvnSSLTrust/your_modified.xml
+++ b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_viewSvnSSLTrust/your_modified.xml
@@ -283,7 +283,7 @@
       <dictionary>
         <item>
             <key> <string>_text</string> </key>
-            <value> <string>here/REQUEST/modified | nothing</string> </value>
+            <value> <string>here/modified | nothing</string> </value>
         </item>
       </dictionary>
     </pickle>
diff --git a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_viewSvnSSLTrust/your_removed.xml b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_viewSvnSSLTrust/your_removed.xml
index d82bdfe656..ab62507028 100644
--- a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_viewSvnSSLTrust/your_removed.xml
+++ b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_viewSvnSSLTrust/your_removed.xml
@@ -283,7 +283,7 @@
       <dictionary>
         <item>
             <key> <string>_text</string> </key>
-            <value> <string>here/REQUEST/removed | nothing</string> </value>
+            <value> <string>here/removed | nothing</string> </value>
         </item>
       </dictionary>
     </pickle>
diff --git a/bt5/erp5_forge/bt/change_log b/bt5/erp5_forge/bt/change_log
index 923e383619..07834271f7 100644
--- a/bt5/erp5_forge/bt/change_log
+++ b/bt5/erp5_forge/bt/change_log
@@ -1,3 +1,6 @@
+2006-07-11 chris
+* Now possible to filter files to commit from diff view
+
 2006-07-05 chris
 * ERP5Subversion now detects outdated files so that user know if he needs to update his working copy or not.
 
diff --git a/bt5/erp5_forge/bt/revision b/bt5/erp5_forge/bt/revision
index c5b431b6cb..8783e30511 100644
--- a/bt5/erp5_forge/bt/revision
+++ b/bt5/erp5_forge/bt/revision
@@ -1 +1 @@
-50
\ No newline at end of file
+53
\ No newline at end of file
diff --git a/bt5/erp5_forge/bt/version b/bt5/erp5_forge/bt/version
index fcbb5375b7..bbde4bee23 100644
--- a/bt5/erp5_forge/bt/version
+++ b/bt5/erp5_forge/bt/version
@@ -1 +1 @@
-0.8.4
\ No newline at end of file
+0.8.5
\ No newline at end of file
-- 
2.30.9