flush
[mono.git] / web / ccvs
1 * CVS Access
2
3         Here we describe how one obtains commit access to the Mono CVS
4         repository and the responsibilities that come with that access
5         privilege.
6
7         These only apply to the Mono CVS repository, and not to the <a
8         href="http://forge.novell.com/modules/xfmod/community/?monocomm">Mono
9         Community</a> repositories at Novell Forge.
10
11 ** What is CVS?
12
13         Briefly, CVS is a system tool used to store and maintain files and 
14         a history of their changes over time. The Mono source code and related 
15         files are kept on a CVS server at Ximian.
16
17 ** What Access?
18
19         We mean "commit" access. This is the privilege to make permanent
20         changes to the Mono source code and related files. You need an account
21         created by the CVS server administrator in order to commit changes to
22         the files on that server.
23
24 ** How Does One Obtain Access?
25
26         Any active Mono developer can get a CVS account. Normally one is
27         considered an 'active' developer after sending several patches to the 
28         mailing lists and/or bugzilla for review.
29
30         If you are not a developer, but want to access the latest sources, 
31         please see the <a href="anoncvs.html">AnonCVS</a>
32         instructions.  If you are not a direct contributor to Mono,
33         but want to host your .NET or Mono-based project, you can use
34         <a href="forge.html">Novell Forge</a>.
35
36
37         If you feel you are ready for a CVS account send an e-mail to
38         <a href="mailto:miguel@ximian.com">miguel</a> with your public OpenSSH 
39         key for this purpose.  Please specify if the key was generated with SSH
40         version 1 or version 2. Detailed instructions are below.
41
42 * Policies
43
44         It is necessary that everyone with CVS commit access respect and
45         adhere to the following rules. If you ask for and are granted CVS
46         access, you are agreeing to follow these policies.
47         
48 ** Code License
49
50         If you are about to commit code to a module, the code that is
51         being committed should be released under the same license as
52         the code that the module has.
53
54         Check the license if you are unsure, but it is basically:
55         class libraries X11; compiler and tools: GPL; runtime: LGPL.
56
57         If in doubt, check with the maintainers of the module, or send
58         mail to mono-hackers-list@ximian.com.
59
60 ** Changing code
61
62         Even if you have CVS commit access, that doesn't mean you can change 
63         code at will in any directory or module. Directories and Namespaces 
64         have a sort of unofficial ownership. If you are not the owner of a 
65         piece of code and you want to make changes/fixes to it, there are two 
66         cases.
67         1) The change is a typo fix or a one-liner build or trivial fix. In 
68         this case almost anyone can commit (always remembering to add the 
69         proper changelog entry to explain the change). We say "almost anyone",
70         because changes to certain directories almost always should be reviewed
71         first. Such as changes to core stuff: corlib/System, System.Collections,
72         mini/, metadata/, System.IO.
73
74         2) The change is larger. In this case the patch *must* be sent to
75         mono-devel-list for review by the owner of the code and by the other
76         hackers. Always submit such patches to the list or bugzilla, although
77         you may put the owner of the code in the CC header. Hackers come and go.
78         Mailing a patch to only a personal address is a good way to get the
79         patch forgotten and missed. Plus, getting the patches reviewed as well
80         as reviewing them, is a good thing, so try to get used to it.
81
82         Note: If the patch is an addition of code and doesn't change any of the
83         existing code, the rules are slightly relaxed: there is more freedom
84         in committing such changes, if they don't interfere with the existing
85         codebase.
86
87 ** Owning Code
88
89         Now, how do you get to be the owner of a chunk of code? The answer is
90         simple. You wrote the code, so you're the unofficial owner. There is 
91         also another way. After sending a few patches for the code, the
92         owner (or the core developers of mono, if the owner somehow disappeared)
93         trusts you and tells you you're free to commit without getting his
94         review first.
95
96
97         Here is a (partial) list of namespaces/directories with their owners:
98         <ul>
99         <li>Debugger module and debug code in mono: martin
100         <li>mcs compiler: miguel, martin, ravi
101         <li>Reflection/Reflection.Emit: lupus, zoltan
102         <li>IO-layer: dick
103         <li>mini: lupus, dietmar
104         <li>test suite: nickd (though anyone should feel free to add test cases)
105         <li>System.IO: dick, ville
106         <li>security stuff: spouliot
107         <li>ilasm: jackson
108         <li>System.Web and related: gonzalo
109         <li>System.Xml: eno, piers
110         <li>Remoting: dietmar, lluis
111         <li>interop/marshal: dietmar
112         <li>threads: dick
113         </ul>
114
115         If you are the owner of a piece of code, feel free to commit code, and 
116         delegate the work to others. 
117
118         But, if you're not the owner of the code, committing a rewrite without
119         getting a review first is not good cvsitizenship (especially when the
120         rewrite claimed to fix bugs, but not a single regression test has been
121         added to the suite).
122
123 ** Commit Rules
124
125         Once you know you can commit a patch (because of the rules above) there
126         are a few other small rules to follow:
127         <ul>
128         <li>Always add a changelog entry with a meaningful explanation
129         <li>If you fix a bug, add a regression test for it in the regression
130         suite
131         <li>Don't commit unrelated changes together with a fix: do fine-grained
132         commits
133         <li>Always check what you're committing: make sure you're only committing
134         what you need and make sure you don't change line endings and 
135         whitespace. Do a 'cvs diff -u' of the files you're going to commit and 
136         check the changes.
137         <li>Don't do reformatting commits, unless you're the original author of
138         the code
139         <li>When fixing bugs, don't follow the documentation blindly, it may 
140         well be wrong. Test the behavior on the MS runtime or ask on the list 
141         for discussion if unsure. Don't be afraid of having your changes
142         reviewed.
143         <li>Never remove copyright notices from the code
144         <li>Never remove licensing info from code
145         <li>Never commit code you didn't write yourself or code that doesn't
146         have a suitable license
147         <li>Follow the style conventions
148         <li>Keep an eye on performance considerations, especially for code in
149         core classes, ask on the list for guidance
150         <li>Do a regression test run and a bootstrapping build if making changes
151         to core functionality before committing. Do not commit code that would 
152         break the compile, because that wastes everybody's time.  Two things 
153         are important in this step: trying to build your sources and making 
154         sure that you add all the new files before you do a commit.
155         </ul>
156
157         Also, remember to pat yourself on the back after the commit, smile and
158         think we're a step closer to a better free software world.
159
160
161 * Using CVS.
162
163         This is a small tutorial for using CVS.
164
165 ** Generating an SSH key
166
167         If you are using SSH version 2, please generate your key using:
168
169 <pre>
170         ssh-keygen -t rsa
171 </pre>
172
173         And mail <a href="mailto:miguel@ximian.com">miguel</a> the 
174         id_rsa.pub file.
175
176         If you are using SSH version 1, run:
177 <pre>
178         ssh-keygen
179 </pre>
180
181         And mail <a href="mailto:miguel@ximian.com">miguel</a> your 
182         identity.pub file.
183
184         If you are using SSH from SSH Communications Security (they offer
185         a free SSH client for personal use), you have to use OpenSSH to
186         convert your public key to the required format. You have to use 
187         OpenSSH's ssh-keygen program and write the following:
188
189 <pre>
190         ssh-keygen -i -f id_XXX.pub > my_public_key.pub
191 </pre>
192         
193         where the file id_XXX.pub is your public key file, 
194         normally located under ~/.ssh/ or ~/.ssh2/.
195         Send to <a href="mailto:miguel@ximian.com">miguel</a> the 
196         my_public_key.pub file. 
197
198         The *exact* format for this file must be:
199
200 <pre>
201         ssh-rsa XXXXX....
202 </pre>
203
204         You will need CVS and SSH.  Windows users can get both by
205         installing Cygwin (<a
206         href="http://www.cygwin.com">http://www.cygwin.com</a>)
207
208         Unix users will probably have those tools installed already.
209
210 ** Checking out the sources
211
212         To check out the sources for the first time from the
213         repository, use this command:
214
215 <pre>
216         export CVS_RSH=ssh
217         export CVSROOT=username@mono-cvs.ximian.com:/cvs/public
218         cvs -z3 co mcs mono
219 </pre>
220
221 ** Updating your sources
222
223         Every day people will be making changes, to get your latest
224         updated sources, use:
225
226 <pre>
227         cvs -z3 update -Pd mcs mono
228 </pre>
229
230         Note: The '-z3' enables compression for the whole cvs action.
231         The '-Pd' makes the update operation (P)rune directories that
232         have been deleted and get new (d)irectories added to the
233         repository.
234
235 ** Making patches
236
237         Usually you will want to make a patch to contribute, and let
238         other people review it before committing it.  To obtain such a
239         "patch", you type:
240         
241 <pre>
242         cd directory-you-want-to-diff
243         cvs -z3 diff -u > file.diff
244         mail mono-list@ximian.com < file.diff
245 </pre>
246
247 ** Committing your work
248
249         Once you get approval to commit to the CVS, or if you are
250         committing code that you are the maintainer of, you will want
251         to commit your code to CVS. 
252
253         To do this, you have to "add" any new files that you created:
254
255 <pre>
256         cvs add new-file.cs
257 </pre>
258
259         And then commit your changes to the repository:
260
261 <pre>
262         cvs commit file-1.cs file-2.cs
263 </pre>
264
265 * Keeping track of changes.
266
267         We provide two e-mail based mechanisms to keep track of
268         changes to the code base:
269         
270         <ul>
271                 * <a href="mailto:mono-patches-request@ximian.com">
272                   mono-patches@ximian.com</a>: This mailing list receives
273                   in patch form all the changes that are being made to the
274                   CVS.
275
276                 * <a href="mailto:mono-cvs-list-request@ximian.com">
277                   mono-cvs-list@ximian.com</a>: This mailing list only
278                   receives the CVS commit logs with a list of files
279                   modified.
280         </ul>
281
282         We hope to offer LXR and Bonsai in the future as well.
283
284         To subscribe, send an email message to
285         mono-cvs-list-request@ximian.com and in the body of the
286         message put `subscribe'.
287
288         This will send you an email message every time a change is
289         made to the CVS repository, together with the information that
290         the author of the changes submitted.
291
292         You might also want to track the live changes, subscribe to
293         the <a
294         href="mailto:mono-patches-request@ximian.com">mono-patches@ximian.com</a>
295         to receive the patches as they are checked into CVS.