Print this page
3272 findunref should support git

Split Close
Expand all
Collapse all
          --- old/usr/src/tools/findunref/findunref.1
          +++ new/usr/src/tools/findunref/findunref.1
   1      -.\" " CDDL HEADER START
   2      -.\" "
   3      -.\" " The contents of this file are subject to the terms of the
   4      -.\" " Common Development and Distribution License (the "License").
   5      -.\" " You may not use this file except in compliance with the License.
   6      -.\" "
   7      -.\" " You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   8      -.\" " or http://www.opensolaris.org/os/licensing.
   9      -.\" " See the License for the specific language governing permissions
  10      -.\" " and limitations under the License.
  11      -.\" "
  12      -.\" " When distributing Covered Code, include this CDDL HEADER in each
  13      -.\" " file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  14      -.\" " If applicable, add the following below this CDDL HEADER, with the
  15      -.\" " fields enclosed by brackets "[]" replaced with your own identifying
  16      -.\" " information: Portions Copyright [yyyy] [name of copyright owner]
  17      -.\" "
  18      -.\" " CDDL HEADER END
  19      -.\" "
  20      -.\" "Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  21      -.\" "Use is subject to license terms.
  22      -.TH findunref 1 "11 Aug 2009"
        1 +.\" CDDL HEADER START
        2 +.\"
        3 +.\" The contents of this file are subject to the terms of the
        4 +.\" Common Development and Distribution License (the "License").
        5 +.\" You may not use this file except in compliance with the License.
        6 +.\"
        7 +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
        8 +.\" or http://www.opensolaris.org/os/licensing.
        9 +.\" See the License for the specific language governing permissions
       10 +.\" and limitations under the License.
       11 +.\"
       12 +.\" When distributing Covered Code, include this CDDL HEADER in each
       13 +.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
       14 +.\" If applicable, add the following below this CDDL HEADER, with the
       15 +.\" fields enclosed by brackets "[]" replaced with your own identifying
       16 +.\" information: Portions Copyright [yyyy] [name of copyright owner]
       17 +.\"
       18 +.\" CDDL HEADER END
       19 +.\"
       20 +.\" Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
       21 +.\" Use is subject to license terms.
       22 +.TH findunref 1 "Oct 30, 2012"
  23   23  .I findunref
  24   24  \- find unused files in a source tree
  25   25  .SH SYNOPSIS
  26   26  findunref [\fB-s\fP \fIsubtree\fP] [\fB-t\fP \fItstampfile\fP]
  27      -[\fB-S\fP \fBhg\fP|\fBtw\fP] \fIsrcroot\fP \fIexceptfile\fP
       27 +[\fB-S\fP \fBhg\fP|\fBtw\fP|\fBgit\fP] \fIsrcroot\fP \fIexceptfile\fP
  28   28  .LP
  29   29  .SH DESCRIPTION
  30   30  .IX "OS-Net build tools" "findunref" "" "\fBfindunref\fP"
  31   31  .LP
  32   32  The findunref utility lists the files in a source tree which have not been
  33   33  accessed more recently than a particular timestamp file.  Although
  34   34  findunref may be used on its own, it is usually invoked by
  35   35  \fBnightly\fP(1) to find files that are never referenced during a given
  36   36  build (see \fB-f\fP in \fBnightly\fP(1)).
  37   37  .LP
↓ open down ↓ 5 lines elided ↑ open up ↑
  43   43  documentation) or only referenced during specialized types of builds.
  44   44  Accordingly, \fIexceptfile\fP names a file containing a list of pathname
  45   45  globs that will be ignored by findunref.  Within \fIexceptfile\fP, any
  46   46  lines consisting solely of whitespace or starting with \fB#\fP will be
  47   47  ignored.  Directory globs may also be specified, which will cause any
  48   48  matching directories to be skipped entirely.  If no exceptions are
  49   49  desired, \fIexceptfile\fP can be \fB/dev/null\fP.
  50   50  .LP
  51   51  Depending on how findunref is invoked, it can either check all files, or
  52   52  limit its checks to files under control of a specific source code
  53      -management (SCM) system.  To limit checks to files managed by Mercurial,
  54      -the \fBhg\fP(1) utility must be present in \fB/usr/bin\fP and any relevant
  55      -repositories must be located at or under \fIsrcroot\fP.  Nested Mercurial
  56      -repositories are supported.
       53 +management (SCM) system.
       54 +.LP
       55 +To limit checks to files managed by Mercurial, the \fBhg\fP(1) utility must be
       56 +present in \fB$PATH\fP and any relevant repositories must be located at or
       57 +under \fIsrcroot\fP.  Nested Mercurial repositories are supported.
       58 +.LP
       59 +To limit checks to files managed by Git, the \fBgit\fP(1) utility must be
       60 +present in \fB$PATH\fP and any relevant repositories must be located at or
       61 +under \fIsrcroot\fP.  Nested Git repositories are \fInot\fR supported.
  57   62  .SH OPTIONS
  58   63  .TP 10
  59   64  .B -s \fIsubtree\fP
  60   65  Only look under \fIsubtree\fP for unreferenced files.  By default, all
  61   66  directories under \fIsrcroot\fP are examined.
  62   67  .TP 10
  63   68  .B -t \fItstampfile\fP
  64      -Consider files older than \fItstampfile\fP to be unreferenced. 
       69 +Consider files older than \fItstampfile\fP to be unreferenced.
  65   70  By default, \fIsrcroot\fB/.build.tstamp\fR is used.
  66   71  .TP 10
  67      -.B -S \fBhg\fP|\fBtw\fP
       72 +.B -S \fBhg\fP|\fBtw\fP|\fBgit\fP
  68   73  Only check files that are managed by the specified SCM.  To simplify
  69   74  interaction with \fBwhich_scm\fP(1), the SCM names "mercurial" and
  70      -"teamware" may also be specified.  By default, all files are checked.
       75 +"teamware" may also be specified for "hg" and "tw", respectively.
       76 +By default, all files are checked.
  71   77  .SH SEE ALSO
  72   78  .LP
       79 +\fBgit\fP(1),
  73   80  \fBhg\fP(1),
  74   81  \fBnightly\fP(1),
  75   82  \fBwhich_scm\fP(1)
  76   83  .SH NOTES
  77   84  Since many files are only used when building for a particular ISA (e.g.,
  78   85  Makefiles that are specific to x86 or SPARC), builds must be done on all
  79   86  applicable ISAs and the results merged.  For instance, if nightly builds
  80   87  (with \fB-f\fP) are done on both SPARC and x86, \fBusr/src\fP will be
  81   88  populated with a corresponding \fBunref-\fIisa\fB.out\fR file, which can
  82   89  be merged with \fBcomm\fP(1):
  83   90  .LP
  84   91  .nf
  85   92  comm -12 /path/to/unref-i386.out
  86      -         /path/to/unref-sparc.out > unref.out 
       93 +         /path/to/unref-sparc.out > unref.out
  87   94  .fi
  88   95  .LP
  89   96  This merged file can then be compared against the gate's latest
  90   97  unreferenced file list (e.g. \fB/ws/onnv-gate/usr/src/unrefmaster.out\fP).
  91   98  .LP
  92   99  Different gates have different unreferenced file policies.  Any changes to
  93  100  \fIexceptfile\fP that would define new unreferenced file policies for a
  94  101  given gate must be cleared with the appropriate gatekeepers.
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX