Wednesday, December 19, 2007

Source Control Questions

1, What is the difference in file updating in VSS and CVS?

VSS follows "checkout-edit-checkin" doctrine ie; it is impossible for two people to modify a given file at the same time, thus avoiding the necessity of merging two versions of a file into one. Edit the working file as needed. Merge any recent changes from the server into the working file and commit the file to the repository.
CVS follows "edit-merge-commit" doctrine ie;files in the working folder are always writable. Nobody uses checkouts at all, so nobody knows who is editing which files. When a developer commits his changes, he is responsible for ensuring that his changes were made against the latest version in the repository

2, What are labels/tags?
Labels associate a name with a specific version of the product/software in the repository. If you label the code with a label at a particular point of time for a particular release, you can retrieve them by name later.

3, Give some situations where you use labels?
a.When you make a release
b.When something is about to change:Sometimes it is necessary to make a change which is widespread or fundamental. Before destabilizing your code, you may want to apply a label so you can easily find the version just before things started getting messed up.
c.When you do an automated build:Some automated build systems apply a label every time a build is done. The usual approach is to first apply the label and then do a "get by label" operation to retrieve the code to be used for the build.

4. What is label promotion? Why is it needed?

Label promotion is the process of including a higher version of file in a label than a lower version. This is done to accomodate a minor change to a label after it was originally created.

5. Explain branching.

Branching happens when the source code has to take paths/forks of development ie; for different products using the same basic mechanism, fundamentally different versions etc. Branching enables concurrent development of systems with common shared code history and merging the changes to the shared code history at a later point.

No comments: