Originally Posted By: tacit
So what Apple's engineers have chosen to do is to put a marker on files that have not changed in a certain space of time, basically telling Time machine "don't keep making backups of this file over and over again, it hasn't changed." When you open a file that has that flag set, it is telling you "This file is flagged to be skipped by Time Machine; do you want to be able to make changes and tell Time Machine to start taking snapshots of it again?"

Not really. Time Machine doesn't need any help telling which files have changed.

This is Lion's auto-save feature. The Lion metaphor for documents is "what you see on the screen is what's on disk." Normally, if you make any change to a file, no matter how minor, that change is (almost) immediately saved to disk.

The canonical example is that if you are looking at a spreadsheet and decide to send it as an attachment in an email message, what gets attached and sent is the version you're looking at, not the one you last saved. Or if it's an iCloud-savvy app, and you make a change, the change propagates in near real time into the cloud.

One problem with most implementations of auto-save is that unintended changes can get auto-saved, wiping out the version you really meant to be final. Lion's versioning feature works hand-in-hand with auto-save to ameliorate this problem. Any version you explicitly save gets kept forever, irrespective of any later auto-saves. Auto-saves, on the other hand, get pruned in much the same way that Time Machine snapshots get pruned. It's a different mechanism, but parts of the pruning algorithm share the same description: "Hourly watchamacallits are kept for 24 hours. Daily watchamacallits are kept for 30 days. Weekly watchamacallits are kept forever (disk space permitting." The only difference is whether a "watchamacallit" is a Time Machine snapshot or an auto-saved version. (Which, I repeat, are not the same thing. Lion's auto-save and versions work just fine even if you aren't using Time Machine. Time Machine works just fine without Lion.)

The significance of having a file go "locked" is that it temporary disables auto-save. That means that inconsequential changes (such as scrolling or moving the insertion point) don't get auto-saved, nor do larger but unintentional changes without asking you first. (The old way, without auto-save, it takes an explicit user interaction to modify the file: the user has to say "Save". The new way, if the file hasn't been modified in a while, it takes an explicit user interaction to say "this change is not unintentional": the user has to say "Unlock".) Unlocking a file turns auto-save back on, which in turn enables changes again (because it doesn't make sense to make a change that can't be saved).

The only connection with Time Machine is that an auto-save would modify the file, and Time Machine would notice the modification and back up the file again.

It's not that locking the file tells Time Machine "this file hasn't changed". Time Machine can figure that out all on its own, with no hints from anyone. Rather, locking the file tells the application "stop changing this file (for the time being)".

Oh, well, I guess there is one other connection with Time Machine. The "when to auto-lock" interval is set in Time Machine's preference pane, but I think that's just that the setting had to be somewhere and someone decided that adding it to TM's prefpane made more sense than creating a whole separate preference pane, or squeezing it into the already overloaded "General".