Personal tools

Svn

From MohidWiki

Revision as of 10:34, 27 September 2007 by 192.168.20.177 (talk) (Get latest version)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Subversion is the hottest version control system available in the free world.

Syntax

Importing new tree

Do this when you want to kick-start a new google code project ...

> svn import https://myproject.googlecode.com/svn/trunk/ --username USER -m "Initial import"

Checkout project

> svn checkout https://myproject.googlecode.com/svn/trunk/ myproject --username USER

Get latest version

First retrieval:

> svn checkout http://someproject.googlecode.com/svn/trunk/ someproject

Routine retrieval:

> svn update someproject

Commiting project

> svn commit -m "Some comment" --force-log someproject

Listing files in project

> svn ls -R http://someproject.googlecode.com/svn/trunk/

Syncing method

Svn can be used in very inventive ways. One of them is to use google code hosting services to keep your favorite tools' configuration files. Here below we give an example of how to keep in-sync your Opera profile.

Pre-requisites:

  • An svn client,
  • A web-based svn repository.

windows

Here's a batch file that allows to sync your opera profile. The same batch file is a little bit more detailed in the Opera article in this wiki.

REM OperaSync2.bat
@echo off

set TARGET=C:\Documents and Settings\Guillaume\Application Data\Opera\Opera\profile
set PROG=Opera
set EXEC=C:\Programas\Opera\%PROG%.exe
set REPO=https://preopmodel.googlecode.com/svn/trunk/%PROG%Sync
set USER=

echo Checking out from %REPO% ...
svn checkout %REPO% "%TARGET%" --username %USER%
echo %PROG% running ...
%EXEC%
echo Commiting to %REPO% ...
svn commit -m --force-log "%TARGET%"
echo Done.

@echo on

NOTE: The first time you run the file, you'll be prompted for a password.

External References