====== PERSIA repository ====== ===== Structure of repository ===== * **Minutes/** Agendas and minutes of meetings held so far * **Management/** Documents you might want to view relating to how we're scoping the bid wrt to the call and topic, and how the proposal creation will be managed. * **Proposal/** The actual files that will make up the proposal ===== Install SVN ===== ===== How download and upload files ===== ==== Make easy using websvn ==== [[http://dfe.iaa.csic.es/persia/websvn/|http://dfe.iaa.csic.es/persia/websvn/]] (only for download) ==== Update files ==== (Only for linux) \\ Download the scritp:{{:admin:uploadsvn_persia.tar.gz|uploadsvn_persia.tar.gz}} \\ (Untar: tar xvfz uploadsvn_persia.tar.gz) usage: ./uploadsvn_persia [username] [file_to_upload] [svn_directory] [log_file] * 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/ProporsalForm * H2020/Templates * LoS * Log_file is a text file (ascii) where the content of the file or modifications are. === Example === [rodon@ux6 scripts]$ ./uploadsvn_persia rodon /home/rodon/Descargas/cpelogos.eps Minutes log.txt Welcome to the Automatically files uploader of SVN Persia Project cpelogos.eps Download SVN version…. rodon@dfe.iaa.csic.es's password: A tmp/Consortium A tmp/Minutes A tmp/Minutes/definitivo.pdf A tmp/Budget A tmp/Bibliography A tmp/H2020 A tmp/H2020/ProporsalForm A tmp/H2020/Templates A tmp/H2020/Templates/Part B Template RIA_IA section 4-5 v20140416.rtf A tmp/H2020/Templates/Part B Template RIA_IA section 1-3 v20140403.rtf A tmp/LoS Revisión obtenida: 4 tmp/Minutes/cpelogos.eps cpelogos.eps already exist under SVN version control. Upload file to SVN repository…. rodon@dfe.iaa.csic.es's password: Enviando Minutes/cpelogos.eps 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'' svn update'' and ''svn resolved'', which are the steps you should insert after the retrieval of your working copy and before the commit of your changes. ==== Retrieve a working copy (after having defined SVN_SSH variable) ==== fred@inst1 ~> svn checkout svn+ssh:fred@dfe.iaa.csic.es/opt/svn/persia . A persia/Consortium A persia/Minutes A persia/Budget A persia/Bibliography A persia/H2020 A persia/H2020/ProporsalForm A persia/H2020/Templates Checked out revision 4 fred@inst1~> ls persia/* persia/Bibliography: persia/Budget: persia/Consortium: persia/H2020: ProporsalForm Templates persia/LoS: persia/Minutes ==== 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 (''svn add, svn delete, svn copy or svn remove''). • Adding files, directories or symbolic links: fred@inst1 ~/persia> svn add file5.for A file5.for When adding a directory, the default is a recursive addition. Use –non-recursive (-N) otherwise. fred@inst1 ~/persia> svn add newdir A newdir A newdir/p1 A newdir/p2 A newdir/p3 • Deleting files/directories from the working copy: fred@inst1 ~/persia> svn delete file1.c D file1.c • Copying files/directories from the working copy fred@inst1 ~/persia> svn copy file2.pl file6.pl A file6.pl • Moving files/directories (same as copying + deleting) fred@inst1 ~/persia> svn move subdir1 subdir2 A subdir2 D subdir1/file3.dat D subdir1/file4.h 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 ''commit'' your changes. ==== 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 ~/persia> svn status A + file6.pl D file1.c A newdir A newdir/p1 A newdir/p2 A newdir/p3 D subdir1 D subdir1/file3.dat D subdir1/file4.h 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 ''.svn directory''. fred@inst1 ~/persia> svn diff • 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 ~/persia> svn revert file1.c 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 ~/persia> svn commit –m “solving bug 123” fred@inst1 ~/persia> svn commit –file logfile Adding file5.for Adding file6.pl Adding newdir Adding newdir/p1 Adding newdir/p2 Adding newdir/p3 Deleting subdir1 Adding subdir2 Transmitting file data …. Committed revision 5.