Using the Command Line to Interact with Google SVN During an Edit

Submitted by Ed_B on Mon, 06/14/2010 - 20:41

Printer-friendly versionPrinter-friendly version

Now that the timer-scheduler code is safely stored in Google's SVN system, it's time to try a first edit. I'm using the Kate editor for my project. Kate is very minimal, but has most of the features I  want for simple projects like these. The Kate tools menu has a terminal window available. As you click around the files in your project, Kate will cd to the directory containing the file in the editor window. I'm issuing SVN commands from the terminal window. In the screenshots below, I'll check the project to see what's there, edit the TimerScheduler.cpp file by adding a "warning" to line 25 and save to my hard disk. Then run update in case I think I might need to merge my changes with someone elses (none required). Running status -v shows the modified file  flagged with "M". Then the change is committed to SVN. The project version increments to 3, even though only the TimerScheduler.cpp file was changed. The full version increment on each commit, no matter how small, is a feature of SVN. A checkout gives you get the "head" version that has all the most current files in it. I'll learn more about that soonly.

See what's there:
svn status -v

make changes, then save to hard  disk

READ MORE =====>

NOTE WELL --  This is a good place to mention the standard reference on SVN and SVN commands: http://svnbook.red-bean.com/en/1.1/ch03s05.html

Moving on,

See what's there:
svn status -v

TimerScheduler.cpp was modified

 

Commit the changes
svn commit -m 'test commit'

For future sanity, add a message with the commit saying this is a test

 

See what's there:
svn status -v

TimerScheduler.cpp is now at revision 3

 

See what's there:
svn status --show-updates

The whole project is now at revision 3