Next: , Up: Introducing Changesets

A.2.1 mkpatch

mkpatch computes a changeset describing the differences between two trees. The basic command syntax is:

             % tla mkpatch ORIGINAL MODIFIED DESTINATION

which compares the trees ORIGINAL and MODIFIED.

mkpatch creates a new directory, DESTINATION, and stores the changeset there.

When mkpatch compares trees, it uses inventory ids. For example, it considers two directories or two files to be "the same directory (or file)" if they have the same id – regardless of where each is located in its respective tree. (See Inventory Ids for Source.)

A changeset produced by mkpatch describes what files and directories have been added or removed, which have been renamed, which files have been changed (and how they have been changed), and what file permissions have changed (and how). When regular text files are compared, mkpatch produces a context diff describing the differences. mkpatch can compare binary files (saving complete copies of the old and new versions if they differ) and symbolic links (saving the old and new link targets, if they differ).

A detailed description of the format of a changeset is provided in an appendix (see The arch Changeset Format).