svn.rst
changeset 1448 0b68966ae7cb
parent 1447 d4399aacf09e
child 1449 acebb52a173a
equal deleted inserted replaced
1447:d4399aacf09e 1448:0b68966ae7cb
     1 -*- mode: outline; coding: utf-8; -*-
       
     2 
       
     3 * Where palced config files?
       
     4 
       
     5 The per-user configuration area currently contains three files two
       
     6 configuration files ('config' and 'servers').
       
     7 
       
     8   /etc/subversion
       
     9                 Unix system wide configurations.
       
    10   $HOME/.subversion
       
    11                 Unix per-user configuration area.
       
    12   %APPDATA%\Subversion
       
    13                 Windows per-user configuration area.
       
    14 
       
    15 
       
    16 * Copy repo from SourceForge to GoogleCode.
       
    17 
       
    18   $ svnsync init https://PROJ.googlecode.com/svn https://PROJ.svn.sourceforge.net/svnroot/PROJ
       
    19   $ svnsync --username NAME --password PASSWORD \
       
    20                 sync https://PROJ.googlecode.com/svn https://PROJ.svn.sourceforge.net/svnroot/PROJ
       
    21 
       
    22 * Disable interactive conflict resolution.
       
    23 
       
    24 Write in '$HOME/.subversion/config'
       
    25 
       
    26   [miscellany]
       
    27   interactive-conflicts = no
       
    28 
       
    29 * Creating svn repo.
       
    30 
       
    31   $ mkdir -p /srv/svn
       
    32   $ svnadmin create /srv/svn/$repo
       
    33   $ svn co file:///srv/svn/$repo $repo
       
    34   $ cd /tmp/$repo
       
    35   $ mkdir trunk branches features tags
       
    36   $ svn add *
       
    37   $ svn st      # check all OK
       
    38   $ svn ci -m "Init repo."
       
    39 
       
    40 For multi-project repo do follow:
       
    41 
       
    42   $ mkdir -p /srv/svn
       
    43   $ svnadmin create /srv/svn/$repo
       
    44   $ svn co file:///srv/svn/$repo $repo
       
    45   $ cd /tmp/$repo
       
    46   $ for proj in $proj1 $proj2; do mkdir $proj/trunk $proj/branches $proj/features $proj/tags; done
       
    47   $ svn add *
       
    48   $ svn st      # check all OK
       
    49   $ svn ci -m "Init repo."
       
    50 
       
    51 * Run local svn server.
       
    52 
       
    53   $ svnserve.exe -d --pid-file=svnserve.pid --root=/srv/svn/proj  # default port: 3690
       
    54   $ svn ls svn://localhost    # check all OK
       
    55   $ kill -l
       
    56 
       
    57 * Undo bad commit.
       
    58 
       
    59   $ emacs FILE
       
    60 ...
       
    61   $ svn ci -m "Introduce first bug."
       
    62 Sending        trunk/FILE
       
    63 Transmitting file data .
       
    64 Committed revision 7.
       
    65   $ emacs FILE
       
    66 ...
       
    67   $ svn ci -m "Make a lot of good changes."
       
    68 ...
       
    69 Committed revision 8.
       
    70 ...
       
    71   $ emacs FILE
       
    72 ...
       
    73   $ svn ci -m "Introduce second bug."
       
    74 ...
       
    75 Committed revision 10.
       
    76   $ emacs FILE
       
    77 ...
       
    78   $ svn ci -m "Make a lot of good changes."
       
    79 ...
       
    80 
       
    81 Now you understand that revision 7 and 10 buggy. You decide revert changes:
       
    82 
       
    83   $ svn merge -r 7:6 -r 10:9 FILE
       
    84   $ svn ci -m "Reverted revision 7 and 10."
       
    85 
       
    86 For one changeset revert you can use shortly syntax:
       
    87 
       
    88   $ svn merge -c -7 -c -10 FILE
       
    89 
       
    90 Also you can use long diapason:
       
    91 
       
    92   $ svn merge -r 10:6 FILE