\*(n) -DIFFerence   (1) manpage
\*(n) -DIFFerence
1
  • NAME
      (n) -DIFFerence - find differences between a change and the baseline
  • SYNOPSIS
      (n) -DIFFerence [ filename ... ] [ option ... ]
      (n) -DIFFerence -List [ option ... ]
      (n) -DIFFerence -Help
  • DESCRIPTION
      The (n) -DIFFerence command is used to generate difference listings between source files in the the development directory and the baseline. The purpose is to enable reviewers to find each and every edit performed on the source files. The difference listings will be placed into files named for the sources files but with an additional " ,D" suffix.

      The command used to perform the differences is specified in the diff_command field of the project config file (see aepconf(5) for more information).

      If no files are named on the command line, all files in the change will be differenced.

      You may name a directory on the command line, and all files in the change in that directory tree will be differenced. File Name Interpretation The (n) program will attempt to determine the project file names from the file names given on the command line. All file names are stored within (n) 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.
  • THE BASELINE LOCK
      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 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 "(n) -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 (n)' 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. Notification The actions of the command are controlled by the diff_%command and merge_%command fields of the project config file.  See aepconf(5) for more information.
  • CONFLICT RESOLUTION
      If the version of a file in the change is not the same as the version of the file in the baseline, it is out-of-date; some other change has altered the file while this change was being developed.

      When a difference is requested for an out-of-date file, a merge is performed between the common ancestor, the version in the baseline, and the version in the development directory. The command used to perform the merge is specified by the merge_command field of the project config file (see aepconf(5) for more information).

      After the merge is performed the version of the file will be changed to be the current version, marking the file as up to date, and a new build will be required.

      The difference output in the ,D files contains the result of the merge. You should edit them, to make sure the automatic merge has produced sensible results, and then rename them to be the corresponding source file.

      This merge process works most of the time. Usually two changes to two logically separate areas of functionality will alter two logically separate parts of any files they may have in common. There are pathological cases where this merge process is spectacularly useless, but these are surprisingly rare in practice.

      If any merges are required no differences will be performed. An error message and a non-zero exit status will also result. This is to ensure that developers notice that merges have been done, and that they reconcile the sources and the merged ,D files before the next difference. See the -No_Merge and -Only_Merge options, below, for exact control of when merging is performed.
  • INTEGRATION
      During integration, it is also necessary to difference a change. This provides the difference between the branch and its parent, for when development on a branch is completed and it is to be reviewed. The baseline of a branch is the development directory of the composite change it represents.
  • OPTIONS
      The following options are understood:
      -ANticipate change-number

      This option is used to nominate a source for the reference files, rather than the baseline. This may be used to synchronize with a change without having to wait for it to arrive in the baseline. It is an error if the anticipated change is not in one of the "'being reviewed'" or "'awaiting integration'" or "'being integrated'" states. A merge is always performed, because the anticipated change is "about" to make any common file out-of-date. You will still have to perform a "real" merge later.
      -BRanch number
      This option may be used to specify a different branch for the origin file, rather than the baseline. (See also -TRunk option.) Please Note: the -BRanch option does not take a project name, just the branch number suffix.
      -GrandParent
      This option may be used to specify the grandparent branch (one up from the current branch) for the origin file, rather than the baseline. (The -grandparent option is the same as the ``-branch ..'' option.)
      -Change number
      This option may be used to specify a particular change within a project. When no -Change option is specified, the AEGIS_CHANGE environment variable is consulted. If that does not exist, the user's $HOME/.aegisrc file is examined for a default change field (see aeuconf(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.
      -Help

      This option may be used to obtain more information about how to use the (n) program.
      -List

      This option may be used to obtain a list of suitable subjects for this command. The list may be more general than expected.
      -Not_Logging

      This option may be used to disable the automatic logging of output and errors to a file. This is often useful when several (n) commands are combined in a shell script.
      -TRunk

      This option may be used to specify the project trunk for the origin file, rather than the baseline. (See also -BRanch option, the -trunk option is the same as the ``-branch -'' option.)
      -No_Merge

      This option is used to cause only file differences to be generated, even when file versions are out-of-date. If not set, the default is to use the diff_preference field of the aeuconf(5) file.
      -Only_Merge

      This option is used to cause only file merges to be performed on files with out-of-date versions. Other source files are ignored. If not set, the default is to use the diff_preference field of the aeuconf(5) file.
      -Automatic_Merge

      This option is used to perform -Only_Merge if any source files have out-of-date versions, otherwise -No_Merge is performed. Only merges or differences will be performed, it will never use a mixture. If not set, the default is to use the diff_preference field of the aeuconf(5) file.
      -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.
      -TERse

      This option may be used to cause listings to produce the bare minimum of information. It is usually useful for shell scripts.
      -Verbose
      This option may be used to cause (n) to produce more output. By default (n) only produces output on errors. When used with the -List option this option causes column headings to be added.
      -Wait
      This option may be used to require (N) commands to wait for access locks, if they cannot be obtained immediately. Defaults to the user's lock_wait_preference if not specified, see aeuconf(5) for more information.
      -No_Wait
      This option may be used to require (N) commands to emit a fatal error if access locks cannot be obtained immediately. Defaults to the user's lock_wait_preference if not specified, see aeuconf(5) for more information.


      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 (n) are long, this means ignoring the extra leading '-'. The "--option=value" convention is also understood.
  • RECOMMENDED ALIAS
      The recommended alias for this command is
      
      csh% alias aed '(n) -diff \!* -v'
      sh$ aed(){(n) -diff "$@" -v}
      For user's convenience,
      particularly when they have selected the ``no merge'' preference,
      there is also a merge alias:
      
      csh% alias aem '(n) -diff -only_merge \!* -v'
      sh$ aem(){(n) -diff -only_merge $* -v}
  • ERRORS
      It is an error if
      the change is not in the
      "being developed"
      or
      "being integrated"
      states.























  • EXIT STATUS
      The
      (n)
      command will exit with a status of 1 on any error.
      The
      (n)
      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.


  • SEE ALSO
      aeb(1)
      build also takes a baseline read lock (non-exclusive)
      aecp(1)
      copy file also takes a baseline read lock (non-exclusive)
      aedb(1)
      begin development of a change
      aeipass(1)
      integrate pass takes a baseline write lock (exclusive)
      aepconf(5)
      project configuration file format
      aeuconf(5)
      user configuration file format























  • COPYRIGHT
      (n) version (V)


      Copyright (C) (Y) Peter Miller;
      All rights reserved.



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


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

Current Users: 44 © 1999-2006 Linux.com.hk PenguinSoft
All trademarks and copyrights on this page are owned by their respective companies. Linux is a trademark of Linus Torvalds.