Print this page
Add git support to which_scm utility
| Split |
Close |
| Expand all |
| Collapse all |
--- old/usr/src/tools/scripts/which_scm.1
+++ new/usr/src/tools/scripts/which_scm.1
1 1 .\"
2 2 .\" CDDL HEADER START
3 3 .\"
4 4 .\" The contents of this file are subject to the terms of the
5 5 .\" Common Development and Distribution License (the "License").
6 6 .\" You may not use this file except in compliance with the License.
7 7 .\"
8 8 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 .\" or http://www.opensolaris.org/os/licensing.
10 10 .\" See the License for the specific language governing permissions
11 11 .\" and limitations under the License.
12 12 .\"
13 13 .\" When distributing Covered Code, include this CDDL HEADER in each
14 14 .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 .\" If applicable, add the following below this CDDL HEADER, with the
16 16 .\" fields enclosed by brackets "[]" replaced with your own identifying
17 17 .\" information: Portions Copyright [yyyy] [name of copyright owner]
18 18 .\"
19 19 .\" CDDL HEADER END
20 20 .\"
21 21 .\" Copyright 2008 Sun Microsystems, Inc. All rights reserved.
22 22 .\" Use is subject to license terms.
23 23 .\"
24 24 .\" ident "%Z%%M% %I% %E% SMI"
25 25 .\"
26 26 .TH which_scm 1 "11 April 2008"
27 27 .SH NAME
28 28 which_scm \- Report Source Code Management system
29 29 .SH SYNOPSIS
30 30 .B which_scm
31 31
32 32 .SH DESCRIPTION
33 33 .B which_scm
34 34 detects the Source Code Management (SCM) system in use, and prints a
35 35 single line of text containing a one-word name for the SCM, followed
36 36 by a space, and then the top-level directory path for the workspace.
37 37
38 38 The typical usage within a ksh script is:
39 39 .nf
40 40 which_scm | read SCM_TYPE CODEMGR_WS || exit 1
41 41 .fi
42 42
43 43 If CODEMGR_WS is set in the environment, then \fBwhich_scm\fR
|
↓ open down ↓ |
43 lines elided |
↑ open up ↑ |
44 44 checks only that directory, assuming that it is the top of the tree.
45 45
46 46 If CODEMGR_WS is not set, then \fBwhich_scm\fR searches upwards to
47 47 find the containing workspace path, and reports that path.
48 48
49 49 .B which_scm
50 50 can detect the following types of SCM systems (these are the keywords
51 51 used in the output format):
52 52 .nf
53 53 cvs
54 + git
54 55 mercurial
55 56 rcs
56 57 sccs
57 58 subversion
58 59 teamware
59 60 .fi
60 61
61 62 If the type of SCM in use is not known, then the string "unknown" is
62 63 printed, and the path returned is $CODEMGR_WS (if set) or the current
63 64 working directory. The command may exit with an error if the SCM
64 65 could be detected, but is unusable.
|
↓ open down ↓ |
1 lines elided |
↑ open up ↑ |
65 66
66 67 .SH ENVIRONMENT VARIABLES
67 68 The following environment variable is used by \fBwhich_scm\fR:
68 69
69 70 .PP
70 71 \fBCODEMGR_WS\fR path to current workspace.
71 72
72 73 .SH SEE ALSO
73 74 .IR cvs(1) ,
74 75 .IR hg(1) ,
76 +.IR git(1) ,
75 77 .IR sccs(1)
76 78 .IR svn(1) ,
77 79 .IR workspace(1)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX