Mixing Version Control with Mac OS X Lion Versions
Under Mac OS X 10.6 Snow Leopard, I've made good use of version control, Mercurial in my case. After upgrading to Mac OS X 10.6 Lion, I've discovered that quite a few files in my Mercurial repositories are now also managed by the new Versions feature.
I'm nonplussed by the situation. I've also utterly failed to find anything useful on the web, the combination of "Versions" and "version control" being pretty ambiguous.
What sort of issues might arise by both Mercurial and Versions coming into play? If I just ignore Versions, can I expect Mercurial 开发者_开发百科to work transparently? Are there any opportunities offered by using the two together?
Versions is more like a backup. It saves a version every time you "save" (or periodically with autosave), so use it if you need to recover a version since your most recent commit to version control.
They will work together. However only editing with certain apps will use versions e.g. Xcode, textEdit. I don't think it is the file itself that decides if it is under versions (ie vi won't update the version)
What Versions does is automatically save the file according to John Siracusa's review
Rather than creating a new file alongside the original, Lion continuously saves changes directly to the open document. It does this when there are large document changes, during idle times, or on demand in response to requests from other applications for access to the document's data.
But as per Apple's support note you can just save as before
You can manually create a version of your saved document at any time by choosing File > Save a Version or press Command-S (⌘-S).
So I think that mercurial will not see any difference to a file now saved using Versions.
I suspect you could have a GUI on mercurial tat would note a save via Versions but as the idea of a commi is to have files in a consistent state I suspect there is not much that could be done with this
精彩评论