author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Mon, 19 Oct 2015 17:04:52 +0300 | |
changeset 1769 | cadd23f8127f |
parent 1531 | 330085d06687 |
child 1777 | d9b134f80a66 |
permissions | -rw-r--r-- |
1513 | 1 |
.. -*- coding: utf-8; -*- |
2 |
.. include:: HEADER.rst |
|
3 |
||
4 |
============= |
|
5 |
Subversion. |
|
6 |
============= |
|
7 |
.. contents:: |
|
8 |
||
9 |
Where palced config files? |
|
10 |
========================== |
|
11 |
||
12 |
The per-user configuration area currently contains three files two |
|
13 |
configuration files ('config' and 'servers'). |
|
14 |
||
15 |
/etc/subversion |
|
16 |
Unix system wide configurations. |
|
17 |
$HOME/.subversion |
|
18 |
Unix per-user configuration area. |
|
19 |
%APPDATA%\Subversion |
|
20 |
Windows per-user configuration area. |
|
21 |
||
22 |
Copy repo from SourceForge to GoogleCode. |
|
23 |
========================================= |
|
24 |
:: |
|
25 |
||
26 |
$ svnsync init https://PROJ.googlecode.com/svn https://PROJ.svn.sourceforge.net/svnroot/PROJ |
|
27 |
$ svnsync --username NAME --password PASSWORD \ |
|
28 |
sync https://PROJ.googlecode.com/svn https://PROJ.svn.sourceforge.net/svnroot/PROJ |
|
29 |
||
30 |
Disable interactive conflict resolution. |
|
31 |
======================================== |
|
32 |
||
33 |
Write in ``$HOME/.subversion/config``:: |
|
34 |
||
35 |
[miscellany] |
|
36 |
interactive-conflicts = no |
|
37 |
||
38 |
Creating svn repo. |
|
39 |
================== |
|
40 |
:: |
|
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 |
$ mkdir trunk branches features tags |
|
47 |
$ svn add * |
|
48 |
$ svn st # check all OK |
|
49 |
$ svn ci -m "Init repo." |
|
50 |
||
51 |
For multi-project repo do follow:: |
|
52 |
||
53 |
$ mkdir -p /srv/svn |
|
54 |
$ svnadmin create /srv/svn/$repo |
|
55 |
$ svn co file:///srv/svn/$repo $repo |
|
56 |
$ cd /tmp/$repo |
|
57 |
$ for proj in $proj1 $proj2; do mkdir $proj/trunk $proj/branches $proj/features $proj/tags; done |
|
58 |
$ svn add * |
|
59 |
$ svn st # check all OK |
|
60 |
$ svn ci -m "Init repo." |
|
61 |
||
62 |
Run local svn server. |
|
63 |
===================== |
|
64 |
:: |
|
65 |
||
1530
d41385c7d4cb
Remove unnecessary .exe command suffix.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1513
diff
changeset
|
66 |
$ svnserve -d --pid-file=svnserve.pid --root=/srv/svn/proj # default port: 3690 |
1513 | 67 |
$ svn ls svn://localhost # check all OK |
68 |
$ kill -l |
|
69 |
||
70 |
Undo bad commit. |
|
71 |
================ |
|
72 |
:: |
|
73 |
||
74 |
$ emacs FILE |
|
75 |
... |
|
76 |
$ svn ci -m "Introduce first bug." |
|
77 |
Sending trunk/FILE |
|
78 |
Transmitting file data . |
|
79 |
Committed revision 7. |
|
80 |
$ emacs FILE |
|
81 |
... |
|
82 |
$ svn ci -m "Make a lot of good changes." |
|
83 |
... |
|
84 |
Committed revision 8. |
|
85 |
... |
|
86 |
$ emacs FILE |
|
87 |
... |
|
88 |
$ svn ci -m "Introduce second bug." |
|
89 |
... |
|
90 |
Committed revision 10. |
|
91 |
$ emacs FILE |
|
92 |
... |
|
93 |
$ svn ci -m "Make a lot of good changes." |
|
94 |
... |
|
95 |
||
96 |
Now you understand that revision 7 and 10 buggy. You decide revert changes:: |
|
97 |
||
98 |
$ svn merge -r 7:6 -r 10:9 FILE |
|
99 |
$ svn ci -m "Reverted revision 7 and 10." |
|
100 |
||
101 |
For one changeset revert you can use shortly syntax:: |
|
102 |
||
103 |
$ svn merge -c -7 -c -10 FILE |
|
104 |
||
1531 | 105 |
Also you can use ranges:: |
1513 | 106 |
|
107 |
$ svn merge -r 10:6 FILE |
|
108 |
||
109 |
Merge branches. |
|
110 |
=============== |
|
111 |
:: |
|
112 |
||
113 |
$ cd trunk |
|
114 |
$ svn mergeinfo --show-revs eligible ^/branches/feature |
|
115 |
$ svn merge ^/branches/feature |
|
116 |
$ svn ci -m 'Integrate feature X.' |
|
117 |