Programming Howto:Using TortoiseSVN: Difference between revisions
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
= Using TortoiseSVN for | == Using TortoiseSVN for Day-to-Day Tasks == | ||
== Updating to the latest version of the BCI2000 project == | === Updating to the latest version of the BCI2000 project === | ||
Once you set up client access as described on the [ | Once you set up client access as described on the [[SVN Client Setup]] page, | ||
there will be | there will be | ||
a folder on your harddisk, probably named "BCI2000", and initially displayed with a | a folder on your harddisk, probably named "BCI2000", and initially displayed with a | ||
| Line 14: | Line 14: | ||
you might consider doing a "commit" prior to an "update". | you might consider doing a "commit" prior to an "update". | ||
Note: | Note: '''There is no indication''' if someone changed a file on the | ||
server since you downloaded it! | server since you downloaded it! | ||
Changes on the server will be unknown to | Changes on the server will be unknown to | ||
your local SVN files unless you perform | your local SVN files unless you perform an "SVN update". | ||
== Committing (i.e. writing back) changes you made == | === Committing (i.e. writing back) changes you made === | ||
If you edit a file on your local hard disk which is under SVN, TortoiseSVN | 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 | will display it with a red overlay icon. This indicates that the file's content | ||
| Line 33: | Line 33: | ||
to the version on the SVN server. | 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. | 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 | Please contact [[Gerwin Schalk]] or [[Jürgen Mellinger]] if you think there is a problem with user rights. | ||
== Adding new files == | === Adding new files === | ||
If there are new files inside your BCI2000 folder which TortoiseCVS does not | If there are new files inside your BCI2000 folder which TortoiseCVS does not | ||
know about, they will be displayed without an overlay icon. Those | know about, they will be displayed without an overlay icon. Those | ||
| Line 44: | Line 44: | ||
need write access to the respective area of the source tree in order to add | need write access to the respective area of the source tree in order to add | ||
files and folders. | files and folders. | ||
== TortoiseSVN vs. MS | == Comparison with other Versioning Software == | ||
=== TortoiseSVN vs. MS VisualSourceSafe === | |||
Although the SVN Server/TortoiseSVN combination serves the same purpose as MS | 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 this is trivially possible – otherwise, contradicting changes must be resolved manually (which is a quite rare condition in practice). | |||
== SVN vs. CVS == | === 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). | 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. | Especially when switching from TortoiseCVS to TortoiseSVN, you will hardly notice any difference when it comes to everyday tasks. | ||
[[Category:Howto]] [[Category:Development]] [[Category:Preliminaries]] | |||
Revision as of 20:13, 6 December 2006
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 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 this irritates you, you might consider doing a "commit" prior to an "update".
Note: There is no indication if someone changed a file on the server since you downloaded it! Changes on the server will be unknown to your local SVN files unless you perform an "SVN update".
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 Gerwin Schalk or Jürgen Mellinger if you think there is a problem with user rights.
Adding new files
If there are new files inside your BCI2000 folder which TortoiseCVS 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" onto 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 this is trivially possible – otherwise, 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.