6731044 wx2hg should deal better with nested repositories
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 2008 Sun Microsystems, Inc. All rights reserved. 21 .\" Use is subject to license terms. 22 .\" 23 .\" ident "@(#)wx2hg.1 1.1 08/07/09 SMI" 24 .TH wx2hg 1 "6 Jul 2008" 25 .SH NAME 26 .I wx2hg 27 \- Convert a wx-managed workspace to Mercurial. 28 .SH SYNOPSIS 29 .B wx2hg 30 [ \fB\-u\fR ] 31 [ \fB\-r\fR \fIhg_rev\fR ] 32 [ \fB\-t\fR \fIhg_ws\fR ] 33 \fItw_ws\fR 34 .LP 35 .SH DESCRIPTION 36 .I wx2hg 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: 42 .LP 43 Suppose that you have a project workspace, which has some changes 44 relative to its parent workspace. 45 .I wx2hg 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 51 workspace. 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. 56 .LP 57 .I wx2hg 58 uses 59 .BR wx (1) 60 to determine which files have been renamed or altered. If your 61 workspace is not already controlled by 62 .BR wx (1), 63 .I wx2hg 64 puts it under 65 .BR wx (1) 66 control. If your workspace is already under 67 .BR wx (1) 68 control, 69 .I wx2hg 70 runs 71 .BR wx update 72 to ensure that the 73 .BR wx (1) 74 state files are up-to-date. This step can take a while. If you are 75 sure that 76 .BR wx (1) 77 already has the right list of files, you can skip this step by using 78 the 79 .B \-u 80 option. 81 .LP 82 You can use the 83 .B \-t 84 .I hg_ws 85 option to name the Mercurial target workspace, rather than having 86 .I wx2hg 87 default to using \fItw_ws\fR\-hg. 88 .LP 89 .I wx2hg 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 93 .I wx2hg 94 and use the 95 .B \-r 96 .I hg_rev 97 option to specify that revision. (See below for more discussion on 98 recovery from errors.) 99 With the 100 .B \-r 101 option, 102 .I wx2hg 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 107 workspace. 108 .LP 109 .I wx2hg 110 exits with an error if it detects a rename conflict. 111 .LP 112 If 113 .I wx2hg 114 exits with an error, you can discard any changes made prior to the 115 error, then use the 116 .B \-t 117 option to reuse the workspace. To discard changes made prior to the 118 error, use this command: 119 .LP 120 .RS 5 121 hg \-R \fIhg_ws\fR update \-C 122 .RE 123 .LP 124 .SH OPTIONS 125 .IP "\fB\-r\fR \fIhg_rev\fR" 10 126 Use 127 .I hg_rev 128 as the Mercurial changeset that corresponds to the point 129 in time at which your teamware workspace was synchronized with its parent. 130 You may specify 131 .I hg_rev 132 as a changeset id or a Mercurial tag. 133 .IP "\fB\-t\fR \fIhg_ws\fR" 10 134 Use an existing Mercurial workspace as the target, rather than 135 creating one. 136 .IP 137 If omitted, 138 .I tw_ws 139 must be a child of /ws/onnv-clone, and 140 .I wx2hg 141 will create the Mercurial workspace \fItw_ws\fR\-hg. 142 .IP \fB\-u\fR 143 Skip the "wx update" step if the workspace is already under 144 .BR wx (1) 145 control. 146 .LP 147 .SH SEE ALSO 148 .BR hg "(1), " wx (1) 149 .LP 150 .SH DIAGNOSTICS 151 .LP 152 wx2hg: 153 .I tw_parent 154 is not recognized as a gate; please provide a Mercurial workspace (-t 155 hg_ws) that matches it. 156 .LP 157 .RS 5 158 This means that 159 .I tw_parent 160 does not contain a Codemgr_wsdata/hg_twin file pointing at its mercurial 161 equivalent. If necessary, you may reparent 162 .I tw_ws 163 to a workspace that specifies an hg_twin 164 and rerun 165 .IR wx2hg . 166 Otherwise, you must use the 167 .B \-t 168 option to specify an existing 169 Mercurial workspace whose contents matches the parent of 170 .IR tw_ws . 171 .RE 172 .LP 173 teamware parent ... doesn't match its mercurial twin 174 .LP 175 .RS 5 176 .I wx2hg 177 detected an unexpected difference between the Teamware parent and the 178 Mercurial workspace. This likely means that the parent of your 179 teamware workspace is not in synch with the mercurial parent. In that 180 case, ask the maintainer of the parent workspace to resynchronize 181 them, or use 182 .B \-r 183 to specify a revision of the Mercurial workspace that matches the 184 Teamware parent. 185 .RE 186 .LP 187 wx2hg will only migrate checked-in files; please check in these files with wx 188 ci and try again 189 .LP 190 .RS 5 191 In order to minimize spurious conflicts due to SCCS keyword 192 substitution, 193 .I wx2hg 194 only migrates changes in checked-in files. Please check in your 195 changes with 196 .I wx delget 197 prior to migration. 198 .RE 199 .SH FILES 200 .IP \fItw_ws\fR/Codemgr_wsdata/hg_twin 201 is read by wx2hg from the parent workspace of the teamware workspace 202 being converted in order to find the mercurial equivalent of that 203 workspace. The first line of hg_twin contains the URL of the 204 mercurial equivalent workspace. Since a single teamware workspace may 205 be split into multiple mercurial repositories, the 2nd and subsequent 206 lines of the file contain the relative paths within the first 207 repository of additional child repositories. The maintainer of a gate 208 being converted is responsible for creating this file to allow 209 teamware children of the teamware gate to be converted into mercurial 210 children of the mercurial gate. 211 .RE 212 .SH BUGS 213 If a file is both renamed and updated, doing an "hg diff" in the 214 Mercurial workspace will 215 show the entire (new) contents of the file, not just the updates. 216 .LP 217 There is no attempt at automated recovery in case of a rename 218 conflict. 219 .LP 220 If a Teamware workspace is split into multiple Mercurial twin 221 workspaces (as is the case with the ON closed source tree), then 222 Teamware filemv commands that alter the inner workspace are not 223 supported. --- EOF ---