The contents of this file are subject to the terms of the
Common Development and Distribution License (the "License").
You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
or http://www.opensolaris.org/os/licensing.
See the License for the specific language governing permissions
and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each
file and include the License file at usr/src/OPENSOLARIS.LICENSE.
If applicable, add the following below this CDDL HEADER, with the
fields enclosed by brackets "[]" replaced with your own identifying
information: Portions Copyright [yyyy] [name of copyright owner]
CDDL HEADER END
Copyright 2008 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
ident "%Z%%M% %I% %E% SMI"
Suppose that you have a project workspace, which has some changes relative to its parent workspace. wx2hg checks for the existence of, and creates if necessary, a Mercurial workspace called tw_ws-hg that is in sync with the Mercurial twin of its parent workspace. Then it applies the changes from your project workspace to this Mercurial workspace. You can review the changes before committing them. Note that any intermediate deltas will be lost; note also that your child workspace must be up-to-date with respect to the parent.
wx2hg uses wx (1) to determine which files have been renamed or altered. If your workspace is not already controlled by wx (1), wx2hg puts it under wx (1) control. If your workspace is already under wx (1) control, wx2hg runs wx update to ensure that the wx (1) state files are up-to-date. This step can take a while. If you are sure that wx (1) already has the right list of files, you can skip this step by using the -u option.
You can use the -t hg_ws option to name the Mercurial target workspace, rather than having wx2hg default to using tw_ws-hg.
wx2hg checks the Mercurial workspace against the Teamware parent. If it finds a discrepancy, it assumes that the Teamware parent corresponds to an older revision within the mercurial workspace. You must rerun wx2hg and use the -r hg_rev option to specify that revision. (See below for more discussion on recovery from errors.) With the -r option, wx2hg updates the Mercurial working directory to that older revision and then applies your changes. You will need to use mercurial to merge your changes with later changes in the workspace before pushing your changes to a parent workspace.
wx2hg exits with an error if it detects a rename conflict.
If wx2hg exits with an error, you can discard any changes made prior to the error, then use the -t option to reuse the workspace. To discard changes made prior to the error, use this command:
hg -R hg_ws update -C
wx2hg: tw_parent is not recognized as a gate; please provide a Mercurial workspace (-t hg_ws) that matches it.
This means that tw_parent does not contain a Codemgr_wsdata/hg_twin file pointing at its mercurial equivalent. If necessary, you may reparent tw_ws to a workspace that specifies an hg_twin and rerun wx2hg . Otherwise, you must use the -t option to specify an existing Mercurial workspace whose contents matches the parent of tw_ws .
teamware parent ... doesn't match its mercurial twin
wx2hg detected an unexpected difference between the Teamware parent and the Mercurial workspace. This likely means that the parent of your teamware workspace is not in synch with the mercurial parent. In that case, ask the maintainer of the parent workspace to resynchronize them, or use -r to specify a revision of the Mercurial workspace that matches the Teamware parent.
wx2hg will only migrate checked-in files; please check in these files with wx ci and try again
In order to minimize spurious conflicts due to SCCS keyword substitution, wx2hg only migrates changes in checked-in files. Please check in your changes with wx delget prior to migration.
There is no attempt at automated recovery in case of a rename conflict.
If a Teamware workspace is split into multiple Mercurial twin workspaces (as is the case with the ON closed source tree), then Teamware filemv commands that result in moving across repository boundaries will result in file removal from the source repository and file addition to the destination repository. So a webrev will not show changes to such files, merely entire old and new contents.