Skip to main content
    Country/region select      Terms of use
     Home      Products      Services & solutions      Support & downloads      My account     

developerWorks  >  Lotus  >  Forums & community  >  Best Practice Makes Perfect

Best Practice Makes Perfect

A collaboration with Domino developers about how to do it and how to get it right in Domino

I'm sorry there's  been such a long interval between posts -- very busy developing new product features. I hope to make it worth the wait by providing something useful now.

I've been working on this as I could find time, and I think it's ready to post for people to try out and add on to. I've written about it before, but it wasn't finished enough to post at that time.

What we have here is an end-user tool that includes a toolbar button you can click while you have a replication conflict document open or highlighted (or the main document), and it will open the replication conflict and main document side by side to compare them visually. There's also a list of the field differences and a marked-up version of any rich text showing what has changed (text differences only, I'm afraid, but still helpful).

This is provided "as is" for you to play with and comment on -- if you have a problem, please do not call Lotus Support! But you can post a comment here.

When you open the database, installation and use instructions will be visible.

The "diff" action is not described in the instructions; it lets you launch an external application of your choice on the text rendering of the entire document (text in OS style fields seems to be missing, unfortunately -- must write another bug report). I mean to change this to use the DXL versions of the documents run through XSLT to prettify it, but this will require a little work and a version of Notes that doesn't have the DOM parser bug that I wrote about previously. In the meantime, if you use winmerge, my favorite tool for the purpose, the proper command line is:

"C:\Program Files\winmerge\WinMerge.exe" /e /x /ub /wl /wr /dl "Original Document" /dr "Conflict Document" "%1" "%2"

(substituting the appropriate filepath, of course).

Attachment: docConflict.nsf

NOTE: The application was created using version 8.0. I think it will work in 7.0 also; if not please tell me. Earlier than 7.0 is not a good bet.

In case the "Install" button doesn't work for you, here's the code for the toolbar button:

_dbpath := @Environment("DocConflictPath");
@If(_dbpath = ""; @Return(@Prompt([Ok]; "Conflict Resolver"; "Conflict Tool path unknown -- you must open the database so it can register itself in your notes.ini (DocConflictPath)")); "");
ENVIRONMENT Param1 := @Name([CN]; @DbName[1]) + "|" + @DbName[2] + "||" + @Text(@DocumentUniqueID);
@Command([Compose];  @Left(_dbpath; "!!") : @RightBack("!!"+_dbpath; "!!"); "ConflictFinder");
@If(@Elements(@Explode(@Environment("Param1"); "|"; 1)) = 6;
  @Command([FileOpenDatabase]; @Left(_dbpath; "!!") : @RightBack("!!"+_dbpath; "!!"));
@Environment("Param1") != "!";
  @Prompt([Ok]; "Conflict compare"; "There was a problem... either I couldn't find the other document to compare to, or couldn't open the database, or... See status bar for a clue.");

and here's the image I use on the button: conflict.gif

Andre Guirard | 11 September 2007 11:00:00 PM ET | Plymouth, MN, USA | Comments (17)

Search this blog 


    About IBM Privacy Contact