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.
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.
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]
20 .\" Copyright 2008 Sun Microsystems, Inc. All rights reserved.
21 .\" Use is subject to license terms.
23 .\" ident "%Z%%M% %I% %E% SMI"
24 .TH wx2hg 1 "29 Jul 2008"
27 \- Convert a wx-managed workspace to Mercurial.
31 [ \fB\-r\fR \fIhg_rev\fR ]
32 [ \fB\-t\fR \fIhg_ws\fR ]
37 takes a Teamware workspace
38 and converts it to a workspace that is managed by
39 Mercurial. It is aimed at OS/Net projects that were started under
40 Teamware but which expect to deliver into a
41 Mercurial gate. As such, it assumes the following usage model:
43 Suppose that you have a project workspace, which has some changes
44 relative to its parent workspace.
46 checks for the existence of, and creates if necessary,
47 a Mercurial workspace called
48 \fItw_ws\fR\-hg that is in sync with the Mercurial twin
49 of its parent workspace.
50 Then it applies the changes from your project workspace to this Mercurial
52 You can review the changes
53 before committing them. Note that any
54 intermediate deltas will be lost; note also that your child workspace
55 must be up-to-date with respect to the parent.
60 to determine which files have been renamed or altered. If your
61 workspace is not already controlled by
66 control. If your workspace is already under
74 state files are up-to-date. This step can take a while. If you are
77 already has the right list of files, you can skip this step by using
85 option to name the Mercurial target workspace, rather than having
87 default to using \fItw_ws\fR\-hg.
90 checks the Mercurial workspace against the Teamware parent. If it
91 finds a discrepancy, it assumes that the Teamware parent corresponds
92 to an older revision within the mercurial workspace. You must rerun
97 option to specify that revision. (See below for more discussion on
98 recovery from errors.)
103 updates the Mercurial working directory
104 to that older revision and then applies your
105 changes. You will need to use mercurial to merge your changes with
106 later changes in the workspace before pushing your changes to a parent
110 exits with an error if it detects a rename conflict.
114 exits with an error, you can discard any changes made prior to the
117 option to reuse the workspace. To discard changes made prior to the
118 error, use this command:
121 hg \-R \fIhg_ws\fR update \-C
125 .IP "\fB\-r\fR \fIhg_rev\fR" 10
128 as the Mercurial changeset that corresponds to the point
129 in time at which your teamware workspace was synchronized with its parent.
130 If you don't have any nested repositories, you may specify
132 as a changeset id or a Mercurial tag. If you have nested repositories,
133 like usr/closed in ON, then you should specify a Mercurial tag common to
134 both (or all) repositories. This tag may be local (ie a local tag that you
135 create yourself using \fIhg tag -l\fR) or version controlled (ie a tag
136 that the gatekeepers created, such as \fIonnv_96\fR).
139 without specifying \fIhg_ws\fR, then the tags must resolve correctly
140 in the Mercurial twin(s) of your Teamware parent.
143 in conjunction with \fIhg_ws\fR, then the tags must resolve correctly
144 in your existing Mercurial repositories.
145 .IP "\fB\-t\fR \fIhg_ws\fR" 10
146 Use an existing Mercurial workspace as the target, rather than
147 creating one. If you use an existing workspace, you must also create any
148 nested repositories (like usr/closed) before running wx2hg.
152 must be a child of /ws/onnv-clone, and
154 will create the Mercurial workspace \fItw_ws\fR\-hg.
156 Skip the "wx update" step if the workspace is already under
161 .BR hg "(1), " wx (1)
167 is not recognized as a gate; please provide a Mercurial workspace (-t
168 hg_ws) that matches it.
173 does not contain a Codemgr_wsdata/hg_twin file pointing at its mercurial
174 equivalent. If necessary, you may reparent
176 to a workspace that specifies an hg_twin
179 Otherwise, you must use the
181 option to specify an existing
182 Mercurial workspace whose contents matches the parent of
186 teamware parent ... doesn't match its mercurial twin
190 detected an unexpected difference between the Teamware parent and the
191 Mercurial workspace. This likely means that the parent of your
192 teamware workspace is not in synch with the mercurial parent. In that
193 case, ask the maintainer of the parent workspace to resynchronize
196 to specify a revision of the Mercurial workspace that matches the
200 wx2hg will only migrate checked-in files; please check in these files with wx
204 In order to minimize spurious conflicts due to SCCS keyword
207 only migrates changes in checked-in files. Please check in your
213 .IP \fItw_ws\fR/Codemgr_wsdata/hg_twin
214 is read by wx2hg from the parent workspace of the teamware workspace
215 being converted in order to find the mercurial equivalent of that
216 workspace. The first line of hg_twin contains the URL of the
217 mercurial equivalent workspace. Since a single teamware workspace may
218 be split into multiple mercurial repositories, the 2nd and subsequent
219 lines of the file contain the relative paths within the first
220 repository of additional child repositories. The maintainer of a gate
221 being converted is responsible for creating this file to allow
222 teamware children of the teamware gate to be converted into mercurial
223 children of the mercurial gate.
226 If a file is both renamed and updated, doing an "hg diff" in the
227 Mercurial workspace will
228 show the entire (new) contents of the file, not just the updates.
230 There is no attempt at automated recovery in case of a rename
233 If a Teamware workspace is split into multiple Mercurial twin
234 workspaces (as is the case with the ON closed source tree), then
235 Teamware filemv commands that result in moving across repository
236 boundaries will result in file removal from the source repository and
237 file addition to the destination repository. So a webrev will not
238 show changes to such files, merely entire old and new contents.