What does it mean by atomic commit for a versioning system?

One of the reasons why programmers prefer SVN over CVS is the former allows atomic commits ? What does this mean ?

1

It means that when you do a commit to the version control system either everything you want to commit goes in, OR nothing does.

In CVS, when you try to commit it’s possible for the commit to succeed on several files, then fail on several others (because they’ve changed). This leaves the repository in an unfortunate state because half of your commit isn’t there, and it’s likely that you’ve left things in a state where they won’t compile or worse. Now you’ve got to hurry up and integrate whatever changes so that you can commit the other files before someone else needs to update and gets your broken set of changes.

In SVN this won’t happen – SVN will either commit everything you’ve changed, or it will fail the whole changeset. Thus, you’ll never leave the repository in a broken state due to commit issues.

13

This is explained eg in Bye-bye CVS. I’ve been Subverted article written by Andy Lester:

If I try to commit in Subversion, but one of the files has a conflict, or is out-of-date, none of the files commits. In CVS, you’ve got a half-commited set of files that you have to fix RIGHT NOW.

The fact that CVS forces programmer to fix the merge immediately is as counter-productive as it gets. Compared to that, an option to delay / cancel / carefully merge changes is a substantial benefit.


Other benefits of SVN over CVS explained in above article are:

  • Local versions of everything you do
     
    If you want to cvs diff, you have to be able to connect to your repository. No net connection, no
    diffing. Subversion stores local pristine copies of what you’re
    working on, so svn diff will work just fine. Want to start over? svn
    revert works unconnected, too.

  • Symbolic names of revisions
     
    HEAD is the name of the tip of the trunk in CVS, but I’ve always wanted to be able to say “-r-1″ like I
    could way back when in PVCS days. With CVS, I have to do a cvs log on
    what I’m editing, and then subtract one. That’s no fun. With
    Subversion, I can say svn diff -r PREV.

  • Real status reporting
     
    In CVS, the only way you can see if something on the server is newer is to cvs update and hope that
    whatever comes down doesn’t cause any conflicts. With the svn status
    command, I get real status, so I can see if there are conflicts BEFORE
    I do an update.

  • Helpful handling of merge conflicts
     
    In CVS, if there are conflicts, you get conflict markers in your file. In Subversion, you
    get conflict markers, PLUS a copy of your original, pre-conflict file,
    PLUS the version that came down from the server, PLUS the version that
    you were originally editing. Then, you must explicitly svn resolve
    filename.txt to tell Subversion that you’ve fixed the problem. No more
    accidentally commiting back into CVS with conflict markers still
    there.

It means that all changes to all files are committed in a single transaction, so either all succeed or none.

This means that you are less likely to get partial edits checked in to the repository which cause builds to fail. You can still get people forgetting to check in all the relevant files, but that’s a process issue rather than a problem with the versioning system.

2

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật