Merge branches.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Fri, 27 Sep 2013 17:12:48 +0300
changeset 1513 2a6cd59d5863
parent 1512 db0fedd5662e
child 1514 81d7dd711a43
Merge branches.
svn.rst
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/svn.rst	Fri Sep 27 17:12:48 2013 +0300
@@ -0,0 +1,117 @@
+.. -*- coding: utf-8; -*-
+.. include:: HEADER.rst
+
+=============
+ Subversion.
+=============
+.. contents::
+
+Where palced config files?
+==========================
+
+The per-user configuration area currently contains three files two
+configuration files ('config' and 'servers').
+
+  /etc/subversion
+                Unix system wide configurations.
+  $HOME/.subversion
+                Unix per-user configuration area.
+  %APPDATA%\Subversion
+                Windows per-user configuration area.
+
+Copy repo from SourceForge to GoogleCode.
+=========================================
+::
+
+  $ svnsync init https://PROJ.googlecode.com/svn https://PROJ.svn.sourceforge.net/svnroot/PROJ
+  $ svnsync --username NAME --password PASSWORD \
+                sync https://PROJ.googlecode.com/svn https://PROJ.svn.sourceforge.net/svnroot/PROJ
+
+Disable interactive conflict resolution.
+========================================
+
+Write in ``$HOME/.subversion/config``::
+
+  [miscellany]
+  interactive-conflicts = no
+
+Creating svn repo.
+==================
+::
+
+  $ mkdir -p /srv/svn
+  $ svnadmin create /srv/svn/$repo
+  $ svn co file:///srv/svn/$repo $repo
+  $ cd /tmp/$repo
+  $ mkdir trunk branches features tags
+  $ svn add *
+  $ svn st      # check all OK
+  $ svn ci -m "Init repo."
+
+For multi-project repo do follow::
+
+  $ mkdir -p /srv/svn
+  $ svnadmin create /srv/svn/$repo
+  $ svn co file:///srv/svn/$repo $repo
+  $ cd /tmp/$repo
+  $ for proj in $proj1 $proj2; do mkdir $proj/trunk $proj/branches $proj/features $proj/tags; done
+  $ svn add *
+  $ svn st      # check all OK
+  $ svn ci -m "Init repo."
+
+Run local svn server.
+=====================
+::
+
+  $ svnserve.exe -d --pid-file=svnserve.pid --root=/srv/svn/proj  # default port: 3690
+  $ svn ls svn://localhost    # check all OK
+  $ kill -l
+
+Undo bad commit.
+================
+::
+
+  $ emacs FILE
+  ...
+  $ svn ci -m "Introduce first bug."
+  Sending        trunk/FILE
+  Transmitting file data .
+  Committed revision 7.
+  $ emacs FILE
+  ...
+  $ svn ci -m "Make a lot of good changes."
+  ...
+  Committed revision 8.
+  ...
+  $ emacs FILE
+  ...
+  $ svn ci -m "Introduce second bug."
+  ...
+  Committed revision 10.
+  $ emacs FILE
+  ...
+  $ svn ci -m "Make a lot of good changes."
+  ...
+
+Now you understand that revision 7 and 10 buggy. You decide revert changes::
+
+  $ svn merge -r 7:6 -r 10:9 FILE
+  $ svn ci -m "Reverted revision 7 and 10."
+
+For one changeset revert you can use shortly syntax::
+
+  $ svn merge -c -7 -c -10 FILE
+
+Also you can use long diapason::
+
+  $ svn merge -r 10:6 FILE
+
+Merge branches.
+===============
+::
+
+  $ cd trunk
+  $ svn mergeinfo --show-revs eligible ^/branches/feature
+  $ svn merge ^/branches/feature
+  $ svn ci -m 'Integrate feature X.'
+