This chapter illustrates the basic bringover, putback, resolve cycle using an example.
The chapter contains the following topics:
The example employs a simple case to demonstrate:
Using the Bringover Create transaction to create two new child workspaces from a common parent
Using the Putback transaction to put back changes from one of the child workspaces to the parent
Using the Bringover Update transaction to update the other child workspace with those changes
Resolving conflicts created during the Bringover Update transaction
For this example, assume two writers (Jane and Bob) are responsible for maintaining the man pages for some of the Configuring commands. The main man page workspace is named man_pages. The writers decide that they will each do their work in separate child workspaces and merge their work in man_pages. Figure 11-1 shows the file system hierarchy in the workspace man_pages.
Each writer creates his and her own child workspaces. Each child contains the same files as the parent workspace man_pages.
Jane selects the man_pages icon on the Workspace Graph pane and chooses Transactions > Bringover > Create (see Figure 11-2).
The Bringover Create pane of the Transactions window opens (see Figure 11-3).
Jane enters the following information:
The path name of the child workspace in the To Child Workspace Directory text box
The directory man/ in the File List pane using the Add Files dialog box opened by the Add button (see Figure 11-4).
The character "." (representing all of the workspace) could have been specified in the file list pane instead of man/. Because all SCCS files are located beneath man/, the two are equivalent.
Jane clicks Bringover to initiate the Bringover Create transaction.
Bob repeats the process to create his workspace named man_pages_bob.
Figure 11-5 show the output produced during the Bringover Create transaction.
The output includes the following important information:
Examined files: 13
During the initial examination phase of the Bringover transaction, Configuring determined that 13 files differed in the parent and child. In this case, since the child is being created and thus contains no files, all files contained in the parent are considered for the transaction.
Bringing over contents changes: 13
Configuring has determined that the 13 files in the list should be brought over from the parent to the child workspace.
Contents Summary: 13 Create
This line indicates that 13 files were created (as opposed to updated) in the child. In the Bringover Create transaction, all transferred files fall into this category.
13 update children's name history
The name history is a file that assists Configuring in tracking file names. It is used to speed up the processing of renamed files.
Bob begins work in his new workspace and makes changes to the file bringover.1, putback.1, and args.4. He decides that these changes are important and that Jane should have access to them. He uses the Putback transaction to copy the changes back to the common parent workspace man_pages.
Bob selects the man_pages_bob icon on the Workspace Graph pane and chooses Transactions > Putback (see Figure 11-6).
When the Putback pane of the Transactions window opens (see Figure 11-7), Bob chooses the Preview option. By choosing this option, the transaction proceeds without actually copying files. Bob is able to view the output of the transaction without actually altering files; by using this option he is able to confirm that the transaction will proceed the way he expects.
Configuring automatically loads the directory man/ into the File List pane. This is the directory that Bob specified when he created man_pages_bob; the value was saved in the workspace Codemgr_wsdata/args file. He could change the contents of the File List pane using the buttons directly below the pane.
The output is shown in Figure 11-8.
Satisfied with the output, Bob deselects the Preview option and re-executes the Putback transaction.
Jane makes changes to the files putback.1 and locks.4 in man_pages_jane. Before she attempts to put the changes back to the man_pages workspace, she wants to update her workspace with the changes that Bob has just put back to man_pages. She uses the Bringover Update transaction.
Jane selects the man_pages_jane icon on the Workspace Graph pane and chooses Transactions > Bringover > Update.
When the Bringover Update pane of the Transactions window opens, Jane chooses the Preview option. By choosing this option, the transaction proceeds without actually copying files. Jane is able to view the output of the transaction without actually altering files. By using this option she is able to determine which files have been changed prior to taking any real action.
The output of the Bringover Update transaction (see Figure 11-11) indicates that:
args.5 and bringover.1 will be updated in man_pages_jane.
There will be a conflict created on putback.1. The conflict occurs because putback.1 is changed both in man_pages by Bob and in man_pages_jane by Jane.
One file (locks.4) is changed only in man_pages_jane.
The other 11 files are unchanged.
None of these changes surprises Jane, so she decides to complete the transaction by re-executing it with the Preview option deselected. After the transaction completes as expected, the Configuring program automatically presents Jane with the option to resolve the conflict created on putback.1 (see Figure 11-12).
Jane decides that she wants to resolve the conflict now and she clicks Yes. The Resolve pane of the Transactions window opens (see Figure 11-13).
If the conflict is left unresolved, the Resolve transaction can be initiated later by either double-clicking the man_pages_jane icon, or by selecting the icon and choosing Transactions > Resolve.
If the Auto Start Merging window property is set for the Resolve pane, Merging begins execution automatically.
The file in conflict (man/man1/putback.1) is listed in the File List pane of the Transactions window. The file is automatically selected (highlighted) so Jane clicks Merge Conflicts. If there had been multiple files in the list, Jane could have deselected any portion of the list. If the Auto Advance property is selected (the default), the Configuring program automatically works its way down through the list of selected files.
Configuring starts Merging (see Figure 11-14) and passes it the name of putback.1.
Jane works her way through the merging process, accepting Bob's changes from the right pane and her changes from the left. When all the differences have been resolved, she saves the changes. See Chapter 13, Starting Merging and Loading Files," and Chapter 14, Examining Differences" for more information about using Merging.
Jane can now put back her changes to the parent workspace (man_pages) following the same procedure that Bob used (see "Putting Back Changes").