Note: tovid no longer uses subversion as it moved to Github in April 2015
This guide gives a quick introduction and some tips on using Subversion (SVN), the version-control software used by tovid.
If wapcaplet has made you a tovid developer, you'll need to checkout like this:
$ svn checkout https://tovid.googlecode.com/svn/trunk/tovid tovid --username username
where username is your Google username. This does proper, authenticated checkout, so that you can make changes to the repository itself (editing files, adding new ones, etc.)
A few other useful svn commands are:
- svn help
- Display a list of available svn commands; use svn help COMMAND to show usage information for COMMAND.
- svn status -u
- Compare your local (or 'working') copy to the svn repository, and show which files were modified, added, deleted, etc.
- svn update
- Get and merge updates from the repository (as other developers make them). Watch out for merging conflicts (a C in the file's status column)!
- svn commit -m "Fixed bugs"
- Upload/merge your changes into the repository, with a brief summary.
- svn add FILE
- Add FILE to the repository--the file will actually be added on your next svn commit.
- svn move FILE_A FILE_B
- Move/rename FILE_A to FILE_B. Use this for all renaming or moving of files you've checked out.
Automated secure login
Normally, when you do anything with svn, you'll be prompted for your SourceForge.net password. If you're sick of typing it repeatedly, you can do secure, automated login with ssh-agent. Here's how:
First, create authentication keys that will be used to verify your identity (If you have files ~/.ssh/id_rsa and ~/.ssh/id_rsa.pub, you can skip this step):
$ ssh-keygen -t rsa
Next, copy your public key to sourceforge.net, so it can authenticate you on future logins:
$ ssh-copy-id -i ~/.ssh/id_rsa.pub firstname.lastname@example.org
Then, before you startx or after you open a new terminal, start the ssh-agent and add your public keys to the session:
$ ssh-agent bash $ ssh-add
No more passwords--and you're still getting logged in securely!
Need to update
$ svn commit -m "Various updates" Sending tovid/docs/man/idvid.1 Sending tovid/docs/man/makedvd.1 Sending tovid/docs/man/makemenu.1 Transmitting file data ................. svn: Commit failed (details follow): svn: Out of date: '/trunk/tovid/docs/man/idvid.1' in transaction '190-1'
This usually means you need to run svn update.
Failed to add
$ svn update svn: Failed to add file 'setuplib': object of the same name already exists
Quick solution: rename or remove the offending file (rm setuplib) and re-run svn update (Explanation).
Say you're running a routine update, and you get this error (yes, it really is an error!):
$ svn update C install.t2t U dvrequant.t2t U makemenu.t2t Updated to revision 189.
See the C next to install.t2t? That means there was an edit conflict; someone else has committed changes to that file since your last checkout/update.
You'll also notice some temporary files that appear, with names like install.t2t.r189 and install.t2t.mine. You can manually shuffle these files around to resolve the conflict if you really know what you're doing, but the easiest fix is to edit the original install.t2t file, and look for lines with markers like this:
<<<<<<< .mine Foo ======= Bar >>>>>>> .r189
Delete lines such that only Foo or Bar remains; the angle-brackets and equals-signs lines should be deleted. Save the file, then run:
$ svn resolved install.t2t Resolved conflicted state of 'install.t2t'