aepatch(1)

NAME
aepatch - send and receive changes as patches

SYNOPSIS
aepatch -send [ option... ]
aepatch -receive [ option... ]
aepatch -list [ option... ]
aepatch -Help
aepatch -VERSion

DESCRIPTION
The aepatch command is used to send Aegis changes as patches, or receive patches and turn them into Aegis changes.

Please note that this only works for text files. If your project uses binary files, the aepatch program will not be useful because the diff(1) and patch(1) commands only work on text files. Also, this only works for files with names which do not contain white space.

If you need to merge matches together, you could use the GNU patch utils, which include a tool to merge patches together.

SEND
The send variant takes a specified change and constructs a patch containing all of the changes to all of the files in that change. The result is compressed, and encoded into a text format which can be sent as e-mail without being corrupted by the mail transfer agents along the way.

This patch is a normal Unix patch, as you would produce using diff(1), gzip(1) and a MIME encoder such as mpack(1). There are no special formats. The output can be uncompressed with the normal gunzip(1) command and applied with the normal patch(1) command.

  Options
The following options are understood by the send variant:

-Change number
    This option may be used to specify a particular change within a project. See aegis(1) for a complete description of this option.

-COmpress
    This option may be used to specify that the output is to be compressed. This is the default.

-No_COmpress
    This option may be used to specify that the output is not to be compressed.

-Content_Transfer_Encoding name
    This option may be used to specify the content transfer encoding to be used. It may take one of the following values:

    None
        No content transfer encoding is to be performed.

    Base64
        The MIME base 64 encoding is to be used. This is the default.

    Quoted_Printable
        The MIME quoted printable encoding is to be used.

    Unix_to_Unix_encode
        The ancient unix-to-unix encoding is to be used.

    These encodings may be abbreviated in the same way as comment line options.

-Ascii_Armor
    This means the same as the ``-cte=base64'' option above.

-No_Ascii_Armor
    This means the same as the ``-cte=none'' option above.

