Tips‎ > ‎


Here quick reference how to quickly operate SVN from command line. Usefull for damm IDE's that do not support SVN.

Repository checkout. Used to get local working copy of repository.
C:\Bart>svn checkout svn:// --username MikolajKopernik --password *********
Pobrano wersję 0.

The result is as follow:
 Wolumin w stacji C nie ma etykiety.
 Numer seryjny woluminu: 6C73-008B

 Katalog: C:\Bart

2010-10-07  12:02    <DIR>          .
2010-10-07  12:02    <DIR>          ..
2010-10-07  12:02    <DIR>          AVR1
2010-05-04  09:02    <DIR>          D7
2010-04-06  11:44    <DIR>          Delphi4
2009-11-23  23:44    <DIR>          Insert
2010-07-30  11:45    <DIR>          Java3
2010-08-23  16:06    <DIR>          Transfer

              15 plik(ów)   3 977 092 266 bajtów
              23 katalog(ów)  10 756 657 152 bajtów wolnych

Adding files (or directories to repository). Lets assume, we added a new directory (lib) and want to put it under version control:
C:\Bart\AVR1>svn add lib
A         lib
A         lib\common
A         lib\common\caplcd.html
A         lib\common\caplcd.tbh
A         lib\common\caplcd.tbs
A         lib\common\dhcp.tbs
A         lib\ReadMe.txt

Please note that this will add ALL FILES in all subdirectories in and under lib. Beware that we want to add ONLY SOURCE files to repository. So if you have compiled/temporary files somewhere, we should add files one by one or using wildcards to prevent unnecessary files to be under version control. It is irrelevant for svn add, if it takes file or directory, but if directory is specified, the whole directory is added (of course, I only addressed the default behavior with no additional switches).

Committing files to SVN repository. When changes are done, we should commit our files to SVN repository (m parameter is mendatory):
C:\Bart\AVR1>svn commit -m "Dodawanie bibliotek do obslugi urzadzen Atmel-32"
Dodawanie       lib
Dodawanie       lib\ReadMe.txt
Dodawanie       lib\common
Dodawanie       lib\common\caplcd.html
Dodawanie       lib\common\caplcd.tbh
Dodawanie       lib\common\caplcd.tbs
Dodawanie       lib\common\dhcp.tbs
Przesyłanie treści pliku...............
Zatwierdzona wersja 1.

Updating local working copy against SVN repository - this is most trivial task just type in folder, you want update: svn update. That's all folks.