CSC/ECE 517 Fall 2009/wiki1a 4 SCM: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
Line 16: Line 16:


* '''Workspace: '''        The space used by the user for editing, testing, debugging and building purpose. Workspace is private copy of files. Any changes made to it is confined to the local copy which is not updated in the repository unless the user explicitly commit the changes. Workspace is also known as "Sandboxes" or "Views".
* '''Workspace: '''        The space used by the user for editing, testing, debugging and building purpose. Workspace is private copy of files. Any changes made to it is confined to the local copy which is not updated in the repository unless the user explicitly commit the changes. Workspace is also known as "Sandboxes" or "Views".


* '''Add: ''' The action of putting a new file/folder into the repository for the first time. Version control starts only when files are 'Added'.
* '''Add: ''' The action of putting a new file/folder into the repository for the first time. Version control starts only when files are 'Added'.


* '''Get: '''  Operation of copying files from repository to workspace. The files retrieved using 'Get' are read only copies and not intended to be edited.
* '''Get: '''  Operation of copying files from repository to workspace. The files retrieved using 'Get' are read only copies and not intended to be edited.


* '''Checkout: '''  Action of Downloading a file from repository to workspace for editing. SCM maintains a list of checked out files and the username who is editing it.
* '''Checkout: '''  Action of Downloading a file from repository to workspace for editing. SCM maintains a list of checked out files and the username who is editing it.

Revision as of 23:31, 7 September 2009

Source Code Management is a mechanism to track and store the modifications made to files during large scale software development. This is achieved by assigning a unique version number (also called revision number) for changes made to a file. Along with the version number, it also stores the username who made the changes, time-stamp and comments from the user. Version control provides a suitable environment for distributed, collaborative software development as it supports Version Comparisons, Restorations, and Merging etc.

Some of the commercial Version control systems are CVS, SVN, Git, Mercurial, Bazaar, LibreSource, Montone, Clearcase, Perforce etc.

Overview

Terminologies and Definitions

Before one understands the best practices of Source Code Management, the user must be aware of the terminologies involved. The following list provides a non-comprehensive list of terms involved in SCM.

  • Repository: It is a database storing the files. This can be either distributed or centralized. In case of distributed, every user will have their own local repository copy and merging takes place peer to peer. Where as in centralized, there is only one main repository server.
  • Client / Server: Computer hosting the repository is known as the server and the computer which connects to the repository is known as client.
  • Workspace: The space used by the user for editing, testing, debugging and building purpose. Workspace is private copy of files. Any changes made to it is confined to the local copy which is not updated in the repository unless the user explicitly commit the changes. Workspace is also known as "Sandboxes" or "Views".
  • Add: The action of putting a new file/folder into the repository for the first time. Version control starts only when files are 'Added'.
  • Get: Operation of copying files from repository to workspace. The files retrieved using 'Get' are read only copies and not intended to be edited.
  • Checkout: Action of Downloading a file from repository to workspace for editing. SCM maintains a list of checked out files and the username who is editing it.
  • Checkin: Action of uploading the changed file to repository. SCM updates the repository my reflecting a new version of changed file.
  • Version Number: Indicates the version of the specified file. Using version number we can retrieve/revert/diff to old versions of file.This feature helps to store history of changes made to the file.
  • Branch: A separate private copy of file which can be used for specific purposes like testing, debugging, developing and bug fixing etc.
  • Merge: Process of combining two different versions of the same file. Merging usually involves copying changes of the files present in one branch to another.
  • Lock: Getting an exclusive modification rights through SCM. This means no two user can modify the same file at same time.
  • History: List of changes made to a file from the time it has been added to repository. History also provide details like users who have changed the file and comments for the change.

Best practices in SCM

Workspace

Checkin

Checkout

Branching

Labeling

Branch Merging

File Merging

External References