How to compare file revisions using the command line

0 Likes

Problem:

How to compare file revisions using the command line

Resolution:

  • Product Name: StarTeam
  • Product Version: 2005, 2005 Rel2, 2006
  • Product Component: Command Line
  • Platform/OS Version: All

Question:

How can I compare file revisions using the command line?


Answer:

Use stcmd diff to display differences between two revisions of a file. The command can be applied to more than one file. If you do not specify any revisions (using -vn or -vd or - vl), the working copy of each specified file is compared to the tip revision in the repository (or vault) for this file. If you specify a single revision, the working copy of each specified file is compared to that revision. If you specify two revisions, those two revisions of each specified file are compared.

The syntax for this command is as follows: stcmd diff -p "projectSpecifier" [-pwdfile "filePath"] [-cmp] [-csf] [-encrypt encryptionType] [-cfgl "labelName"| -cfgp "stateName" | -cfgd "asOfDate"] [-is] [-q] [-x] [-stop] [-rp "folderPath" | -fp "folderPath"] [-filter "fileStatus"] [-eol [on | off]] [-w | -Bpvcs | -b] [-i] [-m "maskSet"] [-t number] [-c number] [-n] [-nd] [-e] [-vl "labelName" | -vd "asOfDate" | -vn revisionNumber] [files...]

The following example uses stcmd diff to compare the Beta1 and Beta2 revisions of each of the .cpp files in SourceCode, a child of the root folder StarDraw (in the StarDraw view of the StarDraw project). It ignores all white space. stcmd diff -p "JMarsh:password@Orion:1024/StarDraw/StarDraw/SourceCode" -w -vl "Beta1" -vl "Beta2" "*.cpp"


Author: Donnie Nix

Old KB# 27797
Comment List
Related
Recommended