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