Revison Control System(RCS), VSS or SVN are few of commonly used Version Control Systems.
Subversion is a centralized system for sharing information. At its core is a repository, which is a central store of data. It is mainly used to maintain source code and files related to a project. It works in a typical client-server model. Any number of clients can connect to server and do read or write operations. But differnce between server and respository is that it remembers every change ever written to it: every change to every file, and even changes to the directory tree itself, such as the addition, deletion, and rearrangement of files and directories. Client can read latest information or information about who did the changes last time, what are the changes he made etc.
Advantage of Subversion system is, if two Users A and B wanst to edit same file F, then they can check out F from repository and get local copies, do edit and commit the changes to repository. Subersion control follows copy-modify-merge model instead of conventional locking model. In this model, if A does changes on F and commits and B also does changes in F and wants to commit, then repository says, F is out of date, just update your file,so that changes done by A are merged. If A and B does changes at same location in F, then repository says F is in conflict state, by showing changes done by A and changes done by B. User has to decide, which changes to keep and which changes to be discard and do necessary changes, should resolve the conflicted state and commit changes.
Few useful commands (for Version Control with Subversion)
svn co --- for check out
svn commit --- for check in
svn up/svn update ---- To update local copy
svn add --- To add a file or directory to svn
svn remove --- To remove a file or directory from svn
svn cleanup --- Recursively clean up the working copy, removing locks, resuming unfinished operations etc.
svn revert --- Restore working copy. Undone changes, if any.
svn resolved --- Remove 'conflicted' status of working copy files or directories.
svn di/ svn diff --- Display the difference between two paths.
svn st/svn status --- To see status of files in local system wrt files in svn(at the time of check out)
The first six columns in the output are each one character wide:
First column: Says if item was added, deleted, or otherwise changed
' ' no modifications
'A' Added
'C' Conflicted
'D' Deleted
'I' Ignored
'M' Modified
'R' Replaced
'X' item is unversioned, but is used by an externals definition
'?' item is not under version control
'!' item is missing (removed by non-svn command) or incomplete
'~' versioned item obstructed by some item of a different kind
Second column: Modifications of a file's or directory's properties
' ' no modifications
'C' Conflicted
'M' Modified
Third column: Whether the working copy directory is locked
' ' not locked
'L' locked
Fourth column: Scheduled commit will contain addition-with-history
' ' no history scheduled with commit
'+' history scheduled with commit
Fifth column: Whether the item is switched relative to its parent
' ' normal
'S' switched
Sixth column: Repository lock token
(without -u)
' ' no lock token
'K' lock token present
(with -u)
' ' not locked in repository, no lock token
'K' locked in repository, lock toKen present
'O' locked in repository, lock token in some Other working copy
'T' locked in repository, lock token present but sTolen
'B' not locked in repository, lock token present but Broken
svn --help --- To get Help on svn commands
@kova
Subversion is a centralized system for sharing information. At its core is a repository, which is a central store of data. It is mainly used to maintain source code and files related to a project. It works in a typical client-server model. Any number of clients can connect to server and do read or write operations. But differnce between server and respository is that it remembers every change ever written to it: every change to every file, and even changes to the directory tree itself, such as the addition, deletion, and rearrangement of files and directories. Client can read latest information or information about who did the changes last time, what are the changes he made etc.
Advantage of Subversion system is, if two Users A and B wanst to edit same file F, then they can check out F from repository and get local copies, do edit and commit the changes to repository. Subersion control follows copy-modify-merge model instead of conventional locking model. In this model, if A does changes on F and commits and B also does changes in F and wants to commit, then repository says, F is out of date, just update your file,so that changes done by A are merged. If A and B does changes at same location in F, then repository says F is in conflict state, by showing changes done by A and changes done by B. User has to decide, which changes to keep and which changes to be discard and do necessary changes, should resolve the conflicted state and commit changes.
Few useful commands (for Version Control with Subversion)
svn co --- for check out
svn commit --- for check in
svn up/svn update ---- To update local copy
svn add --- To add a file or directory to svn
svn remove --- To remove a file or directory from svn
svn cleanup --- Recursively clean up the working copy, removing locks, resuming unfinished operations etc.
svn revert --- Restore working copy. Undone changes, if any.
svn resolved --- Remove 'conflicted' status of working copy files or directories.
svn di/ svn diff --- Display the difference between two paths.
svn st/svn status --- To see status of files in local system wrt files in svn(at the time of check out)
The first six columns in the output are each one character wide:
First column: Says if item was added, deleted, or otherwise changed
' ' no modifications
'A' Added
'C' Conflicted
'D' Deleted
'I' Ignored
'M' Modified
'R' Replaced
'X' item is unversioned, but is used by an externals definition
'?' item is not under version control
'!' item is missing (removed by non-svn command) or incomplete
'~' versioned item obstructed by some item of a different kind
Second column: Modifications of a file's or directory's properties
' ' no modifications
'C' Conflicted
'M' Modified
Third column: Whether the working copy directory is locked
' ' not locked
'L' locked
Fourth column: Scheduled commit will contain addition-with-history
' ' no history scheduled with commit
'+' history scheduled with commit
Fifth column: Whether the item is switched relative to its parent
' ' normal
'S' switched
Sixth column: Repository lock token
(without -u)
' ' no lock token
'K' lock token present
(with -u)
' ' not locked in repository, no lock token
'K' locked in repository, lock toKen present
'O' locked in repository, lock token in some Other working copy
'T' locked in repository, lock token present but sTolen
'B' not locked in repository, lock token present but Broken
svn --help --- To get Help on svn commands
@kova
No comments:
Post a Comment