Changes between Version 39 and Version 40 of Developers/SVN_QuickReference
- Timestamp:
- 2018-06-05T01:44:29+02:00 (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Developers/SVN_QuickReference
v39 v40 1 = SubVersioN basics 1 = SubVersioN basics customized for NEMO 2 2 3 3 [[PageOutline(2-3)]] … … 13 13 === Create a branch 14 14 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 instance15 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 workplan. For branch naming conventions, see [wiki:Developers/DevelopingCodeChanges]. 16 16 17 17 {{{#!sh … … 19 19 }}} 20 20 21 For branch naming conventions, see [wiki:Developers/DevelopingCodeChanges].22 23 21 === Switch to the trunk (hazardous) 24 22 25 Your working copy was based on a given branch which has been moved to the trunk (conflicts unavoidable and pretty complicated to resolve).23 Your working copy was based on a given branch and you want to mirror a new branch, conflicts unavoidable and pretty complicated to resolve. 26 24 27 25 {{{#!sh 28 svn sw itch http://forge.ipsl.jussieu.fr/nemo/svn/NEMO/trunk26 svn sw 'URL[@PEGREV] [PATH]' 29 27 }}} 30 28 … … 42 40 43 41 {{{#!sh 44 svn copy trunk/src/OCE/module_example branches/'Current_year'/'dev_branch'/'path/to/the '/new_routine.f9042 svn copy trunk/src/OCE/module_example branches/'Current_year'/'dev_branch'/'path/to/the/new/routine.{f90, F90, h90}' 45 43 }}} 46 44 47 === Add a new file / Remove a file 45 {{{#!comment 46 Explanation missing for available extensions 47 }}} 48 49 === Add a new item / Remove a [remote] item 48 50 49 51 {{{#!sh 50 svn add 'P ath/to/the/file/to/add'51 svn del ' Path/to/the/file/to/delete'52 svn add 'PATH...' 53 svn del '{PATH..., URL...}' 52 54 }}} 53 55 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 64 57 65 58 === `svn:keywords` for commit infos … … 68 61 69 62 {{{#!sh 70 svn pset svn:keywords Id 'path/to/the '/new_routine.'{f90, F90, h90, sh}'63 svn pset svn:keywords Id 'path/to/the/new/routine.{f90, F90, h90, sh}' 71 64 }}} 72 65 … … 76 69 If you want to apply a specific 77 70 78 === `svn:executable` for s cripts71 === `svn:executable` for shell scripts 79 72 80 73 {{{#!sh … … 86 79 }}} 87 80 88 89 === `svn:externals` for 81 === `svn:externals` for external sources 90 82 91 83 92 84 == Merging 85 86 === Update item between branches 87 88 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: 89 90 {{{#!sh 91 svn merge 'sourceWCPATH1@REV1 sourceWCPATH2@REV2 [WCPATH]' 92 }}} 93 93 94 94 To get all changes from the revision 746 to the current one (HEAD) on a specific directory … … 101 101 }}} 102 102 103 == Commit changes to the repository 103 == Revert local changes / Commit changes to the repository 104 105 104 106 105 107 {{{#!sh … … 140 142 }}} 141 143 144 === Push modified external items from a working copy 145 146 Use explicit option with SVN commit command, '''think that no revision has to be set on related ext def (equivalent to `@HEAD`)''' 147 148 {{{#!sh 149 svn ci --include-externals ... 150 }}} 151 142 152 === Information about the sources 143 153 … … 153 163 cd ./NEMO && svn log --verbose --stop-on-copy 154 164 }}} 165 166 With the new layout of the repository, some may encounter downloading or updating issues with 167 168 {{{#!sh 169 svn co -r REV URL 170 }}} 171 172 Use instead the more robust syntax 173 174 {{{#!sh 175 svn co URL@PEG (REV ~ PEG) 176 }}} 177 178 See http://svnbook.red-bean.com/en/1.7/svn.advanced.pegrevs.html for more.