ccvs 13 KB

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