== Some help on Subversion == {{{ #!div style="text-align:justify; width:50%;" * '''Checkout''': a checkout is a local working copy of a repository. This is the set of files that you will be working with when making modifications to your project. * '''Repository''': this is the logical grouping of project-related files on the server. A subversion server may host multiple repositories, but your changes will be constrained to a only single repository with your project's name. * '''Checkin''': transmitting a set of changes from your local checkout to the server. Your changes will then be available to everyone else who has a checkout of that repository when they update their view. * '''Head''': (also called the "main line") the most up-to-date version of the source control tree. Most of your checkins will be to the head of the tree, although in some more complex situations, you may be checking in to a branch. * '''Branch''': a clone of the source control repository from some point in time which contains a set of changes which are not shared with the head (or "main line"). Branches are one way for a developer to work on a particular feature (usually a large feature) and have intermediate changes versioned without having to worry about whether or not his or her changes will break someone else's code. Changes can then be "merged" back back to the main line when the developer thinks they are stable. * '''Merge''': merging is the process of taking several versions of a single file and turning them into one authoritative version. Merging in is often an automated process with Subversion, but you may at times be called upon to merge a set of files manually if the server encounters a conflict (when the server cannot automatically take care of it). }}} '' this short docu is taken from [http://dojo.jot.com/Getting%20Started%20With%20Subversion] '' {{{ #!div style="text-align:justify; width:50%;" === Checkout your new project === Before you type this command, create a new directory for your checkout. }}} {{{ #!div style="text-align:justify; width:65%;" {{{ svn checkout --username https://dev.spline.de/svn/ }}} ''short: svn co'' }}} {{{ #!div style="text-align:justify; width:50%;" Checking out the code creates a local copy for you to edit. Go ahead and make some minor edits now and in the next step we'll let Subversion show you the changes. === Adding a new file === After you've imported your project, you might want to add a new file. One word of caution though. Unlike CVS, Subversion adds are recursive! If you add a directory with Subversion, it will add everything in the directory as well. {{{ svn add svn add }}} === See your changes === Once you've made changes to your local files, you can see those changes very easily. It's also a good idea to review your changes before you push them back up to the server, just to be sure you remember everything you changed! {{{ svn diff svn diff svn diff }}} === Put your changes back in the server === Once you've made some improvements to the local code that you checked out, you'll want to put that code back on the server. The server will keep a complete record of your changes, including the date and time of the change, who made the change and the changed code itself. After issuing this command, an editor (the one you specified in your environment variable $EDITOR) will be opened and you will be asked to write a commit message. '''It is very important to always write a commit message'''! Also, you will be shown a list of all files that will be committed. {{{ svn commit svn commit svn commit }}} ''short: svn ci'' if you want to skip the editor, your can also type {{{ svn commit -m '' }}} === Get everyone else's changes === When someone uses the commit command to push their changes up to the server, you'll want to pull those changes down to your local machine. You do with the update command. As you're probably noticing by now, the commands are pretty similar. Once you get the hang of one or two of them, the rest start to make sense. {{{ svn update svn update svn update }}} ''short: svn up'' === See a file's history === If you want to see who has edited a certain file, or a directory tree, the log command is what you need. {{{ svn log svn log svn log }}} }}} ''this short docu has been taken from http://www.jaredrichardson.net/articles/svn-cheat-sheet.html'' {{{ #!div style="text-align:justify; width:50%;" === See the current status of your working copy === If you want to see possible conflicts, added files, deleted files, modified files, etc, you can use the following command. {{{ svn status svn status svn status }}} === Read the manual page === {{{ man svn }}} }}}