Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5-Boxiang
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Hamza
erp5-Boxiang
Commits
1b5bb244
Commit
1b5bb244
authored
Nov 25, 2013
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
syncml: include ID of document in the point fix diff
parent
e40ee89a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
bt5/erp5_syncml/ExtensionTemplateItem/portal_components/extension.erp5.SyncMLTool.py
...mplateItem/portal_components/extension.erp5.SyncMLTool.py
+6
-4
bt5/erp5_syncml/bt/revision
bt5/erp5_syncml/bt/revision
+1
-1
No files found.
bt5/erp5_syncml/ExtensionTemplateItem/portal_components/extension.erp5.SyncMLTool.py
View file @
1b5bb244
...
@@ -24,11 +24,12 @@
...
@@ -24,11 +24,12 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
#
##############################################################################
##############################################################################
import
base64
from
lxml
import
etree
from
lxml
import
etree
from
difflib
import
unified_diff
from
difflib
import
unified_diff
from
Products.ERP5Type.DiffUtils
import
DiffFile
from
Products.ERP5Type.DiffUtils
import
DiffFile
def
diffXML
(
xml_plugin
=
""
,
xml_erp5
=
""
,
html
=
True
):
def
diffXML
(
xml_plugin
=
""
,
xml_erp5
=
""
,
gid
=
""
,
html
=
True
):
if
isinstance
(
xml_erp5
,
unicode
):
if
isinstance
(
xml_erp5
,
unicode
):
xml_erp5
=
xml_erp5
.
encode
(
'utf-8'
)
xml_erp5
=
xml_erp5
.
encode
(
'utf-8'
)
if
xml_plugin
==
""
:
if
xml_plugin
==
""
:
...
@@ -50,11 +51,12 @@ def diffXML(xml_plugin="", xml_erp5="", html=True):
...
@@ -50,11 +51,12 @@ def diffXML(xml_plugin="", xml_erp5="", html=True):
pass
pass
diff_list
=
list
(
unified_diff
(
xml_plugin
.
split
(
'
\
n
'
),
xml_erp5
.
split
(
'
\
n
'
),
tofile
=
"erp5 xml"
,
fromfile
=
"plugin xml"
,
lineterm
=
''
))
diff_list
=
list
(
unified_diff
(
xml_plugin
.
split
(
'
\
n
'
),
xml_erp5
.
split
(
'
\
n
'
),
tofile
=
"erp5 xml"
,
fromfile
=
"plugin xml"
,
lineterm
=
''
))
if
len
(
diff_list
)
!=
0
:
if
diff_list
:
diff_msg
=
'
\
n
\
n
XML Diff :
\
n
'
diff_msg
=
'
\
n
\
n
XML Diff :
\
n
'
if
gid
:
diff_msg
=
'
\
n
\
n
XML Diff for %s:
\
n
'
%
base64
.
b16decode
(
gid
)
diff_msg
+=
'
\
n
'
.
join
(
diff_list
)
diff_msg
+=
'
\
n
'
.
join
(
diff_list
)
if
html
:
if
html
:
return
DiffFile
(
diff_msg
).
toHTML
()
return
DiffFile
(
diff_msg
).
toHTML
()
return
diff_msg
return
diff_msg
else
:
return
'No diff'
return
'No diff'
bt5/erp5_syncml/bt/revision
View file @
1b5bb244
119
121
\ No newline at end of file
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment