Next: , Previous: , Up: Managing Large Systems   [Contents][Index]


5.2 Source Comparison

These commands can be used to find exactly how the text in two buffers differs, and to generate a new version that combines features of both versions.

Hemlock Variable: Source Compare Default Destination (initial value "Differences")

This is a sticky default buffer name to offer when comparison commands prompt for a buffer in which to insert the results.

Command: Compare Buffers

This command prompts for three buffers and then does a buffer comparison. The first two buffers must exist, as they are the buffers to be compared. The last buffer, which is created if it does not exist, is the buffer to which output is directed. The output buffer is selected during the comparison so that its progress can be monitored. There are various variables that control exactly how the comparison is done.

If a prefix argument is specified, then only only the lines in the the regions of the two buffers are compared.

Command: Buffer Changes

This command compares the contents of the current buffer with the disk version of the associated file. It reads the file into the buffer Buffer Changes File, and generates the comparison in the buffer Buffer Changes Result. As with Compare Buffers, the output buffer is displayed in the current window.

Command: Merge Buffers

This command functions in a very similar fashion to Compare Buffers, the difference being that a version which is a combination of the two buffers being compared is generated in the output buffer. This copies text that is identical in the two comparison buffers to the output buffer. When it encounters a difference, it displays the two differing sections in the output buffer and prompts the user for a key-event indicating what action to take. The following commands are defined:

1

Use the first version of the text.

2

Use the second version.

b

Insert the string "**** MERGE LOSSAGE ****" followed by both versions. This is useful if the differing sections are too complex, or it is unclear which is the correct version. If you cannot make the decision conveniently at this point, you can later search for the marking string above.

C-r

Do a recursive edit and ask again when the edit is exited.

Hemlock Variable: Source Compare Ignore Case (initial value nil)

If this variable is non-nil, Compare Buffers and Merge Buffers will do comparisons case-insensitively.

Hemlock Variable: Source Compare Ignore Indentation (initial value nil)

If this variable is non-nil, Compare Buffers and Merge Buffers ignore initial whitespace when comparing lines.

Hemlock Variable: Source Compare Ignore Extra Newlines (initial value t)

If this variable is true, Compare Buffers and Merge Buffers will treat all groups of newlines as if they were a single newline.

Hemlock Variable: Source Compare Number of Lines (initial value 3)

This variable controls the number of lines Compare Buffers and Merge Buffers will compare when resynchronizing after a difference has been encountered.


Next: Change Logs, Previous: File Groups, Up: Managing Large Systems   [Contents][Index]