| 1 | GLEP: 36 |
1 | GLEP: 36 |
| 2 | Title: Subversion/CVS for Gentoo Hosted Projects |
2 | Title: Subversion/CVS for Gentoo Hosted Projects |
| 3 | Version: $Revision: 1.1 $ |
3 | Version: $Revision: 1.6 $ |
| 4 | Author: Aaron Walker <ka0ttic@gentoo.org> |
4 | Author: Aaron Walker <ka0ttic@gentoo.org> |
| 5 | Last-Modified: $Date: 2005/03/13 16:12:53 $ |
5 | Last-Modified: $Date: 2005/11/07 22:26:59 $ |
| 6 | Status: Draft |
6 | Status: Final |
| 7 | Type: Standards Track |
7 | Type: Standards Track |
| 8 | Content-Type: text/x-rst |
8 | Content-Type: text/x-rst |
| 9 | Created: 11-Nov-2004 |
9 | Created: 11-Nov-2004 |
| 10 | Post-Date: 13-Mar-2005 |
10 | Post-History: 13-Mar-2005, 21-Mar-2005 |
| 11 | |
11 | |
| 12 | Abstract |
12 | Abstract |
| 13 | ======== |
13 | ======== |
| 14 | |
14 | |
| 15 | Allow maintainers of Gentoo hosted projects to choose between Subversion/CVS. |
15 | Allow maintainers of Gentoo hosted projects to choose between Subversion/CVS. |
| … | |
… | |
| 21 | certain features, can choose which one suits them or their project the best. |
21 | certain features, can choose which one suits them or their project the best. |
| 22 | |
22 | |
| 23 | In addition, there are quite a few projects that should be Gentoo hosted, but |
23 | In addition, there are quite a few projects that should be Gentoo hosted, but |
| 24 | are hosted elsewhere due to the fact that Subversion is not currently offered. |
24 | are hosted elsewhere due to the fact that Subversion is not currently offered. |
| 25 | Examples include the app-vim/gentoo-syntax package ([1]_), and |
25 | Examples include the app-vim/gentoo-syntax package ([1]_), and |
| 26 | app-shells/bash-completion-config ([2]_). |
26 | app-shells/gentoo-bashcomp ([2]_). |
| 27 | |
27 | |
| 28 | Subversion has many advantages over CVS, including changesets, directory |
28 | Subversion has many advantages over CVS, including changesets, directory |
| 29 | versioning, atomic commits, versioned metadata, and more efficient branching |
29 | versioning, atomic commits, versioned metadata, and more efficient branching |
| 30 | and tagging ([3]_). Despite these advantages, many developers feel that |
30 | and tagging ([3]_). Despite these advantages, many developers feel that |
| 31 | Subversion is not yet ready for the main tree due to scaling issues. |
31 | Subversion is not yet ready for the main tree due to scaling issues. |
| … | |
… | |
| 33 | Specification |
33 | Specification |
| 34 | ============= |
34 | ============= |
| 35 | |
35 | |
| 36 | The following steps describe, in detail, the process of setting up the |
36 | The following steps describe, in detail, the process of setting up the |
| 37 | Subversion svnserve daemon (over SSH) and creating new repositories. |
37 | Subversion svnserve daemon (over SSH) and creating new repositories. |
| 38 | Information is already available for converting Gentoo CVS repositories ([4]_) |
38 | |
|
|
39 | One repository should be created per project. Reasons for this include easier |
|
|
40 | control over who has access, performance (checking out one big repository |
|
|
41 | takes many times longer), ease-of-use (branching and merging are more difficult |
|
|
42 | with one big repository), and meaningful revision numbers (since Subversion |
|
|
43 | uses repository-global revision numbers, revision numbers for project A will |
|
|
44 | increase on every commit even if no changes are made to project A). |
|
|
45 | |
|
|
46 | For preexisting CVS repositories, instructions on converting ([4]_) are |
| 39 | in addition to the cvs2svn documentation itself ([5]_). |
47 | already available in addition to the cvs2svn documentation itself ([5]_). |
| 40 | |
48 | |
| 41 | 1. Install dev-util/subversion:: |
49 | 1. Install dev-util/subversion:: |
| 42 | |
50 | |
| 43 | $ emerge subversion |
51 | $ emerge subversion |
| 44 | |
52 | |
| … | |
… | |
| 76 | |
84 | |
| 77 | $ mkdir -p /var/svnroot/conf |
85 | $ mkdir -p /var/svnroot/conf |
| 78 | |
86 | |
| 79 | 7. To create new repositories, simply run:: |
87 | 7. To create new repositories, simply run:: |
| 80 | |
88 | |
| 81 | $ svnadmin create /var/svnroot/<repos> |
89 | $ svnadmin create --fs-type fsfs /var/svnroot/<repos> |
| 82 | |
90 | |
| 83 | 8. Make sure newly created/converted repositories have correct permissions. Of course, Infra might want to do this differently:: |
91 | 8. Make sure newly created/converted repositories have correct permissions. Of course, Infra might want to do this differently:: |
| 84 | |
92 | |
| 85 | $ chown -Rf svn:users /var/svnroot/<repos> |
93 | $ chown -Rf svn:users /var/svnroot/<repos> |
| 86 | $ chmod -Rf 775 /var/svnroot/<repos> |
94 | $ chmod -Rf 775 /var/svnroot/<repos> |
| … | |
… | |
| 100 | References |
108 | References |
| 101 | ========== |
109 | ========== |
| 102 | |
110 | |
| 103 | .. [1] app-vim/gentoo-syntax |
111 | .. [1] app-vim/gentoo-syntax |
| 104 | http://developer.berlios.de/projects/gentoo-syntax/ |
112 | http://developer.berlios.de/projects/gentoo-syntax/ |
| 105 | .. [2] app-shells/bash-completion-config |
113 | .. [2] app-shells/gentoo-bashcomp |
| 106 | http://developer.berlios.de/projects/bashcomp-config/ |
114 | http://developer.berlios.de/projects/gentoo-bashcomp/ |
| 107 | .. [3] Version Control with Subversion |
115 | .. [3] Version Control with Subversion |
| 108 | http://svnbook.red-bean.com/en/1.0/ch01s03.html |
116 | http://svnbook.red-bean.com/en/1.0/ch01s03.html |
| 109 | .. [4] Migration of Gentoo Repositories from CVS to Subversion |
117 | .. [4] Migration of Gentoo Repositories from CVS to Subversion |
| 110 | http://dev.gentoo.org/~trapni/CVS2SVN.MIGRATION |
118 | http://dev.gentoo.org/~trapni/CVS2SVN.MIGRATION |
| 111 | .. [5] cvs2svn Documentation |
119 | .. [5] cvs2svn Documentation |