." ." Copyright (c) 1992 by Sun Microsystems, Inc. ." ." @(#)resolve.1 1.41 00/03/28 SMI ." .TH RESOLVE 1 "01 December 1992" .SH NAME resolve \- merge files in conflict using interactive commands and/or Filemerge .SH SYNOPSIS .B resolve .RB [ " \-f " ] .RB [ " \-n " ] .RB [ " \-V " ] .RB [ " \-w " .IR ws " ] .SH DESCRIPTION The .B resolve program assists the user in resolving files that are in conflict in a TeamWare workspace. TeamWare was formerly known as CodeManager. The .B bringover command creates a conflict if the file changed in both the parent and child workspaces. It puts an entry into a workspace's .B Codemgr_wsdata/conflicts file in the child workspace. It also puts information into the .SM SCCS file about the parent, child, ancestor versions of the file. .LP The .B resolve program can be run in a variety of modes. The default mode is to prompt the user for commands and automatically advance to the next file after resolving the current file. Commands are listed below in .SM USAGE. To override any defaults, see .B ~/.codemgr_resrc under the .SM FILE section below. .LP If the user changes the default to automatically start twmerge, formerly known as FileMerge, .B resolve automatically processes the list of files in conflict, invoking (via the ToolTalk service) twmerge for each file. twmerge is an OpenLook three-way differences program that assists the user in merging the changes. The ToolTalk service message sent to twmerge includes the names of the parent, ancestor, and child files. When the user chooses the Save button in twmerge, it sends a ToolTalk service message back to .BR resolve ; .B resolve checks out the file from .SM SCCS\s0 , copies the merged version, and checks the file back in. The user may be prompted for comments during checkin. The file name is removed from the conflicts file and the information about the parent, child, and ancestor versions of the file are removed from the SCCS file. .SH OPTIONS .TP 10 .BI \-f Automatically start twmerge instead of prompting the user at the command line. .TP .BI \-n List the files in conflict. .TP .BI \-V Display the version being run on standard output. .TP .BI \-w " ws" Specifies the workspace in which to resolve files. If the .B \-w option is not specified, the value of the shell environment variable .SM CODEMGR_WS is used. If .SM CODEMGR_WS is not set and the current directory is contained within a workspace, the containing workspace is used. .SH USAGE .SS Commands .LP At the program's command prompt ("filename: "), users can specify a number of possible commands. The entire command name need not be entered, only enough of the command name to distinguish it from the other commands is required. For instance, since "accept" is the only command that begins with "a", that is all that must be entered. However, two commands exist that begin with "m", so the first \fItwo\fP letters of those commands must be entered. .TP 10 .B Note: The following abbreviations are used in the section below: \fBa\fP = ancestor, \fBc\fP = child, \fBp\fP = parent, \fBm\fP = merged result. .sp .TP 20n .BR "accept c" "| \fBp\fR" Accept the child or parent version of the file. Remove the file's name from the conflict file (\fBCodemgr_wsdata/conflicts\fP). .sp 1 .TP 20n .BR commit " [\fIfilename\fP]" Commit the merged file. This command checks out the file. If a filename is specified, it copies that file to the checked out file name; otherwise it copies over the version of the file generated by the .B merge subcommand. It then checks the file in. It may prompt for checkin comments if that property is set in the user's .B .codemgr_resrc file. The file's name is removed from the conflict file (\fBCodemgr_wsdata/conflicts\fP). .TP 20n .B "diff [options] a" "\fR| \fBc \fR| \fBp \fR| \fBm a \fR| \fBc \fR| \fBp \fR| \fBm\fR" Show the differences between two files. Any combination of ancestor, child, parent, or merged may be specified. The .BR diff (1) program is used to determine the differences. If the environment variable .SM "DIFF" is set, it names the diff program to execute. .B options are the options for the .BR diff (1) program or the program named in the .SM "DIFF" environment variable. By default, its output is piped into .BR more (1). If the environment variable .SM "PAGER" is set, it names the program to receive .BR diff 's output. .sp 1 .TP 20n \fBedit \fBa \fR| \fBc \fR| \fBp \fR| \fBm\fR Load the file into an editor. If the environment variable .SM "EDITOR" is set, it specifies the editor to use, otherwise, .BR vi (1) is used. Only the merged file can actually be edited. The other versions can be viewed but not edited because they have read-only permissions. .sp 1 .TP 20n \fBtwmerge\fP Execute the window-based twmerge tool. Must be executed on a window-based system. .sp 1 .TP 20n \fBhelp\fP Display help messages. .sp 1 .TP 20n .B "history c" \fR| \fBp \fR Print the SCCS history for changes made to the file in the child or to the file in the parent. .sp 1 .TP 20n \fBlist\fP List all the files still in conflict. .sp 1 .TP 20n \fBmerge\fP Merge the child file with the parent. The result is placed in a temporary file. This temporary file becomes the version of the file referred to as "\fBm\fP" by the other commands. The \fBmerge\fP command attempts to automerge as much as possible. If it cannot automerge the entire file, it will display the number of changes it could not automerge. Users must use the .B edit m command to hand merge the rest of the file. The changes that could not be automerged are marked with ">>>>>>>>". You can search for this marker in the file to locate the unresolved conflicts. Once you have a version you are satisfied with, use the \fBcommit\fP command to commit the file. .sp 1 .TP 20n \fBmore \fBa \fR| \fBc \fR| \fBp \fR| \fBm\fP Use the \fBmore\fP command to display the contents of the ancestor, child, parent, or merged file. If the environment variable .SM "PAGER" is set, it specifies the program used to show the contents. Otherwise, .BR more (1) is used. .sp 1 .TP 20n .BR skip " [\fInumber\fP]" Skip to the next file. If \fInumber\fP is specified, skip to the file with that number. Use the .B list command to view the files in numbered order. .sp 1 .TP 20n \fBsh \fP[\fIcommand\fP] Invoke a shell. If \fIcommand\fP is specified, execute the command. If the environment variable .SM "SHELL" is set, it names the shell that will be used. Otherwise, .BR /bin/sh (1) is used. .sp 1 .TP 20n \fB! \fP[\fIcommand\fP] Invoke a shell. If \fIcommand\fP is specified, execute the command. If the environment variable .SM "SHELL" is set, it names the shell that will be used. Otherwise, .BR /bin/sh (1) is used. .sp 1 .TP 20n \fBquit\fP Quit this command. .SH "ENVIRONMENT" The following variables are used by .BR resolve . .TP 25 .SM CODEMGR_PATH_ONLY TeamWare commands first search for other TeamWare binaries relative to where their own binary is located in the file system, they then search in the directories specified in the .SM PATH environment variable. Setting this variable causes TeamWare commands to search for other TeamWare binaries only in .SM PATH. .TP .SM CODEMGR_WS Contains the name of a user's default workspace. The workspace specified by .SM CODEMGR_WS is automatically used if \fB-w\fP option is not specified to a command. .TP .SM DIFF Contains the name of the command used by the .B diff subcommand. Defaults to .BR "diff -w" . .TP .SM EDITOR Contains the name of the editor .B resolve activates to edit files. Defaults to .BR vi . .TP .SM PAGER Contains the name of the page viewer program to which .B resolve pipes .B diff output. Defaults to .BR more . .TP .SM SHELL Contains the name of the shell that .B resolve activates when the .B sh subcommand is executed. Defaults to .BR /bin/sh . .LP The following variables are set by .BR resolve . .TP 25 .SM CODEMGR_RS_ANCEST Contains the name of the version of the ancestor file, if one exists. .TP .SM CODEMGR_RS_CHILD Contains the name of the version of the child file with keywords expanded. .TP .SM CODEMGR_RS_MERGED Contains the name of the merged version of the file. .TP .SM CODEMGR_RS_PARENT Contains the name of the version of the parent file. .SH FILES .LP .TP 25 .B ~/.codemgr_resrc This file allows the user to change five default properties: .IP .B start_filemerge .IP If .B start_filemerge is set, then twmerge is automatically started when resolve begins execution. By default this is not set. To change the default, add the line "set start_filemerge" to the file. .IP .B autoadvance .IP If autoadvance is set, and twmerge is running, it is automatically loaded with each successive file. This is the default setting. To turn it off, add the line "set noautoadvance" to the file. .IP .B skipcomments .IP A default comment is automatically supplied during checkin after the user resolves the file. To be prompted to include an additional comment, add the line "set noskipcomments". .IP .B reuse_filemerge .IP If a twmerge process is already in use prior to executing .BR resolve , the .B resolve program will \fInot\fP reuse that process. If you want the .B resolve program to reuse an already running FileMerge process, add the line "set reuse_filemerge". .IP .B autosave .IP If this property is set, \fIand\fP all the changes in the file can be "automerged," the file will also be automatically saved and checked in; the user need not choose the FileMerge Save button. This in not the default behavior. To set this property add the line "set autosave". .TP 25 \fIws\fB/Codemgr_wsdata/conflicts\fR List of files in conflict .SH "SEE ALSO" .IR "Sun WorkShop TeamWare User's Guide" .LP .sp .nf bringover(1), codemgr(1), def.dir.flp(1), dmake(1), freezept(1), putback(1), rcs2ws(1), teamware(1), twbuild(1), twfreeze(1), twmerge(1), twversion(1), workspace(1), ws_undo(1), access_control(4), args(4), children(4), conflicts(4), description(4), freezepointfile(4), history(4), locks(4), nametable(4), notification(4), parent(4), putback.cmt(4) .fi .SH NOTES .LP If you want to hand-merge a file, merge it into a temporary file name. Then run the "\fBcommit\fP \fIfilename\fP" subcommand, specifying the temporary file name as \fIfilename\fP.