ccvs 11 KB

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