 -CoPy_file(1)

NAME
-CoPy_file - copy a file into a change

SYNOPSIS
-CoPy_file [ option... ] filename...
-CoPy_file -INDependent [ option... ] filename...
-CoPy_file -List [ option... ]
-CoPy_file -Help

DESCRIPTION
The -CoPy_file command is used to copy a file into a change. The named files will be copied from the baseline into the development directory, and added to the list of files in the change. The version of files copied from the baseline is remembered.

This command may be used to copy tests into a change, not just source files. Tests are treated just like any other source file, and are subject to the same process.

Warning: If there are files in the development directory of the same name they will be overwritten by this command.

You may also name directories. All of the source files in the directories named, and all directories below them, will be copied from the baseline into the development directory, and added to the list of files in the change.

When copying files explicitly, it is an error if the file is already part of the change. When you name a directory, all of the source files in the project below that directory are copied, except any which are already in the change. It is an error if none of the files implicitly named by the directory can be used.

If you want to change a copied source file to be executable (shell scripts, for example) then you simply use the normal chmod(1) command; the reverse to make it not executable. If any of the file's executable bits are set at aede(1) time the file is remembered as executable and all execute bits (minus the project's umask) will be set by subsequent aecp(1) commands.

  Process Side Effects
This command will cancel any build or test registrations, because adding another file logically invalidates them. If the project configuration file was added, any diff registration will also be canceled.

When the change files are listed ( -List Change_Files -TERse) the copied files will appear in the listing. When the project files are listed with an explicit change number ( -List Project_Files -TERse -Change N) none of the change's files, including the copied files, will appear in the terse listing. These two features are very helpful when calling from within a DMT to generate the list of source files.

  Notification
The copy_file_command in the project config file is run, if set. The project_file_command is also run, if set, and if there has been an integration recently. See aepconf(5) for more information.

OPTIONS
The following options are understood:

-INDependent
    This option is used to specify that the copy is to be run independent of any particular change. The files will be copied relative to the current directory.

-Output filename
    This option may be used to specify an output file of a file being copied from the baseline. Only one baseline file may be named when this option is used. The file name "-" is understood to mean the standard output. This option does not add the file to the set of change files. No locks are taken when this option is used, not even the baseline read lock.

-Read_Only
    This option may be used to specify that the file is to be used to insulate the change from the baseline. The user does not intend to edit the file. These files must be uncopied before development may end.

-REScind
    This option may be used to rescind (roll back) a completed change. The change to rescind (roll back) is specified in the usual way, with one of the --delta options.

RECOMMENDED ALIAS
The recommended alias for this command is
csh%	alias aecp ' -cp \!* -v'
sh$	aecp(){ -cp "$@" -v}

ERRORS
It is an error if the change is not in the being developed state.
It is an error if the change is not assigned to the current user.
It is an error if the file is already in the change and the -OverWrite option is not specified.

EXAMPLES
Here are some simple examples. Remember that most commands are relative to the current directory, even though these examples assume you are at the base of the development directory tree.

  Copy Whole Project
To copy the whole project into your change, use the command
    aecp .
The trailing dot is part of the command, it means "the currect directory and everything below it". This works for any directory in your project source tree, if you want to be more seledctive.

  Prroduce Earlier Project Version
You you wish to exactly reproduces the sources for an earlier version of your project, you need to know the edelta number (use ael proj-history to find it). Then use this command:
    aecp -delta n .
where n is the delta number from the project history. Again, the trailing dot is part of the command. By using the $version substitution (see aesub(5) for more information) you can embed this delta number into your program before distributing it.

It is also possible to give a previous change number, instead, using this command:
    aecp -delta-from-change n .
where n is the change number of interest. Again, the trailing dot is part of the command.

  Rescind a Change
When you need to rescind (back out) a completed change, it will probably have been some time ago, so you need to know the delta number or change number. Use this command:
    aecp -delta n -rescind .
where n is the delta number of interest. All of the other -delta variantrs also work, so if you know the change number, you can be more selective about which files to copy:
    aecp -delta-from-change n `aegis -l cf -ter -c n`
where n is the change number of interest. This only copies the files which were in the offending change.

SEE ALSO

aeb(1)
    build also takes a baseline read lock (non-exclusive)

aecpu(1)
    reverse action of aecp

aedb(1)
    begin development of a change

aedn(1)
    assign a name to a delta

aeipass(1)
    integrate pass takes a baseline write lock (exclusive)

aemv(1)
    rename a file as part of a change

aenf(1)
    add a new file to a change

aerm(1)
    add files to be deleted to a change

aeuconf(5)
    user configuration file format