docdiff always fails with "Error comparing X and Y"

Issue #3404 new
Gili
created an issue

Microsoft Office Professional Plus 2013 running under Windows 7 64-bit, TortoiseHg 2.9.2

  1. Open TortoiseHg commit window
  2. Double-click on docx file
  3. "Visual Diffs" dialog comes up with "docdiff" as the default tool.
  4. Double click on the filename (there is only one)
  5. One word document opens, then an error dialog appears: "Error comparing C:\Users\Gili\Documents\vtlr\documentation\ServerProtocol.docx and c:\users\gili\appdata\local\temp\thg.fp4dds\vtlr.3.28\documentation\ServerProtocol.docx"
  6. I tried manually opening these two files without closing the error dialog and they both opened successfully, so it's not clear what is going wrong.

How do I debug this further?

Comments (6)

  1. Gili reporter

    Steve,

    The diff script from trunk (r24045) work perfectly. Please integrate it right away.

    The merge script (same revision) fails with this error (which appears in TortoiseHg's dialog):

    abort: The process cannot access the file because it is being used by another process: C:\Users\Gili\Documents\test\MyWord.docx.orig

    When I investigated further I discovered that Word has this file locked. I'm not sure why TortoiseHg is trying to access it, but it looks like it's trying to do so right after launching the merge script but by that time Word has already opened it.

    Anyway, this prevents the merge process from completing successfully. How do we proceed?

  2. Steve Borho

    Try to get a stack trace for that abort message by setting THGDEBUG=1 in your environment then start thg.exe from a command prompt and reproing the problem

  3. Gili reporter
    1. I start the graft operation
    2. thg launches Word 3 times: foo.docx.orig, foo.docx~base, foo.docx~other
    3. A dialog pops up in foo.docx.orig: "You have to accept or reject the changes before saving the document to prevent future problems. Would you like to see a help page on how to do this?"
    4. Up until this point, thg is waiting for the merge process. The second I hit "No" on the dialog from step 3 I get this in the output window:
    % hg graft --config ui.merge=internal:fail 59
    grafting revision 59
    merging documentation/ServerProtocol.docx
    abort: The process cannot access the file because it is being used by another process: C:\Users\Gili\Documents\vtlr.edited-history\documentation/ServerProtocol.docx.orig
    [command returned code 255 Thu Oct 24 00:34:40 2013]
    

    Here is what I see in the command-line console:

    setting up excepthook
    opening repo: C:\Users\Gili\Documents\vtlr.edited-history
    add file to watcher: C:\Users\Gili\Documents\vtlr.edited-history\.hg/store/00cha
    ngelog.i
    add file to watcher: C:\Users\Gili\Documents\vtlr.edited-history\.hg/store/phase
    roots
    add file to watcher: C:\Users\Gili\Documents\vtlr.edited-history\.hg\bookmarks.c
    urrent
    add ui file to watcher: C:\Program Files\TortoiseHg\hgrc.d\Paths.rc
    add ui file to watcher: C:\Program Files\TortoiseHg\hgrc.d\TerminalTools.rc
    add ui file to watcher: C:\Program Files\TortoiseHg\hgrc.d\EditorTools.rc
    add ui file to watcher: C:\Users\Gili\mercurial.ini
    add ui file to watcher: C:\Program Files\TortoiseHg\hgrc.d\MergeTools.rc
    add ui file to watcher: C:\Users\Gili\Documents\vtlr.edited-history\.hg\hgrc
    add ui file to watcher: C:\Program Files\TortoiseHg\hgrc.d\Mercurial.rc
    add ui file to watcher: C:\Program Files\TortoiseHg\hgrc.d\MergePatterns.rc
    GarbageCollector.check: 24079 7 3
    collected gen 0, found 563 unreachable
    failed to remove paths - destroying watcher
    add file to watcher: C:\Users\Gili\Documents\vtlr.edited-history\.hg/store/00cha
    ngelog.i
    add file to watcher: C:\Users\Gili\Documents\vtlr.edited-history\.hg/store/phase
    roots
    add file to watcher: C:\Users\Gili\Documents\vtlr.edited-history\.hg\bookmarks.c
    urrent
    add ui file to watcher: C:\Program Files\TortoiseHg\hgrc.d\Paths.rc
    add ui file to watcher: C:\Program Files\TortoiseHg\hgrc.d\TerminalTools.rc
    add ui file to watcher: C:\Program Files\TortoiseHg\hgrc.d\EditorTools.rc
    add ui file to watcher: C:\Users\Gili\mercurial.ini
    add ui file to watcher: C:\Program Files\TortoiseHg\hgrc.d\MergeTools.rc
    add ui file to watcher: C:\Users\Gili\Documents\vtlr.edited-history\.hg\hgrc
    add ui file to watcher: C:\Program Files\TortoiseHg\hgrc.d\Mercurial.rc
    add ui file to watcher: C:\Program Files\TortoiseHg\hgrc.d\MergePatterns.rc
    GarbageCollector.check: 4521 8 3
    collected gen 0, found 1311 unreachable
    failed to remove paths - destroying watcher
    GarbageCollector.check: 2353 9 3
    collected gen 0, found 426 unreachable
    add file to watcher: C:\Users\Gili\Documents\vtlr.edited-history\.hg/store/00cha
    ngelog.i
    add file to watcher: C:\Users\Gili\Documents\vtlr.edited-history\.hg/store/phase
    roots
    add file to watcher: C:\Users\Gili\Documents\vtlr.edited-history\.hg\bookmarks.c
    urrent
    add ui file to watcher: C:\Program Files\TortoiseHg\hgrc.d\Paths.rc
    add ui file to watcher: C:\Program Files\TortoiseHg\hgrc.d\TerminalTools.rc
    add ui file to watcher: C:\Program Files\TortoiseHg\hgrc.d\EditorTools.rc
    add ui file to watcher: C:\Users\Gili\mercurial.ini
    add ui file to watcher: C:\Program Files\TortoiseHg\hgrc.d\MergeTools.rc
    add ui file to watcher: C:\Users\Gili\Documents\vtlr.edited-history\.hg\hgrc
    add ui file to watcher: C:\Program Files\TortoiseHg\hgrc.d\Mercurial.rc
    add ui file to watcher: C:\Program Files\TortoiseHg\hgrc.d\MergePatterns.rc
    GarbageCollector.check: 1341 10 3
    collected gen 0, found 81 unreachable
    

    I don't see anything useful here, do you? What now?

  4. Log in to comment