Commit 93de2794 authored by Christophe Dumez's avatar Christophe Dumez

- Improved support for diff between 2 old revisions (not perfect but working now)

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@6805 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 322a9f48
...@@ -80,6 +80,8 @@ if len(revisions_list) != 2:\n ...@@ -80,6 +80,8 @@ if len(revisions_list) != 2:\n
context.REQUEST.set(\'portal_status_message\', \'You must select only TWO revisions!\')\n context.REQUEST.set(\'portal_status_message\', \'You must select only TWO revisions!\')\n
return context.asContext(file=file).BusinessTemplate_viewSvnLog()\n return context.asContext(file=file).BusinessTemplate_viewSvnLog()\n
\n \n
revisions_list.sort()\n
\n
svn_path = context.getPortalObject().portal_preferences.getPreference(\'subversion_working_copy\')\n svn_path = context.getPortalObject().portal_preferences.getPreference(\'subversion_working_copy\')\n
if not svn_path :\n if not svn_path :\n
raise "Error: Please set Subversion working path in preferences"\n raise "Error: Please set Subversion working path in preferences"\n
...@@ -87,11 +89,11 @@ if svn_path[-1]!=\'/\':\n ...@@ -87,11 +89,11 @@ if svn_path[-1]!=\'/\':\n
svn_path+=\'/\'\n svn_path+=\'/\'\n
file = svn_path + file\n file = svn_path + file\n
\n \n
print "<b><font color=\'black\'>Index: <a href=\'BusinessTemplate_viewSvnShowFile?file="+file+"\'>"+file+"</a> <a href=\'"+context.getPortalObject()["portal_subversion"].editPath(context, file)+"\'><img src=\'imgs/edit.png\' border=\'0\'></a><br>"\n diff = "<b><font color=\'black\'>Index: <a href=\'BusinessTemplate_viewSvnShowFile?file="+file+"\'>"+file+"</a> <a href=\'"+context.getPortalObject()["portal_subversion"].editPath(context, file)+"\'><img src=\'imgs/edit.png\' border=\'0\'></a><br>"\n
print \'<hr></font></b>\'\n diff += \'<hr></b>\'\n
print context.getPortalObject()["portal_subversion"].diffHTML(file)\n diff += context.getPortalObject()["portal_subversion"].diffHTML(file, revision1=revisions_list[0], revision2=revisions_list[1])\n
\n diff += \'</font>\'\n
return printed\n return context.asContext(diff=diff).BusinessTemplate_viewSvnMultiDiff()\n
]]></string> </value> ]]></string> </value>
...@@ -135,8 +137,6 @@ return printed\n ...@@ -135,8 +137,6 @@ return printed\n
<value> <value>
<tuple> <tuple>
<string>kw</string> <string>kw</string>
<string>_print_</string>
<string>_print</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
...@@ -144,6 +144,7 @@ return printed\n ...@@ -144,6 +144,7 @@ return printed\n
<string>revisions_list</string> <string>revisions_list</string>
<string>len</string> <string>len</string>
<string>svn_path</string> <string>svn_path</string>
<string>diff</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PageTemplates.ZopePageTemplate</string>
<string>ZopePageTemplate</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</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_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_text</string> </key>
<value> <string encoding="cdata"><![CDATA[
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"\n
"DTD/xhtml1-strict.dtd">\n
<?xml-stylesheet href="erp5.css" rel="stylesheet" type="text/css"?>\n
\n
<tal:block metal:use-macro="here/view_master/macros/master">\n
<tal:block metal:fill-slot="main">\n
\n
<tal:py replace="structure \n
here/diff">diff here</tal:py>\n
<center><button onclick="history.back()" value="Back" name="Back" type="button">Back</button></center>\n
</tal:block>\n
</tal:block>\n
]]></string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>BusinessTemplate_viewSvnMultiDiff</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment