3 Here we describe how one obtains commit access to the CVS repository
4 and the responsibilities that come with that access privilege.
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.
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.
19 ** How Does One Obtain Access?
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.
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.
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.
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.
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.
45 Check the license if you are unsure, but it is basically:
46 class libraries X11; compiler and tools: GPL; runtime: LGPL.
48 If in doubt, check with the maintainers of the module, or send
49 mail to mono-hackers-list@ximian.com.
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
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.
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.
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
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
87 Here is a (partial) list of namespaces/directories with their owners:
89 Debugger module and debug code in mono: martin
90 mcs compiler: miguel, martin, ravi
91 Reflection/Reflection.Emit: lupus, zoltan
94 test suite: nickd (though anyone should feel free to add test cases)
95 System.IO: dick, ville
96 security stuff: spouliot
98 System.Web and related: gonzalo
99 System.Xml: eno, piers
100 Remoting: dietmar, lluis
101 interop/marshal: dietmar
104 If you are the owner of a piece of code, feel free to commit code, and
105 delegate the work to others.
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
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
119 *) Don't commit unrelated changes together with a fix: do fine-grained
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
125 *) Don't do reformatting commits, unless you're the original author of
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
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.
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.
150 This is a small tutorial for using CVS.
152 ** Generating an SSH key
154 If you are using SSH version 2, please generate your key using:
160 And mail <a href="mailto:miguel@ximian.com">miguel</a> the
163 If you are using SSH version 1, run:
168 And mail <a href="mailto:miguel@ximian.com">miguel</a> your
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:
177 ssh-keygen -i -f id_XXX.pub > my_public_key.pub
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.
185 The *exact* format for this file must be:
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>)
195 Unix users will probably have those tools installed already.
197 ** Checking out the sources
199 To check out the sources for the first time from the
200 repository, use this command:
204 export CVSROOT=username@mono-cvs.ximian.com:/cvs/public
208 ** Updating your sources
210 Every day people will be making changes, to get your latest
211 updated sources, use:
214 cvs -z3 update -Pd mcs mono
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
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
229 cd directory-you-want-to-diff
230 cvs -z3 diff -u > file.diff
231 mail mono-list@ximian.com < file.diff
234 ** Committing your work
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.
240 To do this, you have to "add" any new files that you created:
246 And then commit your changes to the repository:
249 cvs commit file-1.cs file-2.cs
252 * Keeping track of changes.
254 We provide two e-mail based mechanisms to keep track of
255 changes to the code base:
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
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
269 We hope to offer LXR and Bonsai in the future as well.
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'.
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.
279 You might also want to track the live changes, subscribe to
281 href="mailto:mono-patches-request@ximian.com">mono-patches@ximian.com</a>
282 to receive the patches as they are checked into CVS.