bid:repository
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
bid:repository [2015/03/09 12:07] – created jcsuarez | bid:repository [2015/03/10 12:17] (current) – [Update files] rodon | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== PERSIA repository ====== | ||
+ | |||
+ | |||
+ | ===== Structure of repository ===== | ||
+ | |||
+ | |||
+ | * **Minutes/ | ||
+ | * **Management/ | ||
+ | * **Proposal/ | ||
+ | ===== Install SVN ===== | ||
+ | |||
+ | |||
+ | ===== How download and upload files ===== | ||
+ | |||
+ | |||
+ | ==== Make easy using websvn ==== | ||
+ | |||
+ | |||
+ | [[http:// | ||
+ | |||
+ | ==== Update files ==== | ||
+ | |||
+ | |||
+ | (Only for linux) \\ | ||
+ | Download the scritp: | ||
+ | (Untar: tar xvfz uploadsvn_persia.tar.gz) | ||
+ | |||
+ | |||
+ | usage: ./ | ||
+ | |||
+ | |||
+ | * Username had to already be created to access svn. Otherwise please contact rodon@iaa.es | ||
+ | * file_to_upload with full path. | ||
+ | * svn_directory had to be in the following list: | ||
+ | * Consortium | ||
+ | * Minutes | ||
+ | * Budget | ||
+ | * Bibliography | ||
+ | * H2020 | ||
+ | * H2020/ | ||
+ | * H2020/ | ||
+ | * LoS | ||
+ | * Log_file is a text file (ascii) where the content of the file or modifications are. | ||
+ | |||
+ | |||
+ | === Example === | ||
+ | |||
+ | |||
+ | < | ||
+ | [rodon@ux6 scripts]$ ./ | ||
+ | |||
+ | Welcome to the Automatically files uploader of SVN Persia Project | ||
+ | |||
+ | cpelogos.eps | ||
+ | Download SVN version…. | ||
+ | |||
+ | rodon@dfe.iaa.csic.es' | ||
+ | |||
+ | A tmp/ | ||
+ | A tmp/Minutes | ||
+ | A tmp/ | ||
+ | A tmp/Budget | ||
+ | A tmp/ | ||
+ | A tmp/H2020 | ||
+ | A tmp/ | ||
+ | A tmp/ | ||
+ | A tmp/ | ||
+ | A tmp/ | ||
+ | A tmp/LoS | ||
+ | |||
+ | Revisión obtenida: 4 | ||
+ | |||
+ | tmp/ | ||
+ | |||
+ | Upload file to SVN repository…. | ||
+ | rodon@dfe.iaa.csic.es' | ||
+ | Enviando Minutes/ | ||
+ | Transmitiendo contenido de archivos . Committed revision 5. | ||
+ | </ | ||
+ | |||
+ | ==== Using SVN commands (Advance) ==== | ||
+ | |||
+ | |||
+ | The typical work cycle that you will follow during the development process of your software packages is: | ||
+ | |||
+ | |||
+ | * Retrieve a working copy of your package | ||
+ | * Make the required modifications to your files (do not forget to update the documentation). | ||
+ | * Examine your changes | ||
+ | * Commit your modifications | ||
+ | * Tag the new version | ||
+ | |||
+ | |||
+ | We will give now the basic details of this process. At this point one recommendation should be done: if you foresee that your package can be modified by several developers at the same time you should read the documentation about'' | ||
+ | |||
+ | ==== Retrieve a working copy (after having defined SVN_SSH variable) ==== | ||
+ | |||
+ | |||
+ | < | ||
+ | fred@inst1 ~> svn checkout svn+ssh: | ||
+ | |||
+ | A persia/ | ||
+ | A persia/ | ||
+ | A persia/ | ||
+ | A persia/ | ||
+ | A persia/ | ||
+ | A persia/ | ||
+ | A persia/ | ||
+ | Checked out revision | ||
+ | |||
+ | fred@inst1~> | ||
+ | |||
+ | persia/ | ||
+ | persia/ | ||
+ | persia/ | ||
+ | persia/ | ||
+ | ProporsalForm | ||
+ | persia/LoS: | ||
+ | persia/ | ||
+ | </ | ||
+ | |||
+ | ==== Make the modifications required ==== | ||
+ | |||
+ | |||
+ | To make file changes, simply use your text editor, your graphics program or whatever you need but make sure not to change the structure of your working copy without using the proper Subversion commands ('' | ||
+ | |||
+ | |||
+ | • Adding files, directories or symbolic links: | ||
+ | |||
+ | |||
+ | < | ||
+ | fred@inst1 ~/ | ||
+ | |||
+ | A file5.for | ||
+ | </ | ||
+ | |||
+ | |||
+ | When adding a directory, the default is a recursive addition. Use –non-recursive (-N) otherwise. | ||
+ | |||
+ | |||
+ | < | ||
+ | fred@inst1 ~/ | ||
+ | |||
+ | A newdir | ||
+ | A newdir/p1 | ||
+ | A newdir/p2 | ||
+ | A newdir/ | ||
+ | </ | ||
+ | |||
+ | |||
+ | • Deleting files/ | ||
+ | |||
+ | |||
+ | < | ||
+ | fred@inst1 ~/ | ||
+ | |||
+ | D file1.c | ||
+ | </ | ||
+ | |||
+ | |||
+ | • Copying files/ | ||
+ | |||
+ | |||
+ | < | ||
+ | fred@inst1 ~/ | ||
+ | |||
+ | A file6.pl | ||
+ | </ | ||
+ | |||
+ | |||
+ | • Moving files/ | ||
+ | |||
+ | |||
+ | < | ||
+ | fred@inst1 ~/ | ||
+ | |||
+ | A subdir2 | ||
+ | D subdir1/ | ||
+ | D subdir1/ | ||
+ | D subdir1 | ||
+ | </ | ||
+ | |||
+ | |||
+ | After all these operations, files and directories affected are scheduled for addition, removal, copying or moving. No action will take place in the repository until you '' | ||
+ | |||
+ | ==== Examine your changes ==== | ||
+ | |||
+ | |||
+ | Before committing your changes to the repository it is a good practise to examine the modifications. You can see exactly the differences between your current copy and other versions stored in the repository and if something odd happened you can also revert your changes. This step will also help you to write a more accurate log message or description of the modifications. | ||
+ | |||
+ | |||
+ | • svn status: done at the top of your working copy it will show all the changes made | ||
+ | |||
+ | |||
+ | < | ||
+ | fred@inst1 ~/ | ||
+ | |||
+ | A + file6.pl | ||
+ | D file1.c | ||
+ | A newdir | ||
+ | A newdir/p1 | ||
+ | A newdir/p2 | ||
+ | A newdir/p3 | ||
+ | D subdir1 | ||
+ | D subdir1/ | ||
+ | D subdir1/ | ||
+ | A file5.for | ||
+ | A + subdir2 | ||
+ | </ | ||
+ | |||
+ | |||
+ | (see the Subversion manual for a detailed description of the status codes that this command can return). | ||
+ | |||
+ | |||
+ | • svn diff will show you the exact modifications you have done comparing the files in your working copy to those in the “dfe” copy inside your '' | ||
+ | < | ||
+ | fred@inst1 ~/ | ||
+ | </ | ||
+ | |||
+ | |||
+ | • svn revert can undo any scheduled operations (addition, removal, etc.) or it can also bring your file to the initial state when you did the checkout to get your working copy | ||
+ | |||
+ | |||
+ | < | ||
+ | fred@inst1 ~/ | ||
+ | Reverted ‘file1.c’ | ||
+ | </ | ||
+ | |||
+ | ==== Commit your modifications ==== | ||
+ | |||
+ | |||
+ | When you are happy with all the changes you have made in your files then you can send them to the repository using the commit command. For this action you need to supply a log message that will be attached to the new revision you have created. You can write a short message in the command line with switch --message (-m), you can pass the file where you have been writing your changes (--file or -F) or you can start an editor failing to specify any of the previous switches. Always try to be as much explicit as possible so that all the modifications done to your files are reported. | ||
+ | |||
+ | |||
+ | < | ||
+ | fred@inst1 ~/ | ||
+ | fred@inst1 ~/ | ||
+ | |||
+ | Adding file5.for | ||
+ | Adding file6.pl | ||
+ | Adding newdir | ||
+ | Adding newdir/ | ||
+ | Adding newdir/ | ||
+ | Adding newdir/ | ||
+ | Deleting subdir1 | ||
+ | Adding subdir2 | ||
+ | Transmitting file data …. | ||
+ | Committed revision 5. | ||
+ | </ | ||