![]() |
![]()
| ![]() |
![]()
NAMEaegis new file - add new files to be created by a change SYNOPSISaegis -New_File file‐name... [
option... ]
DESCRIPTIONThe aegis -New_File command is used to add new files to a change. The named files will be added to the list of files in the change. For each file named, a new file is created in the development directory, if it does not exist already. If the file already exists, it will not be altered. If you want a new source file to be executable (shell scripts, for example) then you simply use the normal chmod(1) command. 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. If you name a directory on the command line, the entire directory tree will be searched for new files. (Note: absolutely everything will be added, including dot files and binary files, so you will need to clean out any junk first.) Files below this named directory which are already in the change, or in the project, will be ignored. The file_name_accept and file_name_reject patterns in the project aegis.conf file will also be applied, see aepconf(5) for more information. Directory ExampleThere are times when a command such as $ aenf fubar/*
aegis: project "example": change 42: "fubar/glorp" already
in change
aegis: project "example": change 42: found 1 fatal error, no new files added $ $ aenf fubar
aegis: project "example": change 42: file "fubar/smiley"
added
aegis: project "example": change 42: file "fubar/frownie" added $ $ aelcf > exclude $ aelpf >> exclude $ find fubar -type f | \aegis: project "example": change 42: file "fubar/smiley" added aegis: project "example": change 42: file "fubar/frownie" added $ $ find fubar -type f -nlinks 1 | \aegis: project "example": change 42: file "fubar/smiley" added aegis: project "example": change 42: file "fubar/frownie" added $ File TemplatesWhen a new file is created in the development directory the project config file is searched for a template for the new file. If a template is found, the new file will be initialized to the template, otherwise it will be created empty. See aepconf(5) for more information. The simplest form is to use template files, such as file_template = [ The template files themselves contain substitutions. The $filename substitution is available, and contains the name of the file being created. This can be manipulated in various ways when constructing the appropriate file contents. See aesub(5) for more information about substitutions. It is also possible to run a command to create the new file. You can do this instead of specifying a body string, viz: file_template = [ File Name LimitationsThere are a number of controls available to limit the form of project file names. All of these controls may be found in the project configuration file, see aepconf(5) for more information. The most significant are briefly described here:
This field may be used to allow white space characters in
file names. This will allow the following characters to appear in file names:
backspace (BS, \b, 0x08), horizontal tab (HT, \t, 0x09), new line (NL, \n,
0x0A), vertical tab (VT, \v, 0x0B), form feed (FF, \f, 0x0C), and carriage
return (CR, \r, 0x0D). Defaults to false if not set.
Note that this field does not override other file name filters. It will be necessary to explicitly set shell_safe_filenames = false as well. It will be necessary to set dos_filename_required = false (the default) as well. It will be necessary to set posix_filename_charset = false (the default) as well. The user must take great care to use the ${quote} substitution around all file names in commands in the project configuration. And even then, substitutions which expect a space separated list of file names will have undefined results. This field may be used to allow file names with
non‐ascii‐printable characters in them. Usually this would mean
a UTF8 or international charset of some kind. Defaults to false if not set.
Note that this field does not override other file name filters. It will be necessary to explicitly set shell_safe_filenames = false as well. It will be necessary to set dos_filename_required = false (the default) as well. It will be necessary to set posix_filename_charset = false (the default) as well.
Please Note: Aegis also consults the underlying file system, to determine its notion of maximum file size. Where the file system's maximum file size is less than maximum_filename_length, the filesystem wins. This can happen, for example, when you are using the Linux UMSDOS file system, or when you have an NFS mounted an ancient V7 filesystem. Setting maximum_filename_length to 255 in these cases does not alter the fact that the underlying file systems limits are far smaller (12 and 14, respectively). If your development directories (or your whole project) is on filesystems with filename limitations, or a portion of the heterogeneous builds take place in such an environment, it helps to tell Aegis what they are (using the project config file's fields) so that you don't run into the situation where the project builds on the more permissive environments, but fails with mysterious errors in the more limited environments. If your development directories are routinely on a Linux UMSDOS filesystem, you would probably be better off setting dos_filename_required = true, and also changing the development_directory_template field. Heterogeneous development with various Windows environments may also require this. 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. Changing the Type of a FileIf you want to change the type of a file (say, from a test to a source file, or vice versa) you could do it as two changes, by first using aerm(1) in one change and then using aenf(1) or aent(1) in a second change, or you can combine both steps in the same change. Remember to use the aerm -nowhiteout option or you will get a most peculiar new file template. 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:
NotificationThe new_file_command in the project configuration 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. 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. 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 aenf 'aegis -nf \!* -v' sh$ aenf(){aegis -nf "$@" -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. 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
|