Difference between revisions of "Svn"
From MohidWiki
(→The Mohid subversion repositories) |
|||
Line 7: | Line 7: | ||
: Mohid_net project https://davinci.maretec.ist.utl.pt:8443/svn/mohid_net/trunk/ | : Mohid_net project https://davinci.maretec.ist.utl.pt:8443/svn/mohid_net/trunk/ | ||
− | ===Internet read-only repositories addresses=== | + | ===Internet (read-only) repositories addresses=== |
'''Coming soon''' | '''Coming soon''' | ||
Revision as of 00:13, 13 December 2008
Subversion is the hottest version control system available in the free world.
Contents
The Mohid subversion repositories
Intranet repositories addresses
Central repository: https://davinci.maretec.ist.utl.pt:8443/svn/
- Mohid_v4 project https://davinci.maretec.ist.utl.pt:8443/svn/mohid_v4/trunk/
- Mohid_net project https://davinci.maretec.ist.utl.pt:8443/svn/mohid_net/trunk/
Internet (read-only) repositories addresses
Coming soon
GUI clients
Simply install presto the tortoise svn Tortoise svn.
Creating a new local repo
Here's the quick how-to add a new mohid_net project from our local intranet repository:
- Create a new folder:
- Right click the new folder and select svn checkout...:
- Set the central server repo address as https://davinci.maretec.ist.utl.pt:8443/svn/mohid_net/trunk/, then click ok:
- Insert your subversion user name and password. Then click ok.
- Get the files, and when it's done click ok:
- That's it! You've imported the whole project!
Getting the latest version of the code
- To refresh and get the latest version of the code simply right-click on your local-repository, and then select the SVN update option:
- Once the new files are downloaded, simply hit the ok button.
- That's it!
Commiting changes to the code
- Now whenever you feel like to commit your changes, if any (provided that you are granted the rights to do so - ask the mohid code administrators for a user name and the write permission), simply right click the subversioned folder, and click Svn commit...:
- Make sure you log all your changes, then click ok:
- And... it's done!
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
- Subversion homepage,
- Tortoise svn.
- Google code. Good for hosting svn repos.