SourceSafe issue on comparison with local file

SourceSafe issue on comparison with local file

4
NewbieNewbie
4

    Jul 11, 2012#1

    I'm using UltraCompare 6.40. I have Sourcesafe configured to use UC like this:

    C:\Program Files\IDM Computer Solutions\UltraCompare\uc.exe "%1" "%2"

    as per the instructions.

    If I pull up the history for a file, select 2 versions and click diff then all is well.
    However, if I select just one version and click diff, or just click on the file in the normal sourcesafe browse tree and click "show differences" it is supposed to compare that version with the one I have on disk but I instead get an error:

    Cannot open file:
    C:\whatever\state

    it may not exist or it may be locked by another program

    The file in question lives in a folder hierarchy that ends with a folder called "State machine"

    It seems to be having a problem with the space in the folder name. Does anyone know of a workaround?

    Thanks.

    6,688587
    Grand MasterGrand Master
    6,688587

      Jul 11, 2012#2

      I don't use SourceSafe. But I'm wondering that the full application file name must not be enclosed in double quotes as

      C:\Program Files\IDM Computer Solutions\UltraCompare\uc.exe

      contains also spaces. In topic External diff program / compare tool you can read how to find out how an application calls another application. You can use Process Explorer after UltraCompare was started by SourceSafe to find out what was the command line SourceSafe used to start UltraCompare. You temporarily use the batch file I posted to see how SourceSafe calls the comparison tool on comparing a file in repository with local file. The first thing for finding a workaround is to find out what currently happens.

      4
      NewbieNewbie
      4

        Jul 11, 2012#3

        OK, when I right click on a file in sourcesafe and ask it to "Show differences" UC.exe launches with the following arguments:

        "C:\Users\myname\AppData\Local\temp\filename.h" "C:\Users\myname\Work\FolderA\Release\System\FolderB\FolderC\State Machine\filename.h"

        I've changed some of the folder names above. All folders have no spaces in them apart from the last folder in the second argument. The result is that UC.EXE launches with 3 diff panes open and the error I mentioned in my original post.

        Typing the above from a command line gives the same result actually.

        If I pull up the history of the files and diff them then the arguments passed to uc.exe are both based on temporary folders (like argument #1 above) and so it opens with 2 panes and all is well.

        Seems to me that UC doesn't support command line arguments that have spaces in them?

        EDIT:
        Ok, I launched UC from UEStudio and told it to compare those same two files, checked the arguments that were passed and noticed that the arguments were not wrapped in double quotes. So, i went back to sourcesafe, removed the quotes around %1 and %2 and now it works. So, i think it's just the documentation that's wrong. Anyway, I'm back up and running.