* ReaderWriterLock.cs: Changed some methods to private.
[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.  We only support SSH2 at this point.
40
41 * Policies
42
43         It is necessary that everyone with CVS commit access respect and
44         adhere to the following rules. If you ask for and are granted CVS
45         access, you are agreeing to follow these policies.
46         
47 ** Code License
48
49         If you are about to commit code to a module, the code that is
50         being committed should be released under the same license as
51         the code that the module has.
52
53         Check the license if you are unsure, but it is basically:
54         class libraries X11; compiler and tools: GPL; runtime: LGPL.
55
56         If in doubt, check with the maintainers of the module, or send
57         mail to mono-hackers-list@ximian.com.
58
59 ** Changing code
60
61         Even if you have CVS commit access, that doesn't mean you can change 
62         code at will in any directory or module. Directories and Namespaces 
63         have a sort of unofficial ownership. If you are not the owner of a 
64         piece of code and you want to make changes/fixes to it, there are two 
65         cases.
66         1) The change is a typo fix or a one-liner build or trivial fix. In 
67         this case almost anyone can commit (always remembering to add the 
68         proper changelog entry to explain the change). We say "almost anyone",
69         because changes to certain directories almost always should be reviewed
70         first. Such as changes to core stuff: corlib/System, System.Collections,
71         mini/, metadata/, System.IO.
72
73         2) The change is larger. In this case the patch *must* be sent to
74         mono-devel-list for review by the owner of the code and by the other
75         hackers. Always submit such patches to the list or bugzilla, although
76         you may put the owner of the code in the CC header. Hackers come and go.
77         Mailing a patch to only a personal address is a good way to get the
78         patch forgotten and missed. Plus, getting the patches reviewed as well
79         as reviewing them, is a good thing, so try to get used to it.
80
81         Note: If the patch is an addition of code and doesn't change any of the
82         existing code, the rules are slightly relaxed: there is more freedom
83         in committing such changes, if they don't interfere with the existing
84         codebase.
85
86 ** Owning Code
87
88         Now, how do you get to be the owner of a chunk of code? The answer is
89         simple. You wrote the code, so you're the unofficial owner. There is 
90         also another way. After sending a few patches for the code, the
91         owner (or the core developers of mono, if the owner somehow disappeared)
92         trusts you and tells you you're free to commit without getting his
93         review first.
94
95
96         Here is a (partial) list of namespaces/directories with their owners:
97         <ul>
98         <li>Debugger module and debug code in mono: martin
99         <li>mcs compiler: miguel, martin, ravi
100         <li>Reflection/Reflection.Emit: lupus, zoltan
101         <li>IO-layer: dick
102         <li>mini: lupus, dietmar
103         <li>test suite: nickd (though anyone should feel free to add test cases)
104         <li>System.IO: dick, ville
105         <li>security stuff: spouliot
106         <li>ilasm: jackson
107         <li>System.Web and related: gonzalo
108         <li>System.Xml: eno, piers
109         <li>Remoting: dietmar, lluis
110         <li>interop/marshal: dietmar
111         <li>threads: dick
112         </ul>
113
114         If you are the owner of a piece of code, feel free to commit code, and 
115         delegate the work to others. 
116
117         But, if you're not the owner of the code, committing a rewrite without
118         getting a review first is not good cvsitizenship (especially when the
119         rewrite claimed to fix bugs, but not a single regression test has been
120         added to the suite).
121
122 ** Commit Rules
123
124         Once you know you can commit a patch (because of the rules above) there
125         are a few other small rules to follow:
126         <ul>
127         <li>Always add a changelog entry with a meaningful explanation
128         <li>If you fix a bug, add a regression test for it in the regression
129         suite
130         <li>Don't commit unrelated changes together with a fix: do fine-grained
131         commits
132         <li>Always check what you're committing: make sure you're only committing
133         what you need and make sure you don't change line endings and 
134         whitespace. Do a 'cvs diff -u' of the files you're going to commit and 
135         check the changes.
136         <li>Don't do reformatting commits, unless you're the original author of
137         the code
138         <li>When fixing bugs, don't follow the documentation blindly, it may 
139         well be wrong. Test the behavior on the MS runtime or ask on the list 
140         for discussion if unsure. Don't be afraid of having your changes
141         reviewed.
142         <li>Never remove copyright notices from the code
143         <li>Never remove licensing info from code
144         <li>Never commit code you didn't write yourself or code that doesn't
145         have a suitable license
146         <li>Follow the style conventions
147         <li>Keep an eye on performance considerations, especially for code in
148         core classes, ask on the list for guidance
149         <li>Do a regression test run and a bootstrapping build if making changes
150         to core functionality before committing. Do not commit code that would 
151         break the compile, because that wastes everybody's time.  Two things 
152         are important in this step: trying to build your sources and making 
153         sure that you add all the new files before you do a commit.
154         </ul>
155
156         Also, remember to pat yourself on the back after the commit, smile and
157         think we're a step closer to a better free software world.
158
159
160 * Using CVS.
161
162         This is a small tutorial for using CVS.
163
164 ** Generating an SSH key
165
166         If you are using SSH version 2, please generate your key using:
167
168 <pre>
169         ssh-keygen -t rsa
170 </pre>
171
172         And mail <a href="mailto:miguel@ximian.com">miguel</a> the 
173         id_rsa.pub file.
174
175         If you are using SSH version 1, run:
176 <pre>
177         ssh-keygen
178 </pre>
179
180         And mail <a href="mailto:miguel@ximian.com">miguel</a> your 
181         identity.pub file.
182
183         If you are using SSH from SSH Communications Security (they offer
184         a free SSH client for personal use), you have to use OpenSSH to
185         convert your public key to the required format. You have to use 
186         OpenSSH's ssh-keygen program and write the following:
187
188 <pre>
189         ssh-keygen -i -f id_XXX.pub > my_public_key.pub
190 </pre>
191         
192         where the file id_XXX.pub is your public key file, 
193         normally located under ~/.ssh/ or ~/.ssh2/.
194         Send to <a href="mailto:miguel@ximian.com">miguel</a> the 
195         my_public_key.pub file. 
196
197         The *exact* format for this file must be:
198
199 <pre>
200         ssh-rsa XXXXX....
201 </pre>
202
203         You will need CVS and SSH.  Windows users can get both by
204         installing Cygwin (<a
205         href="http://www.cygwin.com">http://www.cygwin.com</a>)
206
207         Unix users will probably have those tools installed already.
208
209 ** Checking out the sources
210
211         To check out the sources for the first time from the
212         repository, use this command:
213
214 <pre>
215         export CVS_RSH=ssh
216         export CVSROOT=username@mono-cvs.ximian.com:/cvs/public
217         cvs -z3 co mcs mono
218 </pre>
219
220 ** Updating your sources
221
222         Every day people will be making changes, to get your latest
223         updated sources, use:
224
225 <pre>
226         cvs -z3 update -Pd mcs mono
227 </pre>
228
229         Note: The '-z3' enables compression for the whole cvs action.
230         The '-Pd' makes the update operation (P)rune directories that
231         have been deleted and get new (d)irectories added to the
232         repository.
233
234 ** Making patches
235
236         Usually you will want to make a patch to contribute, and let
237         other people review it before committing it.  To obtain such a
238         "patch", you type:
239         
240 <pre>
241         cd directory-you-want-to-diff
242         cvs -z3 diff -u > file.diff
243         mail mono-list@ximian.com < file.diff
244 </pre>
245
246 ** Committing your work
247
248         Once you get approval to commit to the CVS, or if you are
249         committing code that you are the maintainer of, you will want
250         to commit your code to CVS. 
251
252         To do this, you have to "add" any new files that you created:
253
254 <pre>
255         cvs add new-file.cs
256 </pre>
257
258         And then commit your changes to the repository:
259
260 <pre>
261         cvs commit file-1.cs file-2.cs
262 </pre>
263
264 * Using SVN
265         
266         This is a small tutorial for using SVN (subversion).
267         For a more complete tutorial on subversion, look at
268         <a href="http://svnbook.red-bean.com/">the svn book</a>
269         or <a href="http://subversion.tigris.org">the svn homepage</a>
270
271 ** Generating a key
272
273         Follow the cvs instructions above.
274
275 ** Checking out the sources
276
277         To checkout the sources for the first time use the command:
278
279         Note: You should be running 0.35.1 (latest) of svn before attempting
280         anything here.
281
282 <pre>
283         svn co svn+ssh://mono-cvs.ximian.com/svn/monodevelop/trunk/MonoDevelop
284 </pre>
285         
286         If you have a different username on mono-cvs and the local computer
287         you can do the following:
288
289 <pre>
290         svn co svn+ssh://username@mono-cvs.ximian.com/svn/monodevelop/trunk/MonoDevelop
291 </pre>
292
293         before checking out.
294
295 ** Updating your sources
296
297         You can update your repository to the latest copy of MonoDevelop by
298         running the following command:
299
300 <pre>
301         svn up
302 </pre>
303
304         from inside your repository.
305
306 ** Committing your work
307
308         Before you commit anything, you should first update to the latest
309         sources by following the updating directions. After you are up to date
310         you need to run a:
311
312 <pre>
313         svn add filename
314 </pre>
315
316         for every file that you have created. You can get a list of these files
317         by running:
318
319 <pre>
320         svn status
321 </pre>
322
323         After all the files are added, run:
324
325 <pre>
326         svn commit
327 </pre>
328
329         to commit your changes.
330
331 ** For more information
332
333         Look at the MonoDevelop website (coming soon)
334
335 * Keeping track of changes.
336
337         We provide two e-mail based mechanisms to keep track of
338         changes to the code base:
339         
340         <ul>
341                 * <a href="mailto:mono-patches-request@ximian.com">
342                   mono-patches@ximian.com</a>: This mailing list receives
343                   in patch form all the changes that are being made to the
344                   CVS.
345
346                 * <a href="mailto:mono-cvs-list-request@ximian.com">
347                   mono-cvs-list@ximian.com</a>: This mailing list only
348                   receives the CVS commit logs with a list of files
349                   modified.
350         </ul>
351
352         We hope to offer LXR and Bonsai in the future as well.
353
354         To subscribe, send an email message to
355         mono-cvs-list-request@ximian.com and in the body of the
356         message put `subscribe'.
357
358         This will send you an email message every time a change is
359         made to the CVS repository, together with the information that
360         the author of the changes submitted.
361
362         You might also want to track the live changes, subscribe to
363         the <a
364         href="mailto:mono-patches-request@ximian.com">mono-patches@ximian.com</a>
365         to receive the patches as they are checked into CVS.