Quantcast
Channel: Encoding – The Wiert Corner – irregular stream of stuff
Viewing all articles
Browse latest Browse all 160

Plastic SCM command-line for merge and diff

$
0
0

Just in case I have Plastic SCM without Beyond Compare:

Merge

"C:\Program Files\PlasticSCM5\client\mergetool" -b="%TEMP%\baseFile-guid.pas" -bn="baseSymbolicName" -bh="baseHash" -s="%TEMP%\sourceFile-guid.pas" -sn="srcSymbolicName" -sh="srcHash" -d="...\destinationPath\destinationFile.pas" -dh="destinationHash" -a -r="%TEMP%\resultFile.pas" -t="text" -i="NotIgnore" -e="NONE" -m="forced" -re="NONE" --progress="progressDescription" --extrainfofile="%TEMP%\extraInfoFile.tmp"

Diff

To be done

aa

Merge help (takes about 10 seconds to start):

"C:\Program Files\PlasticSCM5\client\mergetool.exe" --help

---------------------------
Mergetool usage
---------------------------
Usage: mergetool [ | ]

    diffOptions:  []

    mergeOptions:   [] [[] [] ] [] []

        baseFile:            {-b | --base}= 
        baseSymbolicName:    {-bn | --basesymbolicname}=
        automatic:           -a | --automatic
        silent:              --silent
        resultFile:          {-r | --result}=
        mergeType:           {-m | --mergeresolutiontype}={onlyone | onlysrc | onlydst | try | forced}

    generalFiles:  []  []

        sourceFile:          {-s | --source}=
        srcSymbolicName:     {-sn | --srcsymbolicname}=
        destinationFile:     {-d | --destination}= 
        dstSymbolicName:     {-dn | --dstsymbolicname}=

    generalOptions: [] [] [] []

        defaultEncoding:     {-e | --encoding}={none |ascii | unicode | bigendian | utf7 | utf8}
        comparisonMethod:    {-i | --ignore}={none | eol | whitespaces | eol&whitespaces}
        fileType:            {-t | --filestype}={text/csharp | text/XML | text}
        resultEncoding:      {-re | --resultencoding}={none |ascii | unicode | bigendian | utf7 | utf8}
        progress:            {--progress}=progress string indicating the current progress, for example: Merging file 1/8
        extraInfoFile:       {--extrainfofile}=path to a file that contains extra info about the merge

    Remarks:
          
        -a | --automatic:    Tries to resolve the merge automatically.
                             If the merge can't be resolved automatically (requires user interaction), the merge tool is shown.
        --silent:            This option must be used combined with the --automatic option.
                             When a merge can't be resolved automatically, this option causes the tool to return immediately
                             with a non-zero exit code (no merge tool is shown).
                             If the tool was able to resolve the merge automatically, the program returns exit code 0.

    Examples:

        mergetool
        mergetool -s=file1.txt -d=file2.txt
        mergetool -s=file1.txt -b=file0.txt --destination=file2.txt
        mergetool --base=file0.txt -d=file2.txt --source=file1.txt --automatic --result=result.txt
        mergetool -b=file0.txt -s=file1.txt -d=file2.txt -a -r=result.txt -e=utf7 -i=eol -t=text/csharp -m=onlyone
---------------------------
OK   
---------------------------

The merge extraInfoFile.tmp has a syntax like this:

Source (cs:-#)
    relative-sourceFile from cs:-# created by userName on timeStamp
    Comments: Source changeset description

Base (cs:#)
    relative-baseFile from cs:#@/baseBranch by userName on timeStamp
    Comments: BO's + CRUDS 

Destination (cs:#)
    relative-destinationFile from cs@/destinationBranch created by userName on timeStamp
    Comments: Destination changeset description

Where each cs is a change set number.

–jeroen


Viewing all articles
Browse latest Browse all 160

Trending Articles