View RSS Feed

My Java Tips

Committing code in Subversion

Rate this Entry
by , 05-25-2011 at 11:00 AM (2967 Views)
Committing means persisting your changes. You may commit one file or multiple files at once.

Subclipse makes committing easy and simple. When a file is modified, Subclipse displays an icon next to the file name (asterisk) which indicates that your local copy is different from what was in the repository
when the file was checked out. This helps you know what to commit. Remember, if you create a new file, it will have a different icon(a small question-mark). The "changed" state is marked all the way up the directory tree in which a changed file exists.

Let me brief you about committing now. To commit a file to the repository, right-click it, and choose Team : Commit from the context-menu. A dialog will popup. If this is the first time the file is being committed to the repository, its corresponding checkbox will be blank, and you must specify by checking it that you want to commit the file.

You must provide a comment to commit.

Always provide a brief but informative comment when you commit. Don't provide too much details since its difficult to read the logs when viewing the file's history. Remember that the repository provides tools that allow you to graphically view all the details of changes made to text files (not true for binaries), so there is no need to record the exact changes themselves -
only a hint as to the type of changes made.

After committing, Subclipse shows it as one whose state is unchanged since the most recent synchronization with the repository.

Hope this helps!

Submit "Committing code in Subversion" to Facebook Submit "Committing code in Subversion" to Digg Submit "Committing code in Subversion" to Submit "Committing code in Subversion" to StumbleUpon Submit "Committing code in Subversion" to Google

Tags: subclipse Add / Edit Tags