Size: 4979
Comment:
|
Size: 2619
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
= Version Control System for LCGT = This page contains information for using version control system, subversion, for various LCGT tasks. |
= Version Control System for KAGRA = This page contains information for using version control system, subversion, for various KAGRA tasks. |
Line 12: | Line 12: |
== KAGRA SVN Policies == | |
Line 13: | Line 14: |
== LCGT SVN quick start == | === Basic rules === * Feel free to use SVN. Don't be afraid of commit. You can always rollback your changes. * Always add comments when you commit changes. * Create a ticket when you want to make a major change or find a problem. Make sure to put the email addresses of the people who will should be notified of the change or the problem in the CC field of the ticket properties. * Create branch if you want to make large changes. === Directory Structure === There are three directories in the top directory of the KAGRA SVN. {{{ trunk/ branches/ tags/ }}} {{{trunk}}} is the directory you want to put most files. Please make sub directories under trunk (preferably under each subsystem's directory). {{{branches}}} and {{{tags}}} are the directories for putting branched or tagged trees. When you make a branch or tag, please use these directories. == Quick Links == KAGRA svn root directory<<BR>> `https://granite.phys.s.u-tokyo.ac.jp/svn/LCGT/` <<BR>> (Not intended for accessing with a web browser. To be used with {{{svn}}} command.) [[https://granite.phys.s.u-tokyo.ac.jp/trac/LCGT|LCGT trac]] [[https://granite.phys.s.u-tokyo.ac.jp/trac/LCGT/browser|LCGT svn repository browser]] [[http://subversion.apache.org/|SVN Web Page]] [[http://svnbook.red-bean.com/en/1.5/index.html|SVN Manual]] == KAGRA SVN quick start == |
Line 17: | Line 52: |
In the following, I will illustrate a sample usage of the LCGT SVN assuming you want to work on trunk/isc/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://granite.phys.s.u-tokyo.ac.jp/svn/LCGT/trunk/isc/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}}} |
See [[/WorkFlow|here]]. |
Line 54: | Line 55: |
If you want to make large changes to the source tree, it may take sometime. While you are making changes, other people will not want to work on the same source tree because they may interfere with your changes. This is a waste of other people's time. In order to avoid this problem, you can use branching capability of svn. | See [[/BranchTag|here]]. |
Line 56: | Line 57: |
Branching is a way to make a copy of a source tree in a repository. For example, if you want to make a large modification of trunk/isc/IFOmodel, you can create a copy of trunk/isc/IFOmodel to branches/isc/IFOmodel by the following command. {{{svn copy https://granite.phys.s.u-tokyo.ac.jp/svn/LCGT/trunk/isc/IFOmodel https://granite.phys.s.u-tokyo.ac.jp/svn/LCGT/branches/isc/myIFOmodel}}} Before issuing the above command, you have to make sure that branches/isc/ exist. If not, run the following command first, {{{svn mkdir --parents https://granite.phys.s.u-tokyo.ac.jp/svn/LCGT/branches/isc}}} After making a copy in the branches directory, you can checkout myIFOmodel and start making changes. Since myIFOmodel is a copy of the original, you can experiment with it as much as you want without interfering with other people working on the original IFOmodel. Once you are done with your changes with myIFOmodel, you can merge your changes back to the original IFOmodel using {{{svn merge}}} command. Of course merging may not work right away because your changes to myIFOmodel may be incompatible with the current revision of IFOmodel. Here, manual human intervention is necessary to resolve conflicts. |
== trac and tickets == See [[/Trac|here]]. |
Version Control System for KAGRA
This page contains information for using version control system, subversion, for various KAGRA tasks.
Contents
Introduction, why version control system ?
Version control system (VCS) is a computer tool to manage the history of various files you work on. Usually, files are documents or program codes, but you can use it for managing virtually any type of files. It keeps track of the changes you make to the files and let you roll back to any previous version if you want. The VCS is particularly useful when several people are working on a single set of files, for example, a group of people writing a paper, or several people developing a simulation code together. Subversion (svn) is a popular VCS and used by many projects around the world. There is an svn repository for LCGT. LCGT collaborators are strongly encouraged to use this svn repository for any applicable tasks.
For more detailed reasonings for the use of VCS, see here.
KAGRA SVN Policies
Basic rules
- Feel free to use SVN. Don't be afraid of commit. You can always rollback your changes.
- Always add comments when you commit changes.
- Create a ticket when you want to make a major change or find a problem. Make sure to put the email addresses of the people who will should be notified of the change or the problem in the CC field of the ticket properties.
- Create branch if you want to make large changes.
Directory Structure
There are three directories in the top directory of the KAGRA SVN.
trunk/ branches/ tags/
trunk is the directory you want to put most files. Please make sub directories under trunk (preferably under each subsystem's directory).
branches and tags are the directories for putting branched or tagged trees. When you make a branch or tag, please use these directories.
Quick Links
KAGRA svn root directory
https://granite.phys.s.u-tokyo.ac.jp/svn/LCGT/
(Not intended for accessing with a web browser. To be used with svn command.)
KAGRA SVN quick start
See here.
Basic work flow of SVN
See here.
Branching and Tagging
See here.
trac and tickets
See here.