![]() |
![]()
| ![]() |
![]()
NAMEaegis copy file - copy a file into a change SYNOPSISaegis -CoPy_file [ option... ]
filename...
DESCRIPTIONThe aegis -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. File Name InterpretationThe aegis program will attempt to determine the project file names from the file names given on the command line. All file names are stored within aegis projects as relative to the root of the baseline directory tree. The development directory and the integration directory are shadows of this baseline directory, and so these relative names apply here, too. Files named on the command line are first converted to absolute paths if necessary. They are then compared with the baseline path, the development directory path, and the integration directory path, to determine a baseline‐relative name. It is an error if the file named is outside one of these directory trees. The -BAse_RElative option may be used to cause relative filenames to be interpreted as relative to the baseline path; absolute filenames will still be compared with the various paths in order to determine a baseline‐relative name. The relative_filename_preference in the user configuration file may be used to modify this default behavior. See aeuconf(5) for more information. Process Side EffectsThis 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 (aegis -List Change_Files -TERse) the copied files will appear in the listing. When the project files are listed with an explicit change number (aegis -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 aegis from within a DMT to generate the list of source files. THE BASELINE LOCKThe baseline lock is used to ensure that the baseline remains in a consistent state for the duration of commands which need to read the contents of files in the baseline. The commands which require the baseline to be consistent (these include the aeb(1), aecp(1) and aed(1) commands) take a baseline read lock. This is a non‐exclusive lock, so the concurrent development of changes is not hindered. The command which modifies the baseline, aeipass(1), takes a baseline write lock. This is an exclusive lock, forcing aeipass(1) to block until there are no active baseline read locks. It is possible that one of the above development commands will block until an in‐progress aegis -Integrate_PASS completes. This is usually of short duration while the project history is updated. The delay is essential so that these commands receive a consistent view of the baseline. No other integration command will cause the above development commands to block. When aegis' branch functionality is in use, a read (non‐exclusive) lock is taken on the branch baseline and also each of the "parent" baselines. However, a baseline write (exclusive) lock is only taken on the branch baseline; the "parent" baselines are only read (non‐exclusive) locked. TEST CORRELATIONSThe “aegis -Test -SUGgest” command may be used to have aegis suggest suitable regression tests for your change, based on the source files in your change. This automatically focuses testing effort to relevant tests, reducing the number of regression tests necessary to be confident that you have not introduced a bug. The test correlations are generated by the “aegis -Integrate_Pass” command, which associates each test in the change with each source file in the change. Thus, each source file accumulates a list of tests which have been associated with it in the past. This is not as exact as code coverage analysis, but is a reasonable approximation in practice. The aecp(1) and aenf(1) commands are used to associate files with a change. While they do not actively perform the association, these are the files used by aeipass(1) and aet(1) to determine which source files are associated with which tests. Test Correlation AccuracyAssuming that the testing correlations are accurate and that the tests are evenly distributed across the function space, there will be a less than 1/number chance that a relevant test has not been run by the “aegis -Test -SUGgest number” command. A small amount of noise is added to the test weighting, so that unexpected things are sometimes tested, and the same tests are not run every time. Test correlation accuracy can be improved by ensuring that:
The best way for tests to correlate accurately with source files is when a change contains a test and exactly those files relating to the functionality under test. Too many spurious files will weaken the usefulness of the testing correlations. NotificationThe 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. File Action AdjustmentWhen this command runs, it first checks the change files against the projects files. If there are inconsistencies, the file actions will be adjusted as follows:
OPTIONSThe following options are understood:
See also aegis(1) for options common to all aegis commands. All options may be abbreviated; the abbreviation is documented as the upper case letters, all lower case letters and underscores (_) are optional. You must use consecutive sequences of optional letters. All options are case insensitive, you may type them in upper case or lower case or a combination of both, case is not important. For example: the arguments “-project”, “-PROJ” and “-p” are all interpreted to mean the -Project option. The argument “-prj” will not be understood, because consecutive optional characters were not supplied. Options and other command line arguments may be mixed arbitrarily
on the command line, after the function selectors.
The GNU long option names are understood. Since all option names for aegis are long, this means ignoring the extra leading '-'. The “--option=value” convention is also understood. RECOMMENDED ALIASThe recommended alias for this command is csh% alias aecp 'aegis -cp \!* -v' sh$ aecp(){aegis -cp "$@" -v} ERRORSIt is an error if the change is not in the being developed
state.
EXIT STATUSThe aegis command will exit with a status of 1 on any error. The aegis command will only exit with a status of 0 if there are no errors. ENVIRONMENT VARIABLESSee aegis(1) for a list of environment variables which may affect this command. See aepconf(5) for the project configuration file's project_specific field for how to set environment variables for all commands executed by Aegis. EXAMPLESHere 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 ProjectTo 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 VersionYou 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 ChangeWhen 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
COPYRIGHTaegis version 4.25.D510
The aegis program comes with ABSOLUTELY NO WARRANTY; for details
use the 'aegis -VERSion License' command. This is free software and
you are welcome to redistribute it under certain conditions; for details use
the 'aegis -VERSion License' command.
AUTHOR
|