attache_command_line_interface

Using Attache commands

APPLICABILITY

Attache (general information)

SYNOPSIS

command [ options/args ]

DESCRIPTION

Attache commands create, modify, and manage the information in the workspace, that is, local files. Attache, the PC interface to ClearCase version-control and configuration management software, has a rich set of commands that create, modify, and manage the information in ClearCase VOBs and views. Commands are entered in the Attache client Command window or by using the menus and buttons provided through the graphical user interface. See the attache_graphical_interface reference page for a description of the graphical user interface.

ATTACHE COMMANDS

This reference page does not describe the individual commands:

annotate

catcr

catcs

cd

checkin

checkout

checkvob

chevent

chpool

chtype

clearlicense

cptype

describe

diff

diffcr

edcs

find

findmerge

get

getcache

getlog

help

hostinfo

import

ln

lock

ls

lscheckout

lsclients

lsdo

lshistory

lslock

lslocal

lspool

lsprivate

lsregion

lsreplica

lstype

lsview

lsvob

lsvtree

lsws

make

man

merge

mkattr

mkattype

mkbranch

mkbrtype

mkdir

mkelem

mkeltype

mkhlink

mkhltype

mklabel

mklbtype

mkpool

mkregion

mktag

mktrigger

mktrtype

mkview

mkvob

mkws

mount

mv

mvws

protect

put

pwd

pwv

quit

recoverview

reformatview

reformatvob

register

relocate

rename

reserve

rmattr

rmbranch

rmdo

rmelem

rmhlink

rmlabel

rmmerge

rmname

rmpool

rmregion

rmtag

rmtrigger

rmtype

rmver

rmvob

rmview

rmws

setcache

setcs

setws

shell

space

startview

umount

uncheckout

unlock

unregister

unreserve

update

winkin

wshell

ATTACHE COMMAND WINDOW

The Command window is an editable text window with keyboard input available at the command prompt line. By default, the Command window occupies the portion of the Attache Window directly above the Status Bar. The Command window also serves as a transcript pad, retaining approximately (limited by available memory in the system) the most recent 200 lines; you can scroll the transcript horizontally and vertically.

You enter all Attache commands at the command prompt, which is the name of your current working directory. You can type commands, or copy them from other places in the window and paste them at the prompt.

You can move the cursor with the keyboard's arrow keys or with the mouse. To reexecute a previously entered command, place the cursor anywhere in the line of that command and press ENTER. You can edit the command before pressing ENTER; this makes it easy to correct typing errors and to modify previously entered commands.

GETTING HELP FOR COMMANDS

Attache provides several online help facilities for its commands:

mklabel -help (syntax of one command)

USAGE OVERVIEW

A single Attache command can be invoked from the prompt in the Command window using this syntax:

command [ options-and-args ]
Command Options

Command options may appear in any order, but all options must precede any nonoption arguments (typically, names of files, versions, branches, and so on). If an option is followed by an additional argument, such as -branch \main\bugfix, there must be white space between the option string and the argument. If the argument itself includes space characters, it must be enclosed in quotes.

Command Abbreviations and Aliases

Many command names and option words can be abbreviated. A command's syntax summary indicates all valid abbreviations. For example:

-pre·decessor

This means that you can abbreviate the option to the minimal -pre, or to any intermediate spelling: -pred, -prede, and so on.

For option words, the minimal abbreviation is always three characters or fewer.

A few commands have a built-in command alias. For example, checkin's alias is ci; checkout's alias is co. These commands are equivalent:

cmd-context  checkin test.c

cmd-context  ci test.c

PATHNAMES IN ATTACHE COMMANDS

Many Attache commands require a pathname as an argument, such as the name of a file element, directory element, or view-private file. In most cases you can use full remote, drive-relative, or relative pathnames, but full local pathnames have very limited use. A full local pathname begins with a drive letter and designates a file that physically exists on the PC; a full remote pathname begins with a slash or backslash and designates a file in your view. Full local pathnames are allowed in only four cases: the ws-pname argument to mkws, the @pname argument for put, get, find, update, or findmerge, the project configuration file for Update, and the file argument to the -exclude option for import.

