[Erp5-report] r44044 jm - in /erp5/trunk: bt5/erp5_forge/ActionTemplateItem/portal_types/Bu...

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Mar 8 11:42:16 CET 2011


Author: jm
Date: Tue Mar  8 11:42:16 2011
New Revision: 44044

URL: http://svn.erp5.org?rev=44044&view=rev
Log:
ERP5VCS: add action to clean working copy

Added:
    erp5/trunk/bt5/erp5_forge/ActionTemplateItem/portal_types/Business%20Template/clean_vcs_bt.xml
    erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_vcs/BusinessTemplate_doVcsClean.xml
Modified:
    erp5/trunk/bt5/erp5_forge/bt/revision
    erp5/trunk/bt5/erp5_forge/bt/template_action_path_list
    erp5/trunk/products/ERP5VCS/Subversion.py

Added: erp5/trunk/bt5/erp5_forge/ActionTemplateItem/portal_types/Business%20Template/clean_vcs_bt.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_forge/ActionTemplateItem/portal_types/Business%2520Template/clean_vcs_bt.xml?rev=44044&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_forge/ActionTemplateItem/portal_types/Business%20Template/clean_vcs_bt.xml (added)
+++ erp5/trunk/bt5/erp5_forge/ActionTemplateItem/portal_types/Business%20Template/clean_vcs_bt.xml [utf8] Tue Mar  8 11:42:16 2011
@@ -0,0 +1,81 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>action</string> </key>
+            <value>
+              <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
+            </value>
+        </item>
+        <item>
+            <key> <string>categories</string> </key>
+            <value>
+              <tuple>
+                <string>action_type/object_action</string>
+              </tuple>
+            </value>
+        </item>
+        <item>
+            <key> <string>category</string> </key>
+            <value> <string>object_action</string> </value>
+        </item>
+        <item>
+            <key> <string>condition</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
+            <key> <string>description</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>icon</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>clean_vcs_bt</string> </value>
+        </item>
+        <item>
+            <key> <string>permissions</string> </key>
+            <value>
+              <tuple>
+                <string>Manage portal</string>
+              </tuple>
+            </value>
+        </item>
+        <item>
+            <key> <string>priority</string> </key>
+            <value> <float>15.0</float> </value>
+        </item>
+        <item>
+            <key> <string>title</string> </key>
+            <value> <string>Throw Away Local VCS Changes</string> </value>
+        </item>
+        <item>
+            <key> <string>visible</string> </key>
+            <value> <int>1</int> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+  <record id="2" aka="AAAAAAAAAAI=">
+    <pickle>
+      <global name="Expression" module="Products.CMFCore.Expression"/>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>text</string> </key>
+            <value> <string>string:${object_url}/BusinessTemplate_doVcsClean</string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>

Added: erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_vcs/BusinessTemplate_doVcsClean.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_vcs/BusinessTemplate_doVcsClean.xml?rev=44044&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_vcs/BusinessTemplate_doVcsClean.xml (added)
+++ erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_vcs/BusinessTemplate_doVcsClean.xml [utf8] Tue Mar  8 11:42:16 2011
@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>Script_magic</string> </key>
+            <value> <int>3</int> </value>
+        </item>
+        <item>
+            <key> <string>_bind_names</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>_asgns</string> </key>
+                        <value>
+                          <dictionary>
+                            <item>
+                                <key> <string>name_container</string> </key>
+                                <value> <string>container</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_context</string> </key>
+                                <value> <string>context</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_m_self</string> </key>
+                                <value> <string>script</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_subpath</string> </key>
+                                <value> <string>traverse_subpath</string> </value>
+                            </item>
+                          </dictionary>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>_body</string> </key>
+            <value> <string>context.getVcsTool().clean()\n
+\n
+context.REQUEST.set(\'portal_status_message\', \'Working copy cleaned successfully.\')\n
+return context.view()\n
+</string> </value>
+        </item>
+        <item>
+            <key> <string>_params</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>BusinessTemplate_doVcsClean</string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>

Modified: erp5/trunk/bt5/erp5_forge/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_forge/bt/revision?rev=44044&r1=44043&r2=44044&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_forge/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_forge/bt/revision [utf8] Tue Mar  8 11:42:16 2011
@@ -1 +1 @@
-646
\ No newline at end of file
+647
\ No newline at end of file

Modified: erp5/trunk/bt5/erp5_forge/bt/template_action_path_list
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_forge/bt/template_action_path_list?rev=44044&r1=44043&r2=44044&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_forge/bt/template_action_path_list [utf8] (original)
+++ erp5/trunk/bt5/erp5_forge/bt/template_action_path_list [utf8] Tue Mar  8 11:42:16 2011
@@ -7,6 +7,7 @@ Bug | bug_line_send
 Bug | document_list
 Bug | new_file
 Bug | view
+Business Template | clean_vcs_bt
 Business Template | conflicted_files
 Business Template | create_report
 Business Template | create_working_copy

Modified: erp5/trunk/products/ERP5VCS/Subversion.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5VCS/Subversion.py?rev=44044&r1=44043&r2=44044&view=diff
==============================================================================
--- erp5/trunk/products/ERP5VCS/Subversion.py [utf8] (original)
+++ erp5/trunk/products/ERP5VCS/Subversion.py [utf8] Tue Mar  8 11:42:16 2011
@@ -160,6 +160,11 @@ class Subversion(WorkingCopy):
     """
     return self._getClient().log(os.path.join(self.working_copy, path))
 
+  @chdir_working_copy
+  def clean(self):
+    self.revert('.', True)
+    self._clean('.')
+
   def _clean(self, path):
     client = self._getClient()
     for status_obj in client.status(path):



More information about the Erp5-report mailing list