Topic
  • 7 replies
  • Latest Post - ‏2013-05-04T20:54:27Z by omalecot
omalecot
omalecot
344 Posts

Pinned topic Diff/Merge xml files

‏2013-05-01T15:58:01Z |

Hi,

Basically, ClearCase does not diff or merge xml file with a real xml parsing, it dff/merge xml files like text files,

Is there a solution to process correctly xml files?

Regards

Olivier

 

  • Dave-Robinson
    Dave-Robinson
    116 Posts

    Re: Diff/Merge xml files

    ‏2013-05-02T10:32:09Z  

    files with XML content should be added to source control with element type xml

    2010-09-01     vobmad      element type "xml"
      "Predefined element type used to represent an XML file."

    This is defined with a type manager that does XML parsing for compare / merge operations

     

  • omalecot
    omalecot
    344 Posts

    Re: Diff/Merge xml files

    ‏2013-05-02T18:55:40Z  

    no, sorry, but this does work, support confirmed that it just does a textual diff/merge, nothing more.

    Olivier

     

  • pdubovitsky
    pdubovitsky
    189 Posts

    Re: Diff/Merge xml files

    ‏2013-05-02T20:56:59Z  
    • omalecot
    • ‏2013-05-02T18:55:40Z

    no, sorry, but this does work, support confirmed that it just does a textual diff/merge, nothing more.

    Olivier

     

    Unless you are using very old version of ClearCase, xml type manager parses xml (with some limitations) and presents it accordingly in diff operations.

    Pavel

  • Dave-Robinson
    Dave-Robinson
    116 Posts

    Re: Diff/Merge xml files

    ‏2013-05-03T03:11:27Z  
    • omalecot
    • ‏2013-05-02T18:55:40Z

    no, sorry, but this does work, support confirmed that it just does a textual diff/merge, nothing more.

    Olivier

     

    OK, actually my answer was valid only for when you are working on a Windows client in the GUI

    here are the type manager definitions

    -------- Windows -------------

    _xml2            construct_version        ..\..\bin\bdtm.exe
    _xml2            create_branch            ..\..\bin\bdtm.exe
    _xml2            create_element            ..\..\bin\bdtm.exe
    _xml2            create_version            ..\..\bin\bdtm.exe
    _xml2            delete_branches_versions    ..\..\bin\bdtm.exe
    _xml2            compare                ..\..\bin\cleardiff.exe
    _xml2            xcompare            ..\..\bin\xmldiffmrg.exe
    _xml2            merge                ..\..\bin\cleardiff.exe
    _xml2            xmerge                ..\..\bin\xmldiffmrg.exe
    _xml2            annotate            ..\..\bin\bdtm.exe
    _xml2            get_cont_info            ..\..\bin\bdtm.exe

    -------------------------------------------------------

    ------------- UNIX --------------------------

    [24] %pwd
    /opt/IBM/RationalSDLC/clearcase/sun5/lib/mgrs

    [25] %ll _xml2
    total 26
    drwxrwxr-x   2 root     root         512 Mar 13 06:53 .
    drwxrwxr-x  26 root     root        1.0K Mar 13 06:52 ..
    lrwxrwxrwx   1 root     root          24 Mar 13 06:52 annotate -> ../binary_delta/annotate
    lrwxrwxrwx   1 root     root          26 Mar 13 06:52 compare -> ../text_file_delta/compare
    lrwxrwxrwx   1 root     root          33 Mar 13 06:52 construct_version -> ../binary_delta/construct_version
    lrwxrwxrwx   1 root     root          29 Mar 13 06:52 create_branch -> ../binary_delta/create_branch
    lrwxrwxrwx   1 root     root          30 Mar 13 06:52 create_element -> ../binary_delta/create_element
    lrwxrwxrwx   1 root     root          30 Mar 13 06:52 create_version -> ../binary_delta/create_version
    lrwxrwxrwx   1 root     root          40 Mar 13 06:52 delete_branches_versions -> ../binary_delta/delete_branches_versions
    lrwxrwxrwx   1 root     root          29 Mar 13 06:52 get_cont_info -> ../binary_delta/get_cont_info
    lrwxrwxrwx   1 root     root          24 Mar 13 06:52 merge -> ../text_file_delta/merge
    lrwxrwxrwx   1 root     root          27 Mar 13 06:53 xcompare -> ../text_file_delta/xcompare
    lrwxrwxrwx   1 root     root          25 Mar 13 06:53 xmerge -> ../text_file_delta/xmerge
    [26] %ll text_file_delta
    total 84
    drwxrwxr-x   2 root     root         512 Mar 13 06:53 .
    drwxrwxr-x  26 root     root        1.0K Mar 13 06:52 ..
    lrwxrwxrwx   1 root     root           6 Mar 13 06:52 annotate -> tfdmgr
    lrwxrwxrwx   1 root     root          22 Mar 13 06:52 compare -> ../../../bin/cleardiff
    lrwxrwxrwx   1 root     root           6 Mar 13 06:52 construct_version -> tfdmgr
    lrwxrwxrwx   1 root     root           6 Mar 13 06:52 create_branch -> tfdmgr
    lrwxrwxrwx   1 root     root           6 Mar 13 06:52 create_element -> tfdmgr
    lrwxrwxrwx   1 root     root           6 Mar 13 06:52 create_version -> tfdmgr
    lrwxrwxrwx   1 root     root           6 Mar 13 06:52 delete_branches_versions -> tfdmgr
    lrwxrwxrwx   1 root     root           6 Mar 13 06:52 get_cont_info -> tfdmgr
    lrwxrwxrwx   1 root     root          22 Mar 13 06:52 merge -> ../../../bin/cleardiff
    -rwxrwxr-x   1 root     root         29K Feb  8 05:16 tfdmgr
    lrwxrwxrwx   1 root     root          23 Mar 13 06:53 xcompare -> ../../../bin/xcleardiff
    lrwxrwxrwx   1 root     root          23 Mar 13 06:53 xmerge -> ../../../bin/xcleardiff

    [27] %


     

     

    "xmldiffmrg.exe" does XML parsing,

    "cleardiff" and "xcleardiff" compare / merge based on line feeds

     

    If you have a 3rd party tool that does the job in your platform / environment, it probably can beinstalled as a "custom type manager"  (may need a "wrapper" if it does not accept command line arguments as ClearCase provides)

    An Enhancement Request was raised many years ago to port xmldiffmrg to UNIX, but never provided.

    I haven't checked whether there is anything visible in "Rational RFE Community", but that would be the forum to raise support for IBM to provide one.

  • Wolfgang Uhr
    Wolfgang Uhr
    1 Post

    Re: Diff/Merge xml files

    ‏2013-05-03T08:29:04Z  

    If you want to diff/merge some files it is a good choice to use an external too. For standard text files I use k3. For xml-Files the diffdog of Altova may be a good choice?

     

    http://www.altova.com/de/diffdog.html

     

    Or you can get a look into this discussion: http://stackoverflow.com/questions/1871076/are-there-any-free-xml-diff-merge-tools-available

  • omalecot
    omalecot
    344 Posts

    Re: Diff/Merge xml files

    ‏2013-05-04T20:51:40Z  

    Unless you are using very old version of ClearCase, xml type manager parses xml (with some limitations) and presents it accordingly in diff operations.

    Pavel

    Hi Pavel,

    I did the test with cli and gui, except if you know some magical option, it does not work for me. CC version was 7.1.2.10.

    The case : another tool produces xml files, and these files go into ClearCase. In these xml files, blocs are not always in the same order, even if without changes. This blocs are marked as new/deleted in cli and gui, no xml parsing is applied.

    Tell me if you know any solution, but support said there is not.

    I guess it could work if blocs are always in a same order.

    Regards

    Olivier

    Updated on 2013-05-04T20:55:56Z at 2013-05-04T20:55:56Z by omalecot
  • omalecot
    omalecot
    344 Posts

    Re: Diff/Merge xml files

    ‏2013-05-04T20:54:27Z  

    If you want to diff/merge some files it is a good choice to use an external too. For standard text files I use k3. For xml-Files the diffdog of Altova may be a good choice?

     

    http://www.altova.com/de/diffdog.html

     

    Or you can get a look into this discussion: http://stackoverflow.com/questions/1871076/are-there-any-free-xml-diff-merge-tools-available

    Thanks,

    It can help,

    Regards

    Olivier