02.05.2013 Views

The Source Integrity Professional Edition User Guide - MKS

The Source Integrity Professional Edition User Guide - MKS

The Source Integrity Professional Edition User Guide - MKS

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Understanding <strong>Source</strong> <strong>Integrity</strong><br />

Storing Deltas<br />

When <strong>Source</strong> <strong>Integrity</strong> performs a check-in operation, it calculates<br />

and stores the delta between the new revision and the previous one in<br />

the archive.<br />

For instance, in the situation described earlier, revision 1.1 (that is, the<br />

first revision checked in) now contains a complete description of the<br />

changes that must be made to revision 1.2 to rebuild revision 1.1. This<br />

list of changes, the delta, is the key to understanding how archives<br />

store revisions and rebuild working files on demand.<br />

To check out revision 1.1, <strong>Source</strong> <strong>Integrity</strong><br />

reads the list of differences (that is, the delta) it contains<br />

applies the changes to revision 1.2., rebuilding a duplicate of the<br />

original revision 1.1<br />

copies the revision to a working file<br />

Using this technique, <strong>Source</strong> <strong>Integrity</strong> can recreate any revision<br />

without having to store complete copies. Usually, if you save only the<br />

changed portion of each revision, the archive will be much smaller<br />

than if the entire file were saved each time. <strong>The</strong>re are situations when<br />

this may not be the case; if you are storing binary files in an archive, a<br />

complete copy of each revision is stored by default (see “Storing<br />

Entire File” next).<br />

When <strong>Source</strong> <strong>Integrity</strong> compares the file being checked in to the<br />

preceding revision in the archive, it compares the two files line by<br />

line. While this is a logical—and efficient—way to handle text files, it<br />

is not always effective with binary files, since a relatively small<br />

change at the beginning of a binary file can displace all subsequent<br />

characters in the file, cascading changes through all remaining lines.<br />

As a consequence, the record of changes (that is, the delta) for some<br />

binary files may be as large as, or larger than, the file itself. For this<br />

reason, <strong>Source</strong> <strong>Integrity</strong> provides a number of configurable<br />

techniques for checking in files.<br />

Storing Changes Only<br />

With this method, <strong>Source</strong> <strong>Integrity</strong> calculates and stores a delta for<br />

each revision of a file when it is checked in. This is the default and<br />

recommended method for checking in text files. You can use this<br />

method for storing binary files, but <strong>MKS</strong> does not recommend it.<br />

16 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!