Changes between Version 39 and Version 40 of Developers/SVN_Quick Reference


Ignore:
Timestamp:
2018-06-05T01:44:29+02:00 (2 years ago)
Author:
nicolasmartin
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Developers/SVN_Quick Reference

    v39 v40  
    1 = SubVersioN basics 
     1= SubVersioN basics customized for NEMO 
    22 
    33[[PageOutline(2-3)]] 
     
    1313=== Create a branch 
    1414 
    15 For development branches, we tend to add one level of subdirectory corresponding to the current year, and an additional item in the name corresponding to the work-plan. For instance 
     15For development branches, we tend to add one level of subdirectory corresponding to the current year, and an additional item in the name corresponding to the workplan. For branch naming conventions, see [wiki:Developers/DevelopingCodeChanges]. 
    1616 
    1717{{{#!sh 
     
    1919}}} 
    2020 
    21 For branch naming conventions, see [wiki:Developers/DevelopingCodeChanges]. 
    22  
    2321=== Switch to the trunk (hazardous) 
    2422 
    25 Your working copy was based on a given branch which has been moved to the trunk (conflicts unavoidable and pretty complicated to resolve). 
     23Your working copy was based on a given branch and you want to mirror a new branch, conflicts unavoidable and pretty complicated to resolve. 
    2624 
    2725{{{#!sh 
    28 svn switch http://forge.ipsl.jussieu.fr/nemo/svn/NEMO/trunk 
     26svn sw 'URL[@PEGREV] [PATH]' 
    2927}}} 
    3028 
     
    4240 
    4341{{{#!sh 
    44 svn copy trunk/src/OCE/module_example branches/'Current_year'/'dev_branch'/'path/to/the'/new_routine.f90 
     42svn copy trunk/src/OCE/module_example branches/'Current_year'/'dev_branch'/'path/to/the/new/routine.{f90, F90, h90}' 
    4543}}} 
    4644 
    47 === Add a new file / Remove a file 
     45{{{#!comment 
     46Explanation missing for available extensions 
     47}}} 
     48 
     49=== Add a new item / Remove a [remote] item 
    4850 
    4951{{{#!sh 
    50 svn add 'Path/to/the/file/to/add' 
    51 svn del 'Path/to/the/file/to/delete' 
     52svn add 'PATH...' 
     53svn del '{PATH..., URL...}' 
    5254}}} 
    5355 
    54 === Update file between branches 
    55  
    56 Suppose the downloaded NEMO directory corresponds to the tag nemo_v3 (i.e. from http://forge.ipsl.jussieu.fr/nemo/svn/tags/nemo_v3/NEMO); the current revision number of the file sbcssm.F90 is 1196. To get the new revision (which has been committed on the trunk http://forge.ipsl.jussieu.fr/nemo/svn/trunk/NEMO ) with the revision number 1214: 
    57  
    58 {{{#!sh 
    59 cd ./modeles/NEMO/OPA_SRC/SBC/ 
    60 svn merge -r 1196:1214 http://forge.ipsl.jussieu.fr/nemo/svn/trunk/NEMO/OPA_SRC/SBC/sbcssm.F90 
    61 }}} 
    62  
    63 == Manage versioned properties 
     56== Manage versioned properties on items 
    6457 
    6558=== `svn:keywords` for commit infos 
     
    6861 
    6962{{{#!sh 
    70 svn pset svn:keywords Id 'path/to/the'/new_routine.'{f90, F90, h90, sh}' 
     63svn pset svn:keywords Id 'path/to/the/new/routine.{f90, F90, h90, sh}' 
    7164}}} 
    7265 
     
    7669If you want to apply a specific  
    7770 
    78 === `svn:executable` for scripts 
     71=== `svn:executable` for shell scripts 
    7972 
    8073{{{#!sh 
     
    8679}}} 
    8780 
    88  
    89 === `svn:externals` for  
     81=== `svn:externals` for external sources 
    9082 
    9183 
    9284== Merging 
     85 
     86=== Update item between branches 
     87 
     88Suppose the downloaded NEMO directory corresponds to the tag nemo_v3 (i.e. from http://forge.ipsl.jussieu.fr/nemo/svn/tags/nemo_v3/NEMO); the current revision number of the file sbcssm.F90 is 1196. To get the new revision (which has been committed on the trunk http://forge.ipsl.jussieu.fr/nemo/svn/trunk/NEMO ) with the revision number 1214: 
     89 
     90{{{#!sh 
     91svn merge 'sourceWCPATH1@REV1 sourceWCPATH2@REV2 [WCPATH]' 
     92}}} 
    9393 
    9494To get all changes from the revision 746 to the current one (HEAD) on a specific directory 
     
    101101}}} 
    102102 
    103 == Commit changes to the repository 
     103== Revert local changes / Commit changes to the repository 
     104 
     105 
    104106 
    105107{{{#!sh 
     
    140142}}} 
    141143 
     144=== Push modified external items from a  working copy 
     145 
     146Use explicit option with SVN commit command, '''think that no revision has to be set on related ext def (equivalent to `@HEAD`)''' 
     147 
     148{{{#!sh 
     149svn ci --include-externals ...  
     150}}} 
     151 
    142152=== Information about the sources 
    143153 
     
    153163cd ./NEMO && svn log --verbose --stop-on-copy 
    154164}}} 
     165 
     166With the new layout of the repository, some may encounter downloading or updating issues with  
     167 
     168{{{#!sh 
     169svn co -r REV URL 
     170}}} 
     171 
     172Use instead the more robust syntax 
     173 
     174{{{#!sh 
     175svn co URL@PEG (REV ~ PEG) 
     176}}} 
     177 
     178See ​http://svnbook.red-bean.com/en/1.7/svn.advanced.pegrevs.html for more.