-DELta number
    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 aedn(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''.

-DELta_Date string
    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.

-Output filename
    This option may be used to specify the output file. The output is sent to the standard output by default.

-Project name
    This option may be used to select the project of interest. When no -Project option is specified, the AEGIS_PROJECT environment variable is consulted. If that does not exist, the user's $HOME/.aegisrc file is examined for a default project field (see aeuconf(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.

RECEIVE
The receive variant takes a patch and creates an Aegis change (see aenc(1)) to implement the change within. Files are added to the change (see aenf(1), aecp(1), aerm(1), aent(1)) and then the patch contents are unpackaged into the development directory, and the changes applied to the files.

The patch does not have to be produced by the aepatch(1) command. Normal patches produced by diff(1) command are also valid input. The intent is that you can particicate in normal open source development, and also use Aegis, even if your fellow developers are not.

Once unpacked, the change is then built (see aeb(1)), differenced (see aed(1)), and tested (see aet(1)). The automatic process stops at this point, so that you can confirm that the change is desired.

  File Names
It is common for patch files generated using the usual diff -r mechanism to contain extra path prefixes. The aepatch(1) command attempts to remove these automagically. This is usually possible because patches usually modify files within the project, so the patch file names are compared with project file names to guess which and how much path prefixes to remove.

-Remove_Path_Prefix string
    This option may be used to explicitly specify path prefixes to be removed, if present. It may be specified more than once.

If you have a complex project directory structure, from time to time people may send you patches relative to a sub-directory, rather than relative to the project root. The aepatch(1) program can't guess this by itself.

-Add_Path_Prefix string
    This option may be used to specify the path of a project sub-directory in which to apply the patch.

  Notification
The aepatch command invokes various other Aegis commands. The usual notifications that these commands would issue are issued.

  Options
The following options are understood by the receive variant:

-Change number
    This option may be used to choose the change number to be used, otherwise the change number in the patch (if present) will be used if it is available, otherwise one will be chosen automatically.

-DELta number
    This option may be used to specify a particular delta in the project's history to copy the file from, just as for the aecp(1) command. You may also use a delta name instead of a delta number.

-DIRectory path
    This option may be used to specify which directory is to be used. It is an error if the current user does not have appropriate permissions to create the directory path given. This must be an absolute path.

    Caution: If you are using an automounter do not use `pwd` to make an absolute path, it usually gives the wrong answer.

-File filename
    Read the change set from the specified file. The default is to read it from the standard input. The filename `-' is understood to mean the standard input.

    If your system has libcurl(3), and Aegis was configured to use it at compile time (this is the default if it is available) you will also be able to specify a Uniform Resource Locator (URL) in place of the file name. The relevant data will be downloaded. (The -Verbose option will provide a progress bar.)

-Project name
    This option may be used to set the project name. If not specified the project name in the input package will be used (if present), otherwise the usual project name default will be used.

  Security
Receiving changes by e-mail, and automatically committing them to the baseline without checking them, would be a recipe for disaster. A number of safeguards are provided:

•   The format of the package is confirmed to be correct, and the package verified for internal consistency, before it is unpacked and acted upon.

•   The automatic portion of the process stops before development ends. This ensures that the receiver validates the change before it is committed, and then it must also be reviewed, preventing accidental or malicious damage.

•   The more you use Aegis' test management facilities (see aent(1) and aet(1)) the harder it is for an inadequate change to get into the baseline.

LIST
The list variant can be used to list the contents of a package without actually unpacking it first. The output is reminiscent of the aegis -list change-details output.

  Options
The following options are understood by the list variant:

-File filename
    Read the change set from the specified file. The default is to read it from the standard input. The filename `-' is understood to mean the standard input.

    If your system has libcurl(3), and Aegis was configured to use it at compile time (this is the default if it is available) you will also be able to specify a Uniform Resource Locator (URL) in place of the file name. The relevant data will be downloaded. (The -Verbose option will provide a progress bar.)

-Output filename
    This option may be used to specify the output file. The output is sent to the standard output by default. Only useful with the -List option.

OPTIONS
The following options to this command haven't been mentioned yet:

-Help
    This option may be used to obtain more information about how to use the aepatch program.

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 aepatch are long, this means ignoring the extra leading '-'. The "--option=value" convention is also understood.

FILE FORMAT
The file format re-uses existing formats, rather than introduce anything new. This means it is possible to extract the contents of a package even when aepatch is unavailable.

•   On sending, the source files are generated using the diff(1) program, in the same way a normal Unix patch is generated.
    On receiving, the differences are applied to the source files, in the same manner as the normal patch(1) program.

•   On sending, the patch is compressed using the GNU gzip format. Typically primary source files are ASCII text, resulting in significant compression. (This is optional.)
    On receiving, if the patch is compressed it will be automagically uncompressed, detection is automatic, you do not need to do this yourself.

•   On sending, the compressed patch is encoded using the MIME base64 encoding. This makes the result approximately 33% larger than the compressed binary would be, but still smaller than the primary sources. (This is optional.)
    On receiving, if the patch is MIME64 encoded it will be automatically decoded, detetcion is automatic, you do not need to do this yourself.

EXIT STATUS
The aepatch command will exit with a status of 1 on any error. The aepatch command will only exit with a status of 0 if there are no errors.

ENVIRONMENT VARIABLES
See aegis(1) for a list of environment variables which may affect this command.

COPYRIGHT
aepatch version 4.16
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 20 Peter Miller; All rights reserved.

The aepatch program comes with ABSOLUTELY NO WARRANTY; for details use the 'aepatch -VERSion License' command. This is free software and you are welcome to redistribute it under certain conditions; for details use the 'aepatch -VERSion License' command.

AUTHOR
Peter Miller | E-Mail: | millerp@canb.auug.org.au
/\/\* | WWW: | http://www.canb.auug.org.au/~millerp/