Pin (Command Line)

See Also

Pins a specific version of a file in the current project.

Syntax

ss Pin VSS items [-G] [-H] [-N] [-V] [-W] [-Y] [-?]

Examples

Pins the file JUSTIFY.CPP in $/WORD/CODE to version 2:

SS Pin $/WORD/CODE/JUSTIFY.CPP -V2

Pins all the files in the $/EXCEL/PIVOTTBL project to the label "beta4." In this example, "beta4" is assumed to be a project label:

SS Pin $/EXCEL/PIVOTTBL/*.* -Vbeta4

Pins all header files in the SPECS project to version 2.

SS Pin *.H -V2

The following table describes the command-line options available with this command.

Option Description
-V Version number you want to pin to the current project.
-G Set Get options for the retrieved local copy.
-W Make the retrieved local copy writable.
-N Change between long and short file name mode.
-Y Specify a username and/or password.
-?, -H Request online Help on a command.

Access Rights

You must have the Check Out access right in the project you are pinning from to use this command.

Remarks

The Pin command is similar to the Share command with the -V switch, but the Pin command is the preferred method of locking a file at a certain version. However, Pin operates directly on files in projects specified on the command line. Without the -V option, Pin does not share files with the current project as the Share command does. Essentially, Pin freezes a file at a specified version number.

For VSS items, specify files in the current project or a project path containing a wildcard specification or file name. Pin only operates on the files in the current project or project specified.

If the file to be pinned is currently pinned to another version, the Pin command unpins the file from it and pins it to the version specified on the command line. If the file is already pinned to the specified version, no action is taken.

The command pins one version of the file in the current folder or working folder, depending on the state of the initialization variable Force_Dir: Setting Force_Dir = Yes pins files to the working folder. Setting Force_Dir = No pins files to the current folder. This variable can also be set in the Command Line tab of the Options dialog box on the Tools menu.

The -G and -W options control the file attributes of the retrieved file.