aegis -Integrate_Pass(1) General Commands Manual aegis -Integrate_Pass(1) NNAAMMEE aegis integrate pass - pass a change integration SSYYNNOOPPSSIISS aaeeggiiss --IInntteeggrraattee__PPaassss [ _o_p_t_i_o_n... ] aaeeggiiss --IInntteeggrraattee__PPaassss --LLiisstt [ _o_p_t_i_o_n... ] aaeeggiiss --IInntteeggrraattee__PPaassss --HHeellpp DDEESSCCRRIIPPTTIIOONN The _a_e_g_i_s _-_I_n_t_e_g_r_a_t_e___P_a_s_s command is used to notify aegis that a change has passed integration. The change is advanced from the _b_e_i_n_g _i_n_t_e_g_r_a_t_e_d state to the _c_o_m_p_l_e_t_e_d state. boxwid = 1 down box "being" "integrated" arrow " integrate" ljust " pass" ljust box "completed" This command updates the file histories, so that future _a_e_c_p(1) com- mands may extract previous file versions from history, and so that future _a_e_d(1) commands may merge out-of-date files. The history is updated using the _h_i_s_t_o_r_y___c_r_e_a_t_e___c_o_m_m_a_n_d and _h_i_s_t_o_r_y___p_u_t___c_o_m_m_a_n_d fields of the project configuration file (see _a_e_p_c_o_n_f(5) for more information). The integrate pass will abort with an error if one of these history commands should fail, _e_._g_. by running out of disk space. If this should happen, the change will remain in the _b_e_i_n_g _i_n_t_e_g_r_a_t_e_d state, and the integration directory is unaltered. Once the history has been updated, the integration directory is renamed as the baseline directory, and the old baseline directory is deleted. Once integrate pass is complete the change is no longer assigned to the current user. HHiissttoorryy TToooollss MMooddiiffyy FFiilleess Many history tools (_e_._g_. RCS and SCCS) can modify the contents of the file when it is committed. This usually requires the use of specific "keyword" strings, and there are usually options to turn this behavior off, but users familiar with version control tools (as opposed to con- figuration management systems) will often use these features. The problem is that if the commit changes the file, the source file in the repository now no longer matches the object file in the repository. _I_._e_. the history tool has compromised the referential integrity of the repository. By default, a fatal error is emitted if the file is changed by the check-in, however this can be modified to a be warning or even ignored completely; see the _h_i_s_t_o_r_y___p_u_t___t_r_a_s_h_e_s___f_i_l_e field of _a_e_p_c_o_n_f(5) for more information. FFiillee MMooddiiffiiccaattiioonn TTiimmeess The modification times of all files modified since the beginning of integration (see _a_e_i_b(1) for more information) are updated to be since the beginning of integrate pass. The order of modification times will be preserved, however the time range will be compressed to the great- est extent possible. This ensures that subsequent development builds will notice that baseline files have changed. Note that if there are many new files with all different timestamps in the integration directory, and if the number of files with different timestamps exceeds the number of seconds since the start of the inte- grate-pass command, Aegis may have to set file modification times into the future. The _b_u_i_l_d___t_i_m_e___a_d_j_u_s_t field of the project _c_o_n_f_i_g file controls Aegis' behavior in this case. (See _a_e_p_c_o_n_f(5) for more information.) There are three settings: adjust_and_sleep This setting, which is the default, causes Aegis to sleep until the file modification times would no longer be in the future. This avoids both development build problems and inte- gration build problems, both of which which can arise as a result "interesting" file modification times. adjust_only Aegis will issue a warning that the file modification times extend into the future, but will not sleep. This may cause integration build problems, particularly if you are using _a_e_i_n_t_e_g_r_a_t_q(1). Development builds may perform redundant builds, however _a_e_t _-_r_e_g should not produce false negatives. dont_adjust This is highly inadvisable. It is provided solely for some very rare circumstances. This setting causes Aegis not to adjust the file modification times at all. This can have very unhappy side-effects, especially of the integration build was _b_e_f_o_r_e one or more development builds; the commonest symptom being that development builds do not always cause a relink of the necessary executables, and _a_e_t _-_r_e_g may give false nega- tives. It is ssttrroonnggllyy recommended that you do not use this setting. If you use _c_o_o_k(1), see the _t_i_m_e_-_a_d_j_u_s_t_-_b_a_c_k flag for how to compress the time range even further. This usually makes the sleep (or the warning period) significantly shorter. NNoottiiffiiccaattiioonn On successful completion of this command, after the directory rename has ocurred and after the database has been updated, the _i_n_t_e_g_r_a_t_i_o_n___- _p_a_s_s___n_o_t_i_f_y___c_o_m_m_a_n_d field of the project attributes is run, if set. See _a_e_p_a_t_t_r(5) and _a_e_p_a(1) for more information. This command is run as the project owner. Some compilers bury absolute path names into object files and executa- bles. The renaming of the integration directory to become the new baseline breaks these paths. The above command is passed an environ- ment variable called AEGIS_INTEGRATION_DIRECTORY so that the appropri- ate symlink may be placed, if desired. Other commands run by this command include the _h_i_s_t_o_r_y___c_r_e_a_t_e___c_o_m_m_a_n_d, _h_i_s_t_o_r_y___p_u_t___c_o_m_m_a_n_d and _h_i_s_t_o_r_y___q_u_e_r_y___c_o_m_m_a_n_d fields of the project _c_o_n_f_i_g file. See _a_e_p_c_o_n_f(5) for more information. 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 develop- ment 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. TThhee HHiissttoorryy LLoocckk Where a project has a number of branches active simultaneously, it is possible for independent integrate pass commands for different branches to be issued very close together. The is an exclusive _h_i_s_- _t_o_r_y _l_o_c_k taken by integrate pass to ensure that only one branch is updating the file history at a time, thus preventing history file cor- ruption. 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 confi- dent 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 sev- eral 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. MMEETTRRIICCSS Aegis is capable of recording metrics as part of the file attributes of a change. This allows various properties of files to be recorded for later trend analysis, or other uses. The specific metrics are not dictated by Aegis. It is expected that the integration build will create a metrics file for each of the source files the change. These metrics files must be in the format specified by _a_e_m_e_t_r_i_c_s(5). The name of the metrics file defaults to "_f_i_l_e_n_a_m_e,,SS", however it may be varied, by setting the _m_e_t_r_i_c_s___f_i_l_e_n_a_m_e___p_a_t_t_e_r_n field of the project _c_o_n_f_i_g file. See _a_e_p_c_o_n_f(5) for more information. If such a metrics file exists, for each source file in a change, it will be read and remembered at integrate pass time. If it does not exist, Aegis assumes there are no relevant metrics for that file, and proceeds silently; it is not an error. OOPPTTIIOONNSS The following options are understood: --CChhaannggee _n_u_m_b_e_r This option may be used to specify a particular change within a project. See _a_e_g_i_s(1) for a complete description of this option. --HHeellpp This option may be used to obtain more information about how to use the _a_e_g_i_s program. --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 sev- eral aegis commands are combined in a shell script. --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 envi- ronment 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 sin- gle project, the project name defaults to that project. Oth- erwise, it is an error. --RREEAAssoonn _t_e_x_t This option may be used to attach a comment to the change his- tory generated by this command. You will need to use quotes to insulate the spaces from the shell. --TTEERRssee This option may be used to cause listings to produce the bare minimum of information. It is usually useful for shell scripts. --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 inter- preted 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 aeipass 'aegis -ipass \!* -v' sh$ aeipass(){aegis -ipass "$@" -v} EERRRROORRSS It is an error if the change is not assigned to the current user. It is an error if The change is not in the _b_e_i_n_g _i_n_t_e_g_r_a_t_e_d state. It is an error if there has been no successful _'_a_e_g_i_s _-_B_u_i_l_d_' command for the integration. It is an error if there has been no successful _'_a_e_g_i_s _-_T_e_s_t_' command for the integration. It is an error if there has been no successful _'_a_e_g_i_s _-_T_e_s_t _-_B_a_s_e_L_i_n_e_' command for the integration. 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. See _a_e_p_c_o_n_f(5) for the project configuration file's _p_r_o_j_e_c_t___s_p_e_c_i_f_i_c field for how to set environment variables for all commands executed by Aegis. SSEEEE AALLSSOO _a_e_i_b(1) begin integration of a change _a_e_i_f_a_i_l(1) fail integration of a change _a_e_m_e_a_s_u_r_e(1) simple file metrics _a_e_m_e_t_r_i_c_s(5) metrics values file format _a_e_u_c_o_n_f(5) user configuration file format CCOOPPYYRRIIGGHHTT aegis version 4.25.D611 Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Peter Miller 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: pmiller@opensource.org.au /\/\* WWW: http://miller.emu.id.au/pmiller/ Reference Manual Aegis aegis -Integrate_Pass(1)