1 | This file contains a description of the process developers should go |
---|
2 | through to get changes into the source tree. Although it discusses |
---|
3 | the use of CVS, it is not a CVS tutorial; read the CVS info pages |
---|
4 | (available in M-x info in emacs on Athena) for a general introduction |
---|
5 | to CVS. Areas covered in this file are: |
---|
6 | |
---|
7 | Checking out a working directory |
---|
8 | Preparing changes for review |
---|
9 | Reviewing changes |
---|
10 | Early checkins |
---|
11 | Updating third-party sources |
---|
12 | |
---|
13 | You should use cvs from the gnu locker with the source repository. |
---|
14 | People without write access to the repository can use "cvs -u" (a |
---|
15 | local modification to CVS) to access the repository without making |
---|
16 | read locks. If you do not have write access to the repository and you |
---|
17 | want to submit a change, follow the guidelines below up and including |
---|
18 | sending mail to source-reviewers, and note in your mail that your |
---|
19 | reviewer should check in the change because you cannot do so. |
---|
20 | |
---|
21 | Checking out a working directory |
---|
22 | -------------------------------- |
---|
23 | |
---|
24 | Set CVSROOT to "/afs/dev.mit.edu/source/repository" before trying to |
---|
25 | check out a working directory. |
---|
26 | |
---|
27 | The entire source tree is very large. You can check it out with "cvs |
---|
28 | co all", but in almost all cases this would be a big waste of space. |
---|
29 | Simply check out a subdirectory of the source tree with a command like |
---|
30 | "cvs co athena/bin/olc". |
---|
31 | |
---|
32 | CVS knows nothing about AFS permissions, so all directories created |
---|
33 | will have the same permissions as their parent. It is generally |
---|
34 | safest to do your checkouts in a private area of the filesystem. |
---|
35 | |
---|
36 | Preparing changes for review |
---|
37 | ---------------------------- |
---|
38 | |
---|
39 | Changes to the doc hierarchy do not typically need to be reviewed; |
---|
40 | notification is typically good enough, since no software will break as |
---|
41 | a result of changes to the source tree documentation. |
---|
42 | |
---|
43 | For changes to other parts of the tree, you should perform the |
---|
44 | following steps while preparing your changes for review: |
---|
45 | |
---|
46 | 1. Do a "cvs update" in your working directory to merge in |
---|
47 | changes other people may have made. (You can do "cvs -n |
---|
48 | update" if you want to see what needs to be merged in |
---|
49 | without actually doing the merge.) |
---|
50 | |
---|
51 | 2. Be sure to test your changes. |
---|
52 | |
---|
53 | 3. Use "cvs diff -c -N" piped to a file to prepare your |
---|
54 | changes. (Do not cut and paste diffs from an xterm; your |
---|
55 | tabs will be converted to spaces.) |
---|
56 | |
---|
57 | 4. Look over your diffs. Make sure you haven't been sloppy |
---|
58 | about spacing, punctuation, and naming, and that you have |
---|
59 | tried to conform to the guidelines in the file "standards" |
---|
60 | in this directory |
---|
61 | |
---|
62 | 5. Send your diffs, along with a clear description of the |
---|
63 | change you are making, to source-reviewers@mit.edu. |
---|
64 | |
---|
65 | Ideally, at least one person will respond to your mail within a day or |
---|
66 | two, either expressing concerns or signing onto your change. You |
---|
67 | should wait at least one full working day for people to voice their |
---|
68 | objections. If you receive objections or requests for further |
---|
69 | information from staff members, you must either satisfy those concerns |
---|
70 | or resolve the issue with the release team before committing your |
---|
71 | change. If after one day, you have received no objections and someone |
---|
72 | has signed onto your change, you may commit your change. You may also |
---|
73 | commit your change if no one objects within five days, even if no one |
---|
74 | has signed onto it. |
---|
75 | |
---|
76 | When you check in your change, be sure to include a clear log message. |
---|
77 | Explain why you are making the change you are making if it's not |
---|
78 | obvious. |
---|
79 | |
---|
80 | Reviewing changes |
---|
81 | ----------------- |
---|
82 | |
---|
83 | Sometimes you can review a change by looking at the patch. Other |
---|
84 | times you will want to check out a tree and apply the patch, with |
---|
85 | "patch -E -p < message-file" if you have the mail message in a file, |
---|
86 | or "dsgrep -p -t trn-number source-reviewers | patch -E -p" if what |
---|
87 | you have is a transaction number in the source-reviewers discuss |
---|
88 | meeting. |
---|
89 | |
---|
90 | When reviewing a change, be sure to make your position on the change |
---|
91 | clear. Say "I object to this change" if you are not merely voicing a |
---|
92 | concern, or "I would like these questions answered before this change |
---|
93 | is committed" if you have asked questions and are not merely curious. |
---|
94 | When your objections are responded to, you should in turn respond in a |
---|
95 | timely fashion saying whether your objections have been satisfied or |
---|
96 | not. If the dispute appears intractable, say so, so that the issue |
---|
97 | may be brought up before the release team. |
---|
98 | |
---|
99 | If you have reviewed a change carefully and have found nothing wrong |
---|
100 | with it, and no one else has responded to the change, you should sign |
---|
101 | onto the change rather than remaining silent. You are encouraged to |
---|
102 | try out changes before signing onto them, but in some cases the |
---|
103 | inconvenience outweights the benefit of this consideration. |
---|
104 | |
---|
105 | Early checkins |
---|
106 | -------------- |
---|
107 | |
---|
108 | In some cases it may be appropriate to check in a change in advance of |
---|
109 | the normal review period. The following should be true of those |
---|
110 | cases: |
---|
111 | |
---|
112 | 1. The change is obvious and noncontroversial, such as a fix |
---|
113 | for a syntax error. |
---|
114 | |
---|
115 | 2. The problem being fixed is causing an immediate difficulty, |
---|
116 | usually "I'm doing a build of /mit/source and it blows out |
---|
117 | at this point." |
---|
118 | |
---|
119 | The change should still be sent to source-reviewers with a note about |
---|
120 | the early checkin. If the immediate difficulty is "the wash is broken |
---|
121 | and I want the next wash to work," then it is good to get a positive |
---|
122 | review of the change before checking it in. Close to a release cycle, |
---|
123 | though, that can be ignored. |
---|
124 | |
---|
125 | Updating third-party sources |
---|
126 | ---------------------------- |
---|
127 | |
---|
128 | For modules in the third hierarchy, we generally use the "cvs import" |
---|
129 | command to track development from outside. (To find out if this |
---|
130 | applies to a given module, to a "cvs log" of a file in the tree; if |
---|
131 | you see a revision 1.1.1.1, then we're using cvs import.) Do not |
---|
132 | check in a new outside version of a third-party package onto the |
---|
133 | mainline if it was originally imported with cvs import; it's very |
---|
134 | difficult to recover from that particular mistake. Do, however, check |
---|
135 | local changes you made yourself onto the mainline. Always refer to |
---|
136 | doc/third-party before doing an import to see if there are any special |
---|
137 | notes on the module you are importing. |
---|
138 | |
---|
139 | Generally, you should only import "clean" third-party source trees |
---|
140 | with no modifications. If you absolutely need to make changes to the |
---|
141 | source tree before importing it (check with a release engineer before |
---|
142 | deciding that you have to), make a note in the doc/third-party file so |
---|
143 | that people doing future imports will know about it. |
---|
144 | |
---|
145 | If you add a new piece of third-party software or import a new |
---|
146 | version, you should look over doc/third-party and see if any notes |
---|
147 | should be added or modified. This file is instrumental in locating |
---|
148 | new versions of software. |
---|