Tools: MPW
Advanced Search
Apple Developer Connection
Member Login Log In | Not a Member? Support

MPW Command Reference


DeleteRevisions

Built-in

SYNTAX

DeleteRevision revision1 [revision2]… [-file] [-project project]
[-u user] [-y]

DESCRIPTION

The DeleteRevisions command allows you to delete old revisions of a file by specifying the oldest revision that you want to keep. Specifying just a filename causes DeleteRevisions to delete all but the latest revision of the file. If you also indicate the file's revision number, DeleteRevisions deletes all earlier revisions of the file. The command deletes revisions on a branch when you substitute the branch name for the filename. In addition, you can use -file to remove a file and all of its revisions from the project.

Note
You can use the -log option of the ProjectInfo command to see which revisions have been deleted and who deleted them. •

Caution
DeleteRevisions permanently removes the revisions and branches specified. They cannot be recovered. •

INPUT

None

OUTPUT

None

STATUS

DeleteRevisions can return the following status codes:

0

no errors

1

syntax error

2

error in processing

3

system error

PARAMETERS

revision1 [revision2]…

Specifies the revisions to be deleted by using either a filename, a filename followed by a comma and a revision number, or a filename followed by a comma and a branch name (with or without a revision number). The following example specifies a filename and a branch name:

file.c,22a

If you specify only a filename, the command deletes every revision except the latest. Also, specifying a revision number causes DeleteRevisions to delete all earlier revisions of the file.

Specifying a branch name deletes all revisions on a branch; if you also specify a revision number, it deletes all revisions prior to the one specified.

Note that DeleteRevisions considers it an error to attempt to delete a revision that is currently checked out for modification.

OPTIONS

-file

Deletes the file and all its revisions.

-project project

Indicates the project that contains the specified revisions. If you omit this option, DeleteRevisions defaults to the current project.

-u user

Names the current user, overriding the {User} MPW Shell variable.

-y

Prevents the display of any confirmation dialogs by automatically responding Yes. The DeleteRevisions command can produce two different dialogs. The first asks if you really want to delete all the revisions of the specified file that are earlier than the specified revision. The second, which appears only if you specify the -file option, asks if you really want to delete all the revisions of the specified file.

EXAMPLES

The following example deletes all revisions except the latest revision of file.c in the named project.

DeleteRevisions file.c -project Project∫Utilities∫MyProject

By specifying both a branch name and revision number, the following command line deletes all revisions of file.c on branch 22a prior to revision 3.

DeleteRevisions file.c,22a3

The following command line deletes all the revisions on branch 22a in file.c of the current project.

DeleteRevisions file.c,22a

The command

DeleteRevisions file.c -file

deletes file.c and all of its revisions from the current project.

SEE ALSO

NameRevisions

ObsoleteProjectorFile

ProjectInfo

RenameProjectorFile

UnObsoleteProjectorFile

 
 


Last Updated July 2000