Programming Howto:Using TortoiseSVN
Using TortoiseSVN for Day-to-Day Tasks
Updating to the latest version of the BCI2000 project
Once you set up client access as described on the Programming Howto:SVN Client Setup page, there will be a folder on your harddisk, probably named "BCI2000", and initially displayed with a green overlay icon. The green overlay icon indicates that all files below the folder are unchanged since they were checked out. To bring an existing BCI2000 source tree up to date, right-click the folder named "BCI2000", and choose "SVN Update" from the context menu. If you edited a file, and did not commit your changes, a SVN update operation will merge possible changes made to the server version into your file (but keeping your original version as a backup with a different name). If you prefer, you might consider doing a "commit" prior to an "update".
- There is no indication that someone changed a file on the server since the last time you downloaded it! Changes on the server will be unknown to your local SVN files unless you perform an "SVN update".
- An update will not undo your local changes but quietly merge them into the server version. To make sure that your local version is identical to the server version, do an "SVN Update" followed with a "Revert".
- The latest SVN revision of BCI2000 may be broken on some compilers, or may contain untested code. To obtain a stable version of the BCI2000 source code, you should check out the revision listed with the most recent binary distribution on this page.
Committing (i.e., writing back) changes you made
If you edit a file on your local hard disk which is under SVN, TortoiseSVN will display it with a red overlay icon. This indicates that the file's content differs from the file as it was when you downloaded it from the SVN server.
Once you consider your changes permanent, it is time to write the file back to the server. This process is called "committing changes" – to perform it on all files below a certain folder, right-click that folder, and choose "SVN Commit...". You will be presented a list of files below that folder from which you may exclude certain ones, or display a list of differences ("Compare with base") to the version on the SVN server. If you try to commit changes of files for which you don’t have write access, you will be prompted for a different user name and password repeatedly. Please contact an administrator if you think there is a problem with user rights.
Adding new files
If there are new files inside your BCI2000 folder which TortoiseSVN does not know about, they will be displayed without an overlay icon. Those files or folders may be added to the BCI2000 source tree on the server by choosing "TortoiseSVN->Add..." from the context menu that appears after right-clicking the respective file or folder. Added files will be considered as empty on the server, and displayed with a red overlay icon, until you perform a "SVN Commit" on them. You will need write access to the respective area of the source tree in order to add files and folders.
Comparison with other Versioning Software
TortoiseSVN vs. MS VisualSourceSafe
Although the SVN Server/TortoiseSVN combination serves the same purpose as MS VisualSourceSafe, there are two major differences that affect you as a user:
- With TortoiseSVN, you directly operate on files that are located on your own hard disk, and you do so from a true Windows Explorer window, right clicking onto a file or folder and choosing the appropriate SVN operation from the context menu. With MS VisualSourceSafe, you use a Windows Explorer-like program window to operate on files located inside a database on a server.
- With MS VisualSourceSafe, files that were checked-out for editing were blocked for changes as far as other users were concerned. With SVN, there is no exclusive checking out of files. Instead, changes made by different users will be merged into to a combined version if the users' changes are independent of each other. If not, contradicting changes must be resolved manually (which is a quite rare condition in practice).
SVN vs. CVS
SVN and CVS both follow a similar philosophy of non-exclusive editing of files, and a similar terminology. Thus, differences are minor (for a concise discussion, see http://www.pushok.com/soft_svn_vscvs.php). Especially when switching from TortoiseCVS to TortoiseSVN, you will hardly notice any difference when it comes to everyday tasks.