How Concurrent Versioning System (CVS) detects changes during commit?
Say you check out a directory of 100 files. You e开发者_如何学Godit 5 of the files, and you go to commit the directory back. How does CVS know which of the 100 files were modified (not all of them were)?
CVS keeps information on files in a hidden directory, including the date of the last version. When you edit a file, you change the modified date, and that signals to CVS that you've changed the file. (Even if you edit it back, it still counts as changed. CVS doesn't keep its own local copy of the repository files.)
Once you're checking in, CVS will get a copy of the appropriate files from the repository and compare to see which changes you've made. That's when it will catch files you've edited and changed back.
精彩评论