I'm trying to create and follow best practices for versioning control and came across a reference to atomic commits in Subversion. Since I've never heard of this action, I have a few questions about it.
There is no special command for atomic commits. Every commit in Subversion is atomic.
It means every commit (of any number of files) will either succeed or fail as a whole.
It's not possible that only some of the commited files make it to the repository and others not (for example, because of an error that occurred in the middle of the commit operation or a conflict in one of the files).
This is the same for TortoiseSVN, since it builds on the "normal" Subversion functionality.
The following is an excerpt from the Subversion book:
An svn commit operation publishes changes to any number of files and directories as a single atomic transaction. In your working copy, you can change files' contents; create, delete, rename, and copy files and directories; and then commit a complete set of changes as an atomic transaction.
By atomic transaction, we mean simply this: either all of the changes happen in the repository, or none of them happens. Subversion tries to retain this atomicity in the face of program crashes, system crashes, network problems, and other users' actions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With