plasticscm

Is it possible to compare files using Plastic SCM Command Line 'cm diff' function?


I'd like to compare two files at particular changesets to see if they are identical or not.

Something like:

>> cm diff rev:Folder\MyFile.py#cs:5 rev:Folder\MyFile.py#cs:10
<< True

I'm getting an error (can't find revision of file I specify) and I think I might not be using diff as it's intended. I've worked around my confusion by using getfile on the particular file and changesets I'm comparing and using a python library file compare.

Thanks.


Solution

  • The Plastic SCM default diff tool will open a GUI showing you the file differences. But you can manually configure a different one (eg. diff.exe) manually editing the "/home/user/.plastic/client.conf" or using the Plastic SCM GUI:

    <DiffToolData>
          <FileType>enTextFile</FileType>
          <FileExtensions>*</FileExtensions>
          <Tools>
            <string>diff.exe @sourcefile @destinationfile</string>
          </Tools>
    </DiffToolData>
    

    This way, you can run diffs through the command line and based on the output, determine if the files are identical or not.