dv-sever

As a developer, use dv-sever to acknowledge or restore severed locks. As source area owner, use dv-sever to forcibly eliminate locks on source area files.

Running 'dv-sever -X foo.C' acknowledges that a lock has been severed, and indicates that there is no desire to restore the lock. The build area file is unstaged, and the severed lock forgotten.

Running 'dv-sever -L foo.C' restores a lock that has been severed. If the lock was severed as the result of a merge, then the file's merge status is set, in preparation for a subsequent LOCAL merge. The fact that the lock was once severed is then forgotten.

A source are owner can sever a lock by running 'dv-sever foo.C'. Notification of lock owners can be suppressed with '-s', thereby disabling the ability to acknowledge the severance or restore the lock. This makes the lock silently cease to exist.

Running 'dv-sever -R thisdir' from within a build area directory, for example, severs all locks within and beneath ./thisdir. This is not something you would want to routinely do, but it can be useful when manipulating source area directories.


SYNOPSIS

dv-sever [R]         list severed files at or beneath CWD
dv-sever [-nRs] relpath...    sever locks in source files
dv-sever -L[nR] relpath...    restore severed locks
dv-sever -X[nR] relpath...    acknowledge (and discard) severed locks
                              (also unstages severed-lock files if staged)
dv-sever -XL[nR] relpath...   as with -X, but relocks unstaged files

 where: 
   relpath can be any of the following:
      a) an explicit file path relative to CWD
      b) --find='glob' specifies a filename search pattern
      c) --since=mm/dd/yyyy restricts a search by modification time
      d) a directory path relative to CWD, representing eligible files
         that it contains (possibly extended recursively with -R)
      The find/since arguments operate recursively on the CWD if no
      other relpath arguments are specified.
      CWD = current working directory

OPTIONS

 -h   displays this usage message
 -n   shows actions without performing them
 -R   extends operation recursively to subdirectory files
 -s   suppress notification and recording of severance
      (disables subsequent acknowledgement or restoration)

DESCRIPTION

This script allows a source area owner to sever locks on files made by others. Developers whose locks have been severed can either acknowledge this fact (unstaging their staged file and indicating the lock is not to be restored) or restore the lock. Knowledge of the severed lock is maintained until one action or the other is taken by the developer.

Severing a lock does nothing to the modified versions of these files within build areas, but instead REMOVES LOCKS from ALL revisions within the corresponding RCS files. The presence of multiple locks (and hence branched development) is an unexpected condition. Only the owner of the most recent locked revision is notified of the severance, and has the chance to acknowledge or restore the lock.

This script must be invoked with the current directory set somewhere within the current build area, as determined by localdev mode or via dv-select. This script will run only for the owner of the affected source area. Severing locks is not considered to be a source area modification, and so can occur any time.

Files are specified relative to the current working directory (CWD). The current directory and all specified directories and files must lie within the current build area. Files of multiple types and from within multiple directories can be specified in a single invocation.

This script supports a number of flexible options for selecting files without naming them explicitly. The ability of this script to skip processing of ineligible files makes it easy to use UNIX wildcard (glob) expansion syntax (like *.C) to specify multiple files. In addition, you can specify a directory name to indicate all eligible files within it. If used with the recursion option ('-R'), then this extends recursively down through all directories beneath the one specified.

There are also find (--find='glob') and since (--since=mm/dd/yyyy) options that allow you to search for eligible files: 1) whose names match a specified (glob) pattern, and/or 2) whose latest committed revision times are at or after a specified date.

Glob patterns consist of the familiar syntax that UNIX shells use to select groups of files (*.C, for example). The glob pattern is placed in quotes so that it is not expanded by the shell before invoking this script. When either of these options are specified, any files found are added to the list of files to be processed.

The noop option ('-n'), causes this script to list actions that would be performed and then exit. This can be a good way to verify that desired actions will work as expected prior to taking them.