Although, in general, remote pathnames are correct in Attache commands, there are restrictions:

For a workspace using a Windows NT helper, there is an implicit subst of a drive, for example, Z:, for the current view, and a change to that drive. Thus, Z: is equivalent to M:\myview, and a pathname reference such as \my_vob is really a reference to Z:\my_vob. Pathnames beginning with a backslash (\) or slash (/), such as \my_vob are called drive-relative, rather than full, because they do not begin with a drive letter. Drive-relative pathnames assume the current drive.

In many cases, you can also use a ClearCase-defined variant: a version-extended pathname (full, drive-relative, or relative) or in some cases a view-extended pathname (full or relative).

Slash (/) and backslash (\) are interchangeable in pathnames. For example:

C:\users\smg\test\test.c

(full local pathname to workspace file)

\vob_proj\test\test.c

(drive-relative remote pathname to Windows NT helper host; also called an `VOB pathname', because it begins with a VOB-tag (\vob_proj))

M:\smg_view\myvob\src\main.c

(view-extended full pathname (VOB object); the M: drive constitutes `view-extended namespace' )

\myvob\src\main.c@@\main\3

(version-extended drive-relative remote pathname)

A relative pathname does not begin with a slash or backslash and is relative to your working directory. For example:

test.c

(relative pathname)

..\lib

(relative pathname)

For both full or relative pathnames:

For more information, see the version_selector and pathnames_ccase reference pages.

PROCESSING OF SYMBOLIC LINKS

Downloading a pathname that contains a symbolic link downloads a copy of the file or directory the link points to, rather than the link itself.

In addition, Attache commands do not traverse VOB symbolic links; rather, they operate on the link objects themselves. For example:

COMMAND-LINE PROCESSING

Attache interprets the command line and recognizes various special characters and constructs:

character escape (^)

The two-character sequence ^special-char suppresses the special meaning of the character.

single-quoting (`  `)

Allows white space characters and other special characters to be included as part of the command argument. Within a single-quoted string (' ... '), a double-quote character has no special meaning, and ^' is replaced by '.

double-quoting (" ")

Allows white space characters and other special characters to be included as part of the command argument. Within a double-quoted string (" ... "), ^" is replaced by ", and ^' is replaced by '.

commenting (#)

Command lines that begin with a number sign (#) are ignored.

wildcards

File-name patterns (including *, ?, and so on) that are not enclosed in quotes are expanded as described in the wildcards reference page. These patterns are also supported in config specs. (The meaning of ellipsis is slightly different in config specs; see the config_spec reference page.)

Attache does not expand environment variables.

PERMISSIONS CHECKING

Each Attache command description lists the permissions required for using the command. The chtype command, for example, lists these requirements for changing an element type:

element owner, VOB owner, member of the ClearCase group

This means that you must be the owner of the element whose type is to be changed, the owner of that element's VOB, or a member of the ClearCase group. Otherwise, Attache does not allow the chtype operation to proceed.

For details, see the permissions reference page.

OBJECT LOCKING

ClearCase provides for temporary access control through explicit locking of individual objects with the lock command. When an object is locked, it cannot be modified by anyone (except those explicitly excluded from the lock), even a member of the ClearCase group, the VOB owner, and the user who created the lock.

Attache command descriptions list the locks that can prevent a command from being executed, even if you have the necessary permissions. For example, the chtype command lists three locks that would prevent you from changing an element type:

VOB, element type, pool (non-directory elements only)

This means that chtype would fail if the VOB containing the element were locked, if the element's type were locked (such as the text_file type), or the storage pool containing the (nondirectory) element were locked.

SEE ALSO

man, help, attache, attache_graphical_interface, fmt_ccase, lock, permissions, profile_ccase, version_selector, attcmd, att_clnt



Feedback on the documentation in this site? We welcome any comments!
Copyright © 1999 by Rational Software Corporation. All rights reserved.