Subversion

40 %
60 %
Information about Subversion

Published on January 24, 2008

Author: wiradikusuma

Source: slideshare.net

Subversion Thomas Wiradikusuma

Why Version Control? Gives a project-wide undo button; nothing is final, mistakes are easily rolled back. Allows multiple developers to work on the same code base in a controlled manner. Keeps a record of the changes made over time. Supports multiple releases at the same time as you continue with the main line of development. No more code breeze just before release. A project-wide time machine. Essential for regenerating prior releases for customer with problems.

Gives a project-wide undo button; nothing is final, mistakes are easily rolled back.

Allows multiple developers to work on the same code base in a controlled manner.

Keeps a record of the changes made over time.

Supports multiple releases at the same time as you continue with the main line of development. No more code breeze just before release.

A project-wide time machine. Essential for regenerating prior releases for customer with problems.

Why Subversion? The developers are hard code CVS users, and are aware of its shortcomings Versioning for files, directories and metadata (properties) Atomic commits Excellent networking support (svn, ssh, web) Cheap branching, tagging and merging True cross-platform support Open source and free :-)

The developers are hard code CVS users, and are aware of its shortcomings

Versioning for files, directories and metadata (properties)

Atomic commits

Excellent networking support (svn, ssh, web)

Cheap branching, tagging and merging

True cross-platform support

Open source and free :-)

What is Version Control? A place to store all of the various revisions of the stuff you write while developing an application. It all goes to the repository, a central place that holds the master copy of all versions of your project’s files. Should be safe, secure, reliable, gets backed up regularly. Now they are networked, but you can do online/offline operations. Some are decentralized (BitKeeper, SVK, etc).

A place to store all of the various revisions of the stuff you write while developing an application.

It all goes to the repository, a central place that holds the master copy of all versions of your project’s files.

Should be safe, secure, reliable, gets backed up regularly.

Now they are networked, but you can do online/offline operations.

Some are decentralized (BitKeeper, SVK, etc).

What Should We Store? Source code Build scripts, scripts to create a release Test data used by QA DB schema Project settings (when everybody’s using the same IDE) Project documentation (internal and external) Significant e-mails, minutes of meetings, info from the Web Expensively-generated artifacts Basically anything that contributes to the project

Source code

Build scripts, scripts to create a release

Test data used by QA

DB schema

Project settings (when everybody’s using the same IDE)

Project documentation (internal and external)

Significant e-mails, minutes of meetings, info from the Web

Expensively-generated artifacts

Basically anything that contributes to the project

Basic Terminologies Working copy: local copy of all the things that we need from the repo to work on our part of the project. Check out: extract to working copy. Ensures that you get up-to-date copies of the files you request and that these files are copied into a directory structure that mirrors that of the repository. Commit: save changes back to repo. Update: receive the latest set of file from the repo.

Working copy: local copy of all the things that we need from the repo to work on our part of the project.

Check out: extract to working copy. Ensures that you get up-to-date copies of the files you request and that these files are copied into a directory structure that mirrors that of the repository.

Commit: save changes back to repo.

Update: receive the latest set of file from the repo.

How Things are Organized At the lowest level, Subversion deals with individual files Projects > Modules > Files Organized into directories Complex code sharing: externals (include another Subversion repo location in any directory in your project).

At the lowest level, Subversion deals with individual files

Projects > Modules > Files

Organized into directories

Complex code sharing: externals (include another Subversion repo location in any directory in your project).

Where Do Versions Come In? Subversion stores every version of each of the files in its care Subversion uses repo-wide numbering scheme (as opposed to file-specific numbering), starting from 0. Usable to: Retrieve a specific revision of a file Check out everything exactly as it appeared n months ago Tell you what changed in a particular file between revisions Undo mistakes

Subversion stores every version of each of the files in its care

Subversion uses repo-wide numbering scheme (as opposed to file-specific numbering), starting from 0.

Usable to:

Retrieve a specific revision of a file

Check out everything exactly as it appeared n months ago

Tell you what changed in a particular file between revisions

Undo mistakes

Tags People are not good at numbers. Assign names to a group of files (or directories or an entire project) at a particular point in time. A great way of keeping track of significant events in the life of your project’s code.

People are not good at numbers.

Assign names to a group of files (or directories or an entire project) at a particular point in time.

A great way of keeping track of significant events in the life of your project’s code.

Branches Trunk: main line of development Consider the time when a new release is about to be shipped. One small sub team of developers may be preparing the software for that release, fixing last-minute bugs, working with the release engineers, and helping the SQ team. During this vital period, they need stability; it would set back their efforts if other developers were also editing the code, adding features intended for the next release.

Trunk: main line of development

