add an entry to a change package


accurev cpkadd [ -p <depot-name> ] [-I <issue-number> [-3] ][ -fx ]
{ -v <ver-streamspec> <element-list> |
[ -j <ver-fullspec> ] -v <ver-fullspec> -e <eid>
[ --from_stream=streamname ] | -k | [ -Fx ] -l <list-file> }


The cpkadd command creates or updates an entry for one or more elements in the specified change package. You can specify an element by its name or its element-ID.


-I <issue-number>

The issue record whose change package will be processed.


Specifies that the <issue-number> specified by the -I switch is a third-party ITS key rather than an AccuWork issue number.


Process all (kept) elements in the workspace.

-e <eid> The element whose change is to be recorded. You must also specify a version with -v. If you also specify a <list-file> or <element-list>, it is ignored.


Displays output all segments of visible variants of the specified issue in the specified stream. For discussions about segments and variants, see Change Packages in the AccuRev On-Line Help.


Signals that <list-file> (see the -l option) is an XML-format file, not a flat text file. Example:

<e l="\.\file_0001" v="4/1" eid="2"></e>
<e l="\.\file_0002" v="4/1"></e>
  <e eid="4" v="4/1"></e>

-j <ver-fullspec>

Specify the basis version. A full version spec includes both stream and version, such as "16/7" (for "stream #16, version #7). Must be used with -v <ver-fullspec>.

-l <list-file>

Process the elements listed in <list-file>. This must be a text file, with one element name per line. Extra whitespace is not allowed; make sure there are no empty lines and no leading or trailing white space around the filenames. Wildcards are not expanded. There is no provision for comment lines in the file.

If you use this option, any <element-list> specified is silently ignored.


One or more element names, separated by whitespace. If you also specify a <list-file> using the –l option, this <element-list> is silently ignored.

-v <ver-spec> (or -v <ver-fullspec>)

(default: the version currently in your workspace) The head version of the change. A full version spec, as required when used with "-e <eid>", includes both stream and version, such as "16/7" (for "stream #16, version #7). When used with an "<element-list>", rather than "-e <eid>", it makes more sense to specify only the stream (such as "-v 16", for the latest version of all the elements in the stream).

Unless -j is specified, AccuRev automatically determines the basis version of the change. See the patch reference page for a description of the basis version.

-p <depot-name>

The depot in which the issue record is located (default: the depot of the current workspace).


Display the results in XML format. If the command succeeds, the response is:


If the command fails, the response is:


    <Message>Issue not found.</Message>



Create or update a change package entry for element brass.h in issue record #982. The head version of the change is the version of brass.h currently in the workspace.

> accurev cpkadd -I 982 brass.h

Create or update a change package entry in issue record #4871, for the element with element-ID 477. The head version of the change is the version in workspace brass_dvt_john.

> accurev cpkadd -I 4871 -e 477 -v brass_dvt_john

See Also

cpkdescribe, cpkdepend, cpkremove, issuediff, issuelist, patch

Using a Specific Version of an Element