New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Developers/SVN_QuickReference (diff) – NEMO

Changes between Version 57 and Version 58 of Developers/SVN_QuickReference


Ignore:
Timestamp:
2018-11-11T22:12:05+01:00 (5 years ago)
Author:
nicolasmartin
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Developers/SVN_QuickReference

    v57 v58  
    55__For reference, browse to__ http://svnbook.red-bean.com 
    66 
     7{{{#!box width=60em 
    78{{{#!sh 
    89## Definitions 
    9  
    10 ${REV} # REVision number 
    11  
    12 ${URL} # web address of a path in the SVN repository (repository URL + relative path in the repository) 
     10${REV}    ## REVision number 
     11${WCPATH} ## Working Copy PATH 
     12${URL}    ## URL of working path mirrored (repository URL + relative path) 
    1313## Repository URL depends on your role 
    14 ##- user:        http://forge.ipsl.jussieu.fr/nemo/svn 
    15 ##- developer svn+ssh://${ID}@forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn 
    16  
    17 ${WCPATH} # Working Copy PATH 
     14## - user      => http://forge.ipsl.jussieu.fr/nemo/svn 
     15## - developer => svn+ssh://${ID}@forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn 
     16}}} 
    1817}}} 
    1918 
     
    2221}}} 
    2322{{{#!th 
    24 == Properties 
    25 }}} 
    26 {{{#!th 
    27 == Branching / Merging 
     23== Advanced features 
    2824}}} 
    2925|- 
    3026{{{#!td 
    31 Download a working copy 
     27== Working copy 
    3228   {{{#!sh 
    33    $ svn {checkout,co} [${WCPATH}] 
     29   ## Download a working copy 
     30   svn {checkout,co} ${URL}[@${REV}] 
     31 
     32   ## Update it 
     33   svn {up,update} [-r ${REV}] [${WCPATH}] 
     34 
     35   ## Push modifications 
     36   svn {ci,commit} [-m 'one-liner message'] [${WCPATH}] 
     37   svn {ci,commit} --include-externals ...                ## Append externals 
    3438   }}} 
    35 !Add/Remove item (file or folder) 
     39== Items 
    3640   {{{#!sh 
    37    $ svn {add,del,rm} ${WCPATH} 
    38    }}} 
    39 Informations on working copy 
    40    {{{#!sh 
    41    $ svn info [{${WCPATH},${URL}}][@${REV}] 
    42    }}} 
    43 Local status wrt the repository 
    44    {{{#!sh 
    45    $ svn status [-[qu]] [${WCPATH}] 
    46    }}} 
    47 Local changes 
    48    {{{#!sh 
    49    $ svn {diff,revert} ${WCPATH} 
    50    }}} 
    51 Push modififcations to repository 
    52    {{{#!sh 
    53    $ svn {ci,commit} [-m 'one-liner message'] [${WCPATH}] 
    54    }}} 
    55  For modified externals, add `--include-externals` option 
    56 List commit messages 
    57    {{{#!sh 
    58    $ svn log [{${URL},${WCPATH}}[@${REV}]] 
     41   ## Common cmds 
     42   svn add                 ${WCPATH}    ## Add item under versioning 
     43   svn {delete,remove,rm}  ${WCPATH}    ## Remove item 
     44   svn {st,status}        [${WCPATH}]   ## List modified items  
     45   svn diff               [${WCPATH}]   ## Differences inside items 
     46   svn revert              ${WCPATH}    ## Give up edits 
     47 
     48   ## Straightforward UNIX-like cmds 
     49   svn {cat,list,ls} {${URL},${WCPATH}}[@${REV}] 
     50   svn mkdir         {${URL},${WCPATH}} 
     51 
     52   ## Infos 
     53   svn log  {${URL},${WCPATH}}[@${REV}]   ## List commit messages 
     54   svn info {${URL},${WCPATH}}[@${REV}]   ## Detailed   
     55 
     56   ## In case of trouble 
     57   svn {resolve,resolved} ${WCPATH}   ## Ruling conflicted files 
     58   svn cleanup [${WCPATH}]            ## Fix corrupted working copy 
    5959   }}} 
    6060}}} 
    6161{{{#!td 
    62 `svn:keywords Id`: record commit infos in routine 
     62== Properties 
     63http://svnbook.red-bean.com/en/1.7/svn.ref.properties.html 
    6364   {{{#!sh 
    64    $ svn propset svn:keywords Id on ${WCPATH} 
     65   ## {proplist,plist} 
     66   ## {propset,pset} 
     67   ## {propedit,pedit} 
     68   ## {propdel,pdel} 
     69 
     70   ## 'svn:keywords Id': record commit infos in routine 
     71   svn {propset,pset} svn:keywords Id on ${WCPATH} 
     72 
     73   ## 'svn:executable': set permissions for running scripts 
     74   svn {propset,pset} svn:executable on ${WCPATH} 
     75 
     76   ## 'svn:externals': defining external sources 
     77   ## - Single external 
     78   svn {propset,pset}  svn:externals ${URL}[@${REV}] ${WCPATH} 
     79   ## - Multi externals 
     80   svn {propset,pedit} svn:externals ${WCPATH} 
    6581   }}} 
    66 `svn:mime-type`: syntax highlighting and merging process 
     82==  Branching 
    6783   {{{#!sh 
    68    $ svn propset svn:mime-type ... ${WCPATH} 
    69    }}} 
    70 `svn:executable`: set permissions for scripts 
    71    {{{#!sh 
    72    $ svn propset svn:executable on ${WCPATH} 
    73    }}} 
    74 `svn:externals`: defining external sources 
    75 - Single external 
    76    {{{#!sh 
    77    $ svn propset svn:externals ${URL}[@${REV}] ${WCPATH} 
    78    }}} 
    79 - Multi externals 
    80    {{{#!sh 
    81    $ svn propedit svn:externals ${WCPATH} 
     84   ## Create a branch (copying) 
     85   svn copy {${URL},${WCPATH}}[@${REV}] {${URL},${WCPATH}} 
     86 
     87   ## Merging sources 
     88   svn merge {${URL1},${WCPATH1}}[@${REV1}] [{${URL1},${WCPATH2}}[@${REV2}]] [${WCPATH}] 
     89 
     90   ## Update WC to a new URL 
     91   ## - Mirror a different branch $i.e$ traversing branch in the same repository (__hazardous!! __) 
     92   svn switch ${URL}[@${REV}] [${WCPATH}] 
     93   ## - Relocate to a different URL $i.e$ keep the same branch but move to a new server or URL scheme 
     94   svn switch --relocate ${URL1} ${URL2} 
     95   svn relocate          ${URL1} ${URL2} 
    8296   }}} 
    8397}}} 
    84 {{{#!td 
    85 Create a branch (copying) 
    86    {{{#!sh 
    87    $ svn copy {${URL},${WCPATH}}[@${REV}] {${URL},${WCPATH}} 
    88    }}} 
    89 Update WC to a new URL 
    90 - Mirror a different branch $i.e$ traversing branch in the same repository (__hazardous!! __) 
    91    {{{#!sh 
    92    $ svn switch ${URL}[@${REV}] [${WCPATH}] 
    93    }}} 
    94 - Relocate to a different URL $i.e$ keep the same branch but move to a new server or URL scheme 
    95    {{{#!sh 
    96    $ svn switch --relocate ${URL1} ${URL2} 
    97    }}} 
    98 Merging sources 
    99    {{{#!sh 
    100    $ svn merge {${URL1},${WCPATH1}}[@${REV1}] [{${URL1},${WCPATH2}}[@${REV2}]] [${WCPATH}] 
    101    }}} 
    102 Remove a branch 
    103    {{{#!sh 
    104    $ svn rm {${URL},${WCPATH}} 
    105    }}} 
    106 }}}