Subversion: A Getting Started presentation by: Nap Ramirez email: firstname.lastname@example.org
INTRODUCTION What is Subversion? Subversion is a source control management (SCM) system. Source control management systems keeps track of the changes in files and directories over time. ● records the history of data ● acts like a time machine of data
INTRODUCTION Architecture Subversion is a centralized system, following a client-server model.
GETTING USED TO... Terminology Repository ● a remote server that hosts all the data and meta-data ● where the authoritative version of the data exist Working Copy ● a copy of the data downloaded from the repository Revision ● a specific state of data recorded in the repository
GETTING USED TO... Terminology (continued) Branch ● a sub-directory in the source tree, each branch usually hosts its own version Trunk ● a branch designated to maintain the most latest version Tag ● a branch locked to a specific version
GETTING USED TO... Common Directory Layout project-root/ trunk/ branches/ tags/ branch-2.1.x branch-2.2.x project-1.0 project-2.0
LEARNING... Operations checkout (co) ● initially pull out a copy from the repository ● `$ svn co <url-to-svn-repo> [working-copy-path]` update (up) ● pull out the latest revision of the working copy from the repository ● `$ svn up [working-copy-path]` commit (ci) ● make changes permanent by recording it in the repository ● `$ svn ci [working-copy-path] -m <message>`
LEARNING... Operations (continued) diff (di) ● displays the local changes or differences between revisions ● `$ svn di [-r 3746:3747] [working-copy-path]` revert ● undoes the local changes and restores the working copy ● `$ svn revert [working-copy-path] [-R]` add ● mark data under version control ● `$ svn add <unversioned-data>` mkdir, copy, move, list, delete ● svn operations similar to filesystem operations
LEARNING... Operations (continued) ● status (st) ● displays the status of the working copy ● `$ svn st [working-copy-path]` ● A Added ● C Conflicted ● D Deleted ● L locked ● M Modified ● ? item is not under version control ● patch (external command) ● apply changes described in the patch/diff ● `$ patch -p0 < <patch-file>`
Lets put it to the test! Exercise Create your own subversion workspace, following the specified directory layout: <root>/<name>/[project-0..n]/<trunk,branches,tags>
THE END... Thanks! Please mail me your feedback! ---------------------------- Nap Ramirez email@example.com
This work is licensed under the Creative Commons Attribution 3.0 License. To view a copy of this license, visit http://creativecommons.org/licenses/by/3.0/ or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.