Basic Work Flow of SVN
In the following, I will illustrate a sample usage of the LCGT SVN assuming you want to work on trunk/mif/IFOmodel/ directory.
Check out
The first thing you have to do is to check out files from the repository. This means copying files (usually the latest revision) in the server to your local computer.
To do so, change directory to any directory you want to create a local copy. Then run the following command,
svn co --username hogehoge https://dacgit.icrr.u-tokyo.ac.jp/svn/lcgt/trunk/mif/IFOmodel
"hogehoge" is your user name for the LCGT svn. You will be asked to type in your password. Then many files will be copied over from the server to your computer.
You will find a directory named "IFOmodel" is created in the current directory. Go into the directory and look around.
Edit files and commit
You can edit files in the checked-out directory as usual, like using a text editor. Once you finish editing files, you have to commit the changes to the server so that the changes are reflected to the repository. To do so, run the following command in the IFOmodel directory.
svn co -m "Your comment"
"Your comment" is the comment for the commit. You have to explain the changes you made in the comment. If you omit -m option, a text editor will open and you are required to write comments. Never commit changes with a blank comment.
Adding, moving and removing files
It is very important to understand that any file operations, such as renaming/moving and deletion, in the local copy directory has to be done through the svn command. Otherwise, those operations will be ignored by the svn when you commit the changes.
To add a new file to the local copy, first create a file in the local copy directory. At this moment, this file is not managed by the svn. You have to run the following command to make svn recognize it.
svn add your_new_file_name
Don't forget to run the commit command to propagate the new file to the svn server.
To rename/move files, use svn mv. For example, to rename file A to B, do the following.
svn mv A B
To delete a file managed by svn, don't just delete it as you do usually. Make sure to use svn rm command like,
svn rm A