50 %
50 %
Information about svn

Published on November 29, 2007

Author: Goldye


Electronic Submission of Student Assignments Via Subversion:  Electronic Submission of Student Assignments Via Subversion Subversion—a Version Control System widely used source code control system. usually for large software projects programmers "check out" and "check in." all changes recorded Software developers generally submit their work to a source code control system—why not CS students? Convincing you …:  Convincing you … Students should be familiar with source code control. It’s awkward enough that students should use it more than once. Useful in group projects. Positions students to work on open source software. Slide3:  Alternatives: BlackBoard Catalyst Easier, but still some effort to learn. Why not learn something you’re likely to see again. Problems: Server setup – Student setup – Teacher setup – To submit assignment::  To submit assignment: check in to your SVN repository, located in your account on cssgate. Name the repository after the course number. So if this is TCSS430, name the repository "svn430". I'll collect assignments by checking them out of your repository. I can't access any of your other files name "directories" as specified in lab directions. For instance the first lab should go in "svnlab" only submit what you need to! (no .class files, etc.) Use any Subversion client you like:  Use any Subversion client you like Command line. TortoiseSVN Eclipse (Subclipse plugin) many more on Subversion website. Repositories and Sandboxes:  Repositories and Sandboxes From “Essential CVS” by Jennifer Vesperman, O’Reilly Press could be on same machine The command line is your friend:  The command line is your friend It never changes (well almost never). 10 years from now the commands will still work (20 years from now? … get real). GUI clients are just wrappers around the command line programs. Typical Usage Scenario:  Typical Usage Scenario svn checkout … svn update svn update svn commit Logging on to cssgate:  Logging on to cssgate With SSH Secure Shell At home, get from: Creating a repository:  Creating a repository Must be on the repository machine svnadmin create svn430 Now you can be anywhere, but this example is still on the local machine svn mkdir file:///home/INSTTECH/dmclane/svn430/svnlab\ -m "a comment" svn checkout file:///.../svnlab svnlabsandbox cd svnlabsandbox textpad hello.cpp svn add hello.cpp svn commit –m "…" cssgate should look like this:  cssgate should look like this myname |--win |--svn430 | |… maybe other stuff Initially Overview is over, now the details. initialize the repository:  initialize the repository myname |--win |--svn430 |--conf/ |--dav/ |--db/ |--format |--hooks/ |--locks/ |--README.txt svnadmin create svn430 why? initialize once don't touch anything in this directory don't put anything in this directory Yes this part is way different from CVS You are in this directory Did it work?:  Did it work? To look at everything in your repository, from command line on the repository machine (cssgate). svnlook tree svn430 [dmclane@gate1 ~]$ ls 372 plan9port.tgz svn430 431 mail TCPServer.class … [dmclane@gate1~]$ls svn tcss430 [dmclane@gate1 ~]$ svnlook tree svn/tcss430 / test2/ zzz.txt svnlab/ test.txt [dmclane@gate1 ~]$ Checking out, still on local machine:  Checking out, still on local machine svn checkout file:///home/INSTTECH/yourname/svn430/svnlab mylab UNIX is case sensitive! note: file:///home/INSTTECH/yourname/svn430/svnlab not a real directory Remotely:  Remotely The same, except change file:///home/INSTTECH/yourname/svn430/svnlab to svn+ssh:// INSTTECH/yourname/svn430/svnlab All one thing. You need svn software, probably from cygwin. Slide17:  Subversion organizes files by URL not project, although it's sometimes useful to think of it that way not directory, although it's sometimes useful to think of it that way How do I start all over again?:  How do I start all over again?     * Log onto cssgate.     * go into your svn directory cd svn430     * delete everything in there. rm -rf * * you need to "svnadmin create" again. add, delete:  add, delete import is for initially making the project, after that use add you are in a sandbox svn add newfile.txt svn commit –m "an informative comment" Opps, I checked in a .class file. How do I get rid of it? svn delete … svn commit … Another to look at your repository:  Another to look at your repository svn -R URL locally: svn -R list file:///home/INSTTECH/dmclane/svn430 remotely: svn -R list svn+ssh:// How do I delete the whole assignment/URL/project/directory?:  How do I delete the whole assignment/URL/project/directory? [dmclane@gate2 testdir]$ svn checkout file:///home/INSTTECH/dmclane/svn430 sandbox A sandbox/svnlab A sandbox/svnlab/ Checked out revision 1. [dmclane@gate2 testdir]$ cd sandbox [dmclane@gate2 sandbox]$ ls svnlab [dmclane@gate2 sandbox]$ ls -a . .. .svn svnlab [dmclane@gate2 sandbox]$ svn delete svnlab D svnlab/ D svnlab [dmclane@gate2 sandbox]$ svn commit -m "deleting svnlab" Deleting svnlab Committed revision 2. checkout the whole repository Bibliography:  Bibliography Home page: Has links to documentation, clients, … Motivation: TortoiseSVN:  TortoiseSVN Integrates with Windows. Some claim this is the easiest client. new stuff when you right click Subclipse:  Subclipse An Eclipse plugin. Installation instructions are pretty good. Consensus is: this is hard to get working. Repository Exploration:  Repository Exploration Window Open Perspective Other SVN Repository Exploring Right click Adding Repository:  Adding Repository You'll put your account name, not "dmclane" It finds everything!:  It finds everything! Now, to checkout:  Now, to checkout Right click on svnlab. From the Subversion FAQ:  From the Subversion FAQ How can I do an in-place 'import' (i.e. add a tree to subversion such that the original data becomes a working copy directly)? Suppose, for example, that you wanted to put some of /etc under version control inside your repository: # svn mkdir file:///root/svn-repository/etc \ -m "Make a directory in the repository to correspond to /etc" # cd /etc # svn checkout file:///root/svn-repository/etc . # svn add apache samba alsa X11 # svn commit -m "Initial version of my config files" This takes advantage of a not-immediately-obvious feature of svn checkout: you can check out a directory from the repository directly into an existing directory. Here, we first make a new empty directory in the repository, and then check it out into /etc, transforming /etc into a working copy. Once that is done, you can use normal svn add commands to select files and subtrees to add to the repository. There is an issue filed for enhancing svn import to be able to convert the imported tree to a working copy automatically; see issue 1328. SVN & Eclipse Links:  SVN & Eclipse Links Import method:  Import method Create a repository with svnadmin Start your project in some totally unrelated directory (not a subdirectory of svn). import it! This is the import method of starting a project. I think there's a mkdir method too. Since we have to create the repository and then the initial project Starting a Project by Importing, all on the local machine (cssgate).:  Starting a Project by Importing, all on the local machine (cssgate). We'll demonstrate doing it remotely later. mkdir lab1 cd lab1 nano something.txt svn import . file:///home/INSTTECH/yourname/svn430/svnlab –m "initial comment" "." means stuff in this directory This is the "project" (not the right term) It will demand a comment (message). create a file in a text editor. Overview of Process:  cssgate ~ svn430 lab1 main.cpp xyz.doc svn import Your home directory repository which you created with svnadmin First version of files in project, could be empty files a temporary directory Overview of Process

