Update Revised Version of a Chapter

DESCRIPTION:

Update a revised version of a S-PLUS chapter.

USAGE:

updateChapter(new, prev, current)

ARGUMENTS:

new
an S database, containing the new revision of a chapter.
prev
an S database, containing the previous revision of a chapter.
current
the database containing the current working version of the chapter, default = 1.

VALUE:

a named list summarizing the actions taken or possible, as well as any conflicts. It reports possible changes to the user, and if allowed, has the side effect of making the changes.

Background:

This function attacks the problem of making updates to a chapter (probably a large one), when more than one programmer is revising objects in the chapter. One way to handle multiple programmers is to maintain in a version control system (CVS is our recommended choice) the objects needed to describe the chapter. Running make dump in an S chapter creates files describing the chapter and another file, DUMP_FILES, listing what files need to be captured in the version control system. If this is done, and the current user wants to update the current chapter corresponding to two revisions of the chapter, the shell script $SHOME/bin/updataChapter can be used to create two databases corresponding to a previous committed version and the new version. After runnng the shell script, call this function in S.

DETAILS:

The updateChapter function expects three databases. Two of them, new and prev, should correspond to committed revisions of the objects in a chapter. The third database is the current, working version of the same chapter. By default, it is the working data. The goal of the updating is to apply the revisions in new to current, leaving it consistent with new. The user is prompted to allow changes to be made, subject to conflicts. Conflicts exist if any changes in current from prev are inconsistent with changes in new. No objects in conflict will ever be updated. Changes in current to objects not changed in new are not considered conflicts. The model is that the owner of current is revising the chapter, while some other programmer has also revised it since the version in prev. These changes are to be incorporated in the current user's copy.

SEE ALSO:

,describes the changes made between two versions of a chapter.

EXAMPLES:

updateChapter("./newCVS", "./prevCVS", ".")