Consider the time when a new release is about to be shipped. One small sub team of developers may be preparing the software for that release, fixing last-minute bugs, working with the release engineers, and helping the SQ team. During this vital period, they need stability; it would set back their efforts if other developers were also editing the code, adding features intended for the next release.

Branches, cont’d Freeze new development? The rest of the team is effectively sitting idle. Copy the source software out onto a spare machine and then have the release team just use this machine? What happens to the changes they make after the copy? How do we keep track of them? If they find and fix bugs that are also in the trunk, how to efficiently and reliably merge these fixes back in? And once they release the software, how do we fix bugs that customers report; how can we guarantee to find the source code in the same state as when we shipped the release?

Freeze new development? The rest of the team is effectively sitting idle.

Copy the source software out onto a spare machine and then have the release team just use this machine? What happens to the changes they make after the copy? How do we keep track of them? If they find and fix bugs that are also in the trunk, how to efficiently and reliably merge these fixes back in? And once they release the software, how do we fix bugs that customers report; how can we guarantee to find the source code in the same state as when we shipped the release?

Branches, cont’d Multiple parallel futures The release team check in/out from the branch Like having a totally separate repository Each branch has its own history and track changes Branches are stores as named directories, created simply by copying the trunk to a new location, using lazy copy Avoid excessive branching!

Multiple parallel futures

The release team check in/out from the branch

Like having a totally separate repository

Each branch has its own history and track changes

Branches are stores as named directories, created simply by copying the trunk to a new location, using lazy copy

Avoid excessive branching!

Merging When you fix a bug in the release branch and realize that the same bug will be present in the trunk code, you can tell Subversion to work out the changes you made on the release branch to fix the bug and then apply those changes to the code in the trunk. You can even merge them into different release branches.

When you fix a bug in the release branch and realize that the same bug will be present in the trunk code, you can tell Subversion to work out the changes you made on the release branch to fix the bug and then apply those changes to the code in the trunk. You can even merge them into different release branches.

Locking Options Subversion uses optimistic locking (as opposed to strict locking). Repo will not allow you to check in a file that has been updated in the repository since you last checked it out. Instead, it asks you to update your local copy of the file to include the latest repository changes before checking in. VCS will attempt to merge the repo changes with your changes. Using a simple file property you can ask Subversion to enforce strict locking on individual files, such as sound, graphics, or other unmergeable files.

Subversion uses optimistic locking (as opposed to strict locking).

Repo will not allow you to check in a file that has been updated in the repository since you last checked it out. Instead, it asks you to update your local copy of the file to include the latest repository changes before checking in. VCS will attempt to merge the repo changes with your changes.

Using a simple file property you can ask Subversion to enforce strict locking on individual files, such as sound, graphics, or other unmergeable files.

Add a comment

Related pages

Subversion – Wikipedia

Politische Subversion. Als politische Subversion bezeichnet man eine Tätigkeit im Verborgenen, deren Ziel der Umsturz einer bestehenden Ordnung durch ...
Read more

Apache ™ Subversion ®

Apache ™ Subversion ® "Enterprise-class centralized version control for the masses" Welcome to subversion.apache.org, the online home of the Apache ...
Read more

Home · TortoiseSVN

TortoiseSVN is an Apache ™ Subversion (SVN) ® client, implemented as a Windows shell extension. It's intuitive and easy to use, since it doesn't require ...
Read more

Apache Subversion – Wikipedia

Apache Subversion (SVN) ist eine freie Software zur zentralen Versionsverwaltung von Dateien und Verzeichnissen. Die Versionierung erfolgt in einem ...
Read more

Subversion 1.9.4 - Subversion - Download - heise online

Download: Subversion 1.9.4, kostenlos. Über Subversion: Revisionsverwaltungssystem als Ersatz für CVS; nutzt die Apache Portable Runtime Bibliothek
Read more

Duden | Sub­ver­si­on | Rechtschreibung, Bedeutung ...

Definition, Rechtschreibung, Synonyme und Grammatik von 'Subversion' auf Duden online nachschlagen. Wörterbuch der deutschen Sprache.
Read more

Version Control with Subversion

Web version of a book about Subversion. Work in progress, however already very complete. The book should be published by O'Reilly and Associates later in 2004.
Read more

Apache Subversion - Wikipedia, the free encyclopedia

Apache Subversion (often abbreviated SVN, after the command name svn) is a software versioning and revision control system distributed as free software ...
Read more

Apache Subversion Binary Packages

The Apache Subversion project does not officially endorse or maintain any binary packages of the Subversion software. However, volunteers have created ...
Read more

Subversion - Wikipedia, the free encyclopedia

Subversion refers to an attempt to transform the established social order and its structures of power, authority, and hierarchy. Subversion (Latin ...
Read more