Add a comment

Related presentations

Related pages

Apache Subversion – Wikipedia

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

TortoiseSVN downloads | TortoiseSVN

Context menu in file-open/save dialogs on x64 OS. On x64 versions of Windows, the TortoiseSVN context menu and overlays won't show for 32-bit applications ...
Read more

SVN – Wikipedia

SVN steht als Abkürzung für: Apache Subversion, ein Programm zur Versionsverwaltung von Dateien und Verzeichnissen; Sächsisches Verwaltungsnetz
Read more Homepage

Der Sparkassenverband Niedersachsen (SVN) ist der Dachverband der niedersächsischen Sparkassen. Er setzt sich aus den 46 kommunalen Sparkassen, der ...
Read more

Apache ™ Subversion

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

Home · TortoiseSVN

SVNProtocolHandler Ein plugin für IE um svn:// Repositories anzuzeigen; Verschiedenes Artikel welche nicht in eine Kategorie passen. Open Source. Über ...
Read more


SVN München e.V. Sport - Spiel - Spaß Gesundheit - Freizeit. Ich heiße Sie auf unserer Homepage sehr herzlich willkommen. Hier können Sie sich über ...
Read more

Finanzgruppe -

Möchten Sie unsere Newsletter erhalten, dann registrieren Sie sich einfach und bleiben Sie up to date. Sie haben natürlich jederzeit die Möglichkeit ...
Read more

Apache Subversion - Wikipedia

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

Subversion › Archiv › Wiki ›

Subversion (SVN) ist ein Versionsverwaltungsystem. Diese Anleitung beschreibt, wie man Subversion zusammen mit der Apache-Schnittstelle WebDAV aufsetzt.
Read more