http://dfe.iaa.csic.es/persia/websvn/ (only for download)
(Only for linux)
Download the scritp:uploadsvn_persia.tar.gz
(Untar: tar xvfz uploadsvn_persia.tar.gz)
usage: ./uploadsvn_persia [username] [file_to_upload] [svn_directory] [log_file]
[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.
The typical work cycle that you will follow during the development process of your software packages is:
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.
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/<nowiki>*</nowiki> persia/Bibliography: persia/Budget: persia/Consortium: persia/H2020: ProporsalForm Templates persia/LoS: persia/Minutes
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.
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’
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.