aegis -CoPy_file(1) aegis -CoPy_file(1) NNAAMMEE aegis -CoPy_file - copy a file into a change SSYYNNOOPPSSIISS aaeeggiiss --CCooPPyy__ffiillee [ _o_p_t_i_o_n... ] _f_i_l_e_n_a_m_e... aaeeggiiss --CCooPPyy__ffiillee --IINNDDeeppeennddeenntt [ _o_p_t_i_o_n... ] _f_i_l_e_n_a_m_e... aaeeggiiss --CCooPPyy__ffiillee --LLiisstt [ _o_p_t_i_o_n... ] aaeeggiiss --CCooPPyy__ffiillee --HHeellpp DDEESSCCRRIIPPTTIIOONN The _a_e_g_i_s _-_C_o_P_y___f_i_l_e 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. FFiillee NNaammee IInntteerrpprreettaattiioonn The 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 --BBAAssee__RREEllaattiivvee 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 _r_e_l_a_t_i_v_e___f_i_l_e_n_a_m_e___p_r_e_f_e_r_e_n_c_e in the user configuration file may be used to modify this default behavior. See _a_e_u_c_o_n_f(5) for more information. PPrroocceessss SSiiddee EEffffeeccttss This command will cancel any build or test registrations, because adding another file logically invalidates them. If the project _c_o_n_f_i_g file was added, any diff registration will also be canceled. When the change files are listed (_a_e_g_i_s _-_L_i_s_t _C_h_a_n_g_e___F_i_l_e_s _-_T_E_R_s_e) the copied files will appear in the listing. When the project files are listed with an explicit change number (_a_e_g_i_s _-_L_i_s_t _P_r_o_j_e_c_t___F_i_l_e_s _-_T_E_R_s_e _-_C_h_a_n_g_e 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. TTHHEE BBAASSEELLIINNEE LLOOCCKK The 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 _a_e_b(1), _a_e_c_p(1) and _a_e_d(1) commands) take a baseline _r_e_a_d lock. This is a non-exclusive lock, so the concurrent development of changes is not hindered. The command which modifies the baseline, _a_e_i_p_a_s_s(1), takes a baseline _w_r_i_t_e lock. This is an exclusive lock, forcing _a_e_i_p_a_s_s(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 _a_e_g_i_s _-_I_n_t_e_g_r_a_t_e___P_A_S_S 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. TTEESSTT CCOORRRREELLAATTIIOONNSS The ``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 _a_e_c_p(1) and _a_e_n_f(1) commands are used to associate files with a change. While they do not actively perform the association, these are the files used by _a_e_i_p_a_s_s(1) and _a_e_t(1) to determine which source files are associated with which tests. TTeesstt CCoorrrreellaattiioonn AAccccuurraaccyy Assuming that the testing correlations are accurate and that the tests are evenly distributed across the function space, there will be a less than _1_/_n_u_m_b_e_r chance that a relevant test has not been run by the ``aegis -Test -SUGgest _n_u_m_b_e_r'' 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: +o Each change should be strongly focused, with no gratuitous file inclusions. This avoids spurious correlations. +o Each item of new functionality should be added in an individual change, rather than several together. This strongly correlates tests with functionality. +o Each bug should be fixed in an individual change, rather than several together. This strongly correlates tests with functionality. +o Test correlations will be lost if files are moved. This is because correlations are by name. 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. OOPPTTIIOONNSS The following options are understood: --BBAAssee__RREEllaattiivvee This option may be used to cause relative filenames to be considered relative to the base of the source tree. See _a_e_u_c_o_n_f(5) for the corresponding user preference. --CCUUrrrreenntt__RREEllaattiivvee This option may be used to cause relative filenames to be considered relative to the current directory. This is usually the default. See _a_e_u_c_o_n_f(5) for the corresponding user preference. --BBRRaanncchh _n_u_m_b_e_r This option may be used to specify a different branch for the origin file, rather than the baseline. (See also --TTRRuunnkk option. Please Note: the --BBRRaanncchh option does not take a project name, just the branch number suffix. --CChhaannggee _n_u_m_b_e_r This option may be used to specify a particular change within a project. When no --CChhaannggee option is specified, the _A_E_G_I_S___C_H_A_N_G_E environment variable is consulted. If that does not exist, the user's _$_H_O_M_E_/_._a_e_g_i_s_r_c file is examined for a default change field (see _a_e_u_c_o_n_f(5) for more information). If that does not exist, when the user is only working on one change within a project, that is the default change number. Otherwise, it is an error. --DDEELLttaa _n_u_m_b_e_r This option may be used to specify a particular delta in the project's history to copy the file from, rather than the most current version. If the delta has been given a name (see _a_e_d_n(1) for how) you may use a delta name instead of a delta number. It is an error if the delta specified does not exist. Delta numbers start from 1 and increase; delta 0 is a special case meaning ``when the branch started''. --DDEELLttaa__DDaattee _s_t_r_i_n_g This option may be used to specify a particular date and time in the project's history to copy the file from, rather than the most current version. It is an error if the string specified cannot be interpreted as a valid date and time. Quote the string if you need to use spaces. --HHeellpp This option may be used to obtain more information about how to use the _a_e_g_i_s program. --IINNDDeeppeennddeenntt 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. --LLiisstt This option may be used to obtain a list of suitable subjects for this command. The list may be more general than expected. --NNoott__LLooggggiinngg This option may be used to disable the automatic logging of output and errors to a file. This is often useful when several aegis commands are combined in a shell script. --OOuuttppuutt _f_i_l_e_n_a_m_e 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. _N_o _l_o_c_k_s are taken when this option is used, not even the baseline read lock. --OOvveerrWWrriittiinngg This option may be used to force overwriting of files. The default action is to give an error if an existing file would be overwritten. --PPrroojjeecctt _n_a_m_e This option may be used to select the project of interest. When no --PPrroojjeecctt option is specified, the _A_E_G_I_S___P_R_O_J_E_C_T environment variable is consulted. If that does not exist, the user's _$_H_O_M_E_/_._a_e_g_i_s_r_c file is examined for a default project field (see _a_e_u_c_o_n_f(5) for more information). If that does not exist, when the user is only working on changes within a single project, the project name defaults to that project. Otherwise, it is an error. --RReeaadd__OOnnllyy 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. --TTEERRssee This option may be used to cause listings to produce the bare minimum of information. It is usually useful for shell scripts. --TTRRuunnkk This option may be used to specify the project trunk for the origin file, rather than the baseline. (See also --BBRRaanncchh option. --VVeerrbboossee This option may be used to cause aegis to produce more output. By default aegis only produces output on errors. When used with the --LLiisstt option this option causes column headings to be added. --WWaaiitt This option may be used to require Aegis commands to wait for access locks, if they cannot be obtained immediately. Defaults to the user's _l_o_c_k___w_a_i_t___p_r_e_f_e_r_e_n_c_e if not specified, see _a_e_u_c_o_n_f(5) for more information. --NNoo__WWaaiitt This option may be used to require Aegis commands to emit a fatal error if access locks cannot be obtained immediately. Defaults to the user's _l_o_c_k___w_a_i_t___p_r_e_f_e_r_e_n_c_e if not specified, see _a_e_u_c_o_n_f(5) for more information. See also _a_e_g_i_s(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 --PPrroojjeecctt 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 _a_e_g_i_s are long, this means ignoring the extra leading '-'. The "----_o_p_t_i_o_n==_v_a_l_u_e" convention is also understood. RREECCOOMMMMEENNDDEEDD AALLIIAASS The recommended alias for this command is csh% alias aecp 'aegis -cp \!* -v' sh$ aecp(){aegis -cp "$@" -v} EERRRROORRSS It is an error if the change is not in the _b_e_i_n_g _d_e_v_e_l_o_p_e_d 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 --OOvveerrWWrriittee option is not specified. EEXXIITT SSTTAATTUUSS The _a_e_g_i_s command will exit with a status of 1 on any error. The _a_e_g_i_s command will only exit with a status of 0 if there are no errors. EENNVVIIRROONNMMEENNTT VVAARRIIAABBLLEESS See _a_e_g_i_s(1) for a list of environment variables which may affect this command. SSEEEE AALLSSOO _a_e_b(1) build also takes a baseline read lock (non- exclusive) _a_e_c_p_u(1) reverse action of aecp _a_e_d_b(1) begin development of a change _a_e_d_n(1) assign a name to a delta _a_e_i_p_a_s_s(1) integrate pass takes a baseline write lock (exclusive) _a_e_m_v(1) rename a file as part of a change _a_e_n_f(1) add a new file to a change _a_e_r_m(1) add files to be deleted to a change _a_e_u_c_o_n_f(5) user configuration file format CCOOPPYYRRIIGGHHTT aegis version .C001 Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Peter Miller; All rights reserved. The aegis program comes with ABSOLUTELY NO WARRANTY; for details use the '_a_e_g_i_s _-_V_E_R_S_i_o_n _L_i_c_e_n_s_e' command. This is free software and you are welcome to redistribute it under certain conditions; for details use the '_a_e_g_i_s _-_V_E_R_S_i_o_n _L_i_c_e_n_s_e' command. AAUUTTHHOORR Peter Miller E-Mail: millerp@canb.auug.org.au /\/\* WWW: http://www.canb.auug.org.au/~millerp/ Reference Manual Aegis 1