• Embed Doc
  • Readcast
  • Collections
  • CommentGo Back
Download
 
Subversion – An Overview
Subversion is an open source version control system. It is a centralizedsystem for sharing information. At its core is a
repository 
, which is acentral store of data. The repository stores information in the form of afilesystem tree—a typical hierarchy of files and directories. Any numberof clients may connect to the repository, and then read or write tothese files.What makes the Subversion repository special is that
it remembersevery change ever written to it 
. This allows you to recover olderversions of your files and examine the history of how and when yourdata changed, and who changed it. To manage the multiple file versions, Subversion uses a
Copy-Modify-Merge
model as an alternative to locking. In this model, each user'sclient reads the repository and creates a personal
working copy 
of the file or project. Users then work in parallel, modifying their privatecopies. Finally, the private copies are
merged 
together into a new,final version. The version control system often assists with themerging, but ultimately a human being is responsible for making ithappen correctly. This is much more efficient than the
Lock-Modify-Unlock 
methodwhich means only one person can be editing a file at a time.
Advantages of Subversion
:
Every change will be recorded and monitored.
Every change can be undone easily.
It preserves a historic record.
Commits are atomic
 
Subversion Basic Work Cycle
 The typical work cycle looks like this:
Update your working copy
o
Update
Make changes
Examine your changes
o
Show Changes
o
Compare revisions
Possibly undo some changes
o
Revert Changes
Resolve Conflicts (Merge Others' Changes)
o
Update
 
o
Resolve Conflict, if any
o
Merge
Commit your changes
o
Commit
A few definitions and commands
Check out
:Check out is the process of making a copy of a project from arepository into your local filesystem. This checked out copy is called aworking copy.
Working Copy
:A Subversion working copy is your own private working area.It contains a COPY of those files which you will have been editing onthe website. You can edit these files however you wish, in the usualway.
Branch
:Branches are separate lines of development isolated from the mainline, to avoid making unstable changes to the main line. Once thechanges are stable enough the branch can be merged back into themain project (the trunk).
 
Tag
:A tag is just a “snapshot” of a project in time. Tags are used to markmilestones or release-quality projects, so used to keep your workisolated from any changes. Tags are really useful for keeping track of important events in the life cycle of your project.Both branch and tag are ordinary directories created by copying. A tagremains a tag as long as no one commits to that directory. If peoplestart committing to it, it becomes a branch.
Revision
:Each time the repository accepts a commit, this creates a new state of the filesystem tree, called a revision. Each revision number is asnapshot of the way the repository looked after each commit.
Commit
:An svn commit operation can publish changes to any number of filesand directories as one single transaction. Each commit is treated as an
atomic
transaction: either all the commit's changes take place, ornone of them take place.
Svn diff 
:It displays the differences between two revisions or paths. It is usuallyused to compare BASE and the working copy.
Merge
:It is used to apply differences between two sources to a working copy.It is similar to diff except that instead of displaying the differences onthe terminal, it applies them directly to the working copy as localmodifications.A better name for this command would be
diff-and-apply 
, since thatis what happens. Two repository trees are compared, and thedifferences are applied to a local working copy.
Show Changes
: This displays the changes in the file since the last commit. Equivalentsubversion command is svn status.
Update
:
of 00

Leave a Comment

You must be to leave a comment.
Submit
Characters: ...
You must be to leave a comment.
Submit
Characters: ...