Like discussed in last chapter, there are two version control mode / work styles for the modification and update:
Modify-commit In some version control systems, developers can modify the files in working folder directly anytime we want and then perform a Commit to submit the changes to server.
Checkout-edit-checkin In source code management systems like SourceAnywhere, local files are read-only after Add by default. Users need to perform Check Out on a file first to make the file writable and then edit it. After modification, we publish the changes to the repository via Check In.
Advantage of the Checkout-edit-checkin style
Many version control systems, such as SourceAnywhere, adopt the Checkout-edit-checkin working style to avoid:
- Unnecessary merge
Incorporating changes from more than one user can be quite time-consuming sometimes, especially when more than two users are involved or they modified the same section/line of code. Multi-check out happens more frequently with the modify-commit mode than checkout-edit-checkin, since on a developer’s check out, there is no way for her to tell whether the file is already checked out or not. With SourceAnywhere, at least she gets to decide whether a multi-check out is necessary.
- Forgetting to commit changes
As mentioned, in SourceAnywhere, a check-out icon is shown beside the filename to remind developers to publish their work right after modification, instead of manually checking at the end of day. With every developer updating his work faster, the whole team gets updated by each other’s code in a timely manner and the overall efficiency gets improved.