Atomic commit: Difference between revisions

Content deleted Content added
m link changeset using Find link
Line 34:
Atomic commits are a common feature of [[revision control|version control software]], and crucial for maintaining a consistent state in the repository.<ref name="levenberg">{{cite web |last1=Levenberg |first1=Rachel Potvin, Josh |title=Why Google Stores Billions of Lines of Code in a Single Repository|url=https://cacm.acm.org/magazines/2016/7/204032-why-google-stores-billions-of-lines-of-code-in-a-single-repository/fulltext |website=Communications of the ACM |accessdate=20 July 2018|date=July 2016}}</ref> Most version control software will not apply any part of a commit that fails. Notable exceptions are [[Concurrent Versions System|CVS]], [[Microsoft Visual SourceSafe|VSS]] and [[IBM Rational ClearCase]] (when in UCM mode).<ref>{{cite book |last1=Smart |first1=John Ferguson |title=Java Power Tools |date=2008 |publisher="O'Reilly Media, Inc." |isbn=9781491954546 |page=301 |url=https://books.google.com/books?id=kE0UDQAAQBAJ&pg=PA301&dq=visual+sourcesafe+atomic+commit&hl=en&sa=X&ved=0ahUKEwjnmpjB8L3cAhUJON8KHeuXBt0Q6AEIKTAA#v=onepage&q=visual%20sourcesafe%20atomic%20commit&f=false |accessdate=26 July 2018 |language=en}}</ref>
 
For instance, if version control software encounters a [[Edit conflict|merge conflict]] that can not be automatically resolved, then no part of the [[changeset]] is merged. Instead, the developer is given an opportunity to either revert their changes or manually resolve the conflict.
 
This prevents the entire project from entering a broken state due to a partially applied change set, where one file from a commit is successfully committed, but another file with dependent changes fails.<ref name="versperman">{{cite book |last1=Vesperman |first1=Jennifer |title=Essential CVS. |date=2009 |publisher=O'Reilly Media, Inc. |___location=Sebastopol |isbn=9780596551407 |page=7 |edition=2nd |url=https://books.google.com/books?id=nIMNLXCBjn0C&pg=PA7&lpg=PA7&dq=atomic+commit+cvs&source=bl&ots=UsXJlcVjGI&sig=4NgDmiKx8yQx-wxCyKls89Clpiw&hl=en&sa=X&ved=2ahUKEwi7yNKe773cAhWCpoMKHUpsA-44ChDoATACegQIAhAB#v=onepage&q=atomic%20commit%20cvs&f=false|quote=A feature that CVS doesn't have, and that many teams like, is atomic commits. This feature ensures that while one person is committing changes to the repository, no one else can. Thus, each commit is a separate process, and the repository is never in a state where it has mismatched files.}}</ref>