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