comparison DOCS/tech/cvs-howto.txt @ 13288:78d00bbba153

CVS policy updated as discussed on dev-eng.
author diego
date Wed, 08 Sep 2004 15:31:47 +0000
parents 678af17ca11e
children 384ae6f896cf
comparison
equal deleted inserted replaced
13287:1f43ed797593 13288:78d00bbba153
47 Replace LOGIN with your login name. 47 Replace LOGIN with your login name.
48 NOTE: cvs -d:pserver: mode doesn't allow writing, even with password! 48 NOTE: cvs -d:pserver: mode doesn't allow writing, even with password!
49 49
50 3. Committing changes: 50 3. Committing changes:
51 51
52 cvs -z3 commit -m "comment - what you changed and why" filename(s) 52 cvs -z3 update -dPA
53 cvs -z3 commit filename(s)
53 54
54 Do not use comments such as: "bug fix." or "files changed" or "dunno". 55 Do not use comments such as: "bug fix." or "files changed" or "dunno".
55 You don't have to include the filename in the comment, as comments are linked 56 You don't have to include the filename in the comment, as comments are linked
56 to files. If you have made several independent changes, commit them 57 to files. If you have made several independent changes, commit them
57 separately, not at the same time. If you leave out -m at the command line you 58 separately, not at the same time. You will be prompted for a comment in an
58 will be prompted for a comment in an editor (usually vi). 59 editor (see 'cvs -e', usually vi).
59 60
60 4. Adding new files/dirs: 61 4. Adding new files/dirs:
61 62
62 cvs add filename/dirname 63 cvs add filename/dirname
64 cvs commit filename
65
66 Directories are added immediately, no commit necessary.
63 67
64 5. Removing files: 68 5. Removing files:
65 69
66 rm filename 70 rm filename
67 cvs remove filename 71 cvs remove filename
68 cvs commit -m "reason for removing this file" filename 72 cvs commit filename
69 73
70 6. Checking changes: 74 6. Checking changes:
71 75
72 cvs -z3 diff -u filename(s) 76 cvs -z3 diff -u filename(s)
73 77
74 It's recommended to check changes before committing. especially if you forget 78 Doublecheck your changes before committing to avoid trouble later on.
75 what you changed :) 79 This way you will see if your patch has debug stuff or indentation
76 This way you will see if your patch has debug stuff or indentation changes 80 changes and you can fix it before committing and triggering flames.
77 and you can fix it before committing and triggering me to use cvs-backup.
78 81
79 7. Checking changelog: 82 7. Checking changelog:
80 83
81 cvs -z3 log filename(s) 84 cvs -z3 log filename(s)
85 cvs -z3 annotate filename(s)
86
87 You may also find viewcvs, a web frontend for CVS helpful. It's often more
88 comfortable than using cvs log, cvs annotate and cvs diff. Find it here:
89 http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main
82 90
83 8. Renaming/moving files or content of files, removing empty directories: 91 8. Renaming/moving files or content of files, removing empty directories:
84 92
85 You CANNOT do that. Ask the CVS server admin (A'rpi) to do it! 93 You CANNOT do that. Ask the CVS server admin (A'rpi) to do it!
86 Do NOT remove & re-add a file - it will kill the changelog!!!! 94 Do NOT remove & readd a file - it will kill the changelog!!!!
87 95
88 Don't do a lot of cut'n'paste from one file to another without a very good 96 Don't do a lot of cut'n'paste from one file to another without a very good
89 reason and discuss it on the mplayer-dev-eng mailing list first. It will make 97 reason and discuss it on the mplayer-dev-eng mailing list first. It will make
90 those changes untraceable! 98 those changes untraceable!
91 99
94 102
95 9. Reverting broken commits 103 9. Reverting broken commits
96 104
97 In case you committed something really broken and wish to undo it completely, 105 In case you committed something really broken and wish to undo it completely,
98 you can use the 'cvs admin -o' command, which removes entries from the 106 you can use the 'cvs admin -o' command, which removes entries from the
99 revision history of a file. For the corner case that you remove the last 107 revision history of a file. It does not undo the changes related to that
100 revision this amounts to reverting a commit. 108 revision, but for the corner case that you remove the last revision (and only
109 then!) this amounts to reverting a commit.
101 110
102 Assuming that 1.123 is the last revision 111 Assuming that 1.123 is the last revision
103 112
104 cvs -z3 admin -o1.123 filename 113 cvs -z3 admin -o1.123 filename
105 114
106 will remove revision 1.123, thus reverting the file back to revision 1.122. 115 will remove revision 1.123, thus reverting the file back to revision 1.122.
107 116
108 ONLY use this command to delete the LAST revision of a file. Removing other 117 ONLY use this command to delete the LAST revision of a file. Removing other
109 revisions will NOT undo the changes from that revision in the last revision 118 revisions will NOT undo the changes connected to that revision, so the last
110 and leave holes in the revision history. 119 revision will remain unmodified, only revision history will be lost and
120 holes left in the revision numbering.
111 121
112 122
113 Contact A'rpi <arpi@thot.banki.hu> if you have technical problems with the CVS 123 Contact A'rpi <arpi@thot.banki.hu> if you have technical problems with the CVS
114 server. 124 server.
115 125
116 126
117 127
118 II. POLICY / RULES: 128 II. POLICY / RULES:
119 =================== 129 ===================
120 130
121 1. You shouldn't commit code which breaks MPlayer! (Meaning unfinished but 131 1. You must not commit code which breaks MPlayer! (Meaning unfinished but
122 enabled code which breaks compilation or compiles but does not work.) 132 enabled code which breaks compilation or compiles but does not work.)
133 You can commit unfinished stuff (for testing etc), but it must be disabled
134 (#ifdef etc) by default so it does not interfere with other developers'
135 work.
123 136
124 2. You don't have to over-test things. If it works for you, and you think it 137 2. You don't have to over-test things. If it works for you, and you think it
125 should work for others, too, then commit. If your code has problems 138 should work for others, too, then commit. If your code has problems
126 (portability, exploits compiler bugs, unusual environment etc) they will be 139 (portability, exploits compiler bugs, unusual environment etc) they will be
127 reported and eventually fixed. 140 reported and eventually fixed.
128 141
129 3. You can commit unfinished stuff (for testing etc), but it must be disabled 142 3. Do not commit unrelated changes together, split them into self-contained
130 (#ifdef etc) by default. 143 pieces.
131 144
132 4. Do not change behavior of the program (renaming options etc) without 145 4. Do not change behavior of the program (renaming options etc) without
133 discussing it first at the mplayer-dev-eng mailing list. Do not remove 146 first discussing it on the mplayer-dev-eng mailing list. Do not remove
134 functionality from the code. Just improve! 147 functionality from the code. Just improve!
135 Do not commit changes to the build system (Makefiles, configure script) 148
136 which change behaviour, defaults etc, without asking (and your change being 149 5. Do not commit changes to the build system (Makefiles, configure script)
137 accepted) on the mplayer-dev-eng mailing list first. The same applies to 150 which change behaviour, defaults etc, without asking first. The same
138 compiler warning fixes and trivial looking fixes. We usually have a reason 151 applies to compiler warning fixes, trivial looking fixes and to code
139 for doing things the way we do. Send them as patches to the mailing list, 152 maintained by other developers. We usually have a reason for doing things
140 and if the code maintainers say OK, you may commit. This does not apply to 153 the way we do. Send your changes as patches to the mplayer-dev-eng mailing
141 files written and/or maintained by you. 154 list, and if the code maintainers say OK, you may commit. This does not
142 155 apply to files you wrote and/or maintain.
143 5. We refuse source indentation and other cosmetic changes, such commits will 156
144 be rejected and removed. Every developer has his own indentation style, you 157 6. We refuse source indentation and other cosmetic changes if they are mixed
145 should not change it. Of course if you (re)write something, you can use your 158 with functional changes, such commits will be rejected and removed. Every
146 own style... (Many projects force a given indentation style - we don't.) 159 developer has his own indentation style, you should not change it. Of course
160 if you (re)write something, you can use your own style... (Many projects
161 force a given indentation style - we don't.) If you really need to make
162 indentation changes (try to avoid this), separate them strictly from real
163 changes.
147 164
148 NOTE: If you had to put if(){ .. } over a large (> 5 lines) chunk of code, 165 NOTE: If you had to put if(){ .. } over a large (> 5 lines) chunk of code,
149 do NOT change the indentation of the inner part (move it right)! 166 do NOT change the indentation of the inner part (don't move it to the right)!
150 167
151 6. Always fill out the comment at committing (-m switch of CVS, or in the 168 7. Always fill out the commit log message. Describe in a few lines what you
152 editor if you left out -m). Describe in a few lines (usually one line is 169 changed and why. You can refer to mailing list postings if you fix a
153 enough) what you changed and why. You can refer to mailing list postings if 170 particular bug. Comments such as "fixed!" or "Changed it." are unacceptable.
154 you fix a particular bug. Comments such as "fixed!" or "Changed it." are not 171
155 acceptable. 172 8. If you apply a patch by someone else, include the name and email address in
156 173 the CVS log message. Since the mplayer-cvslog mailing list is publicly
157 7. If you apply a patch by someone else, include his name and email address in 174 archived you should add some spam protection to the email address. Send an
158 the CVS comment! Do NOT commit patches for other developer's code (code not 175 answer to mplayer-dev-eng (or wherever you got the patch from) saying that
159 maintained by you) without his permission! If he didn't commit - he probably 176 you applied the patch.
160 has a reason! Send an answer to mplayer-dev-eng (or wherever you got the 177
161 patch from) saying that you applied it. 178 9. Do NOT commit to code actively maintained by others without permission. Send
162 179 a patch to mplayer-dev-eng instead.
163 8. A'rpi developed something called cvs-backup. It archives the CVS repository
164 after each commit - so commits can be reversed (without messing up the
165 changelog) if they are bad. If you think your bug fix or other change was
166 bad and unneeded, ask A'rpi to reverse it instead of committing the previous
167 version!
168
169 9. You will have write access to DOCS/. This used to be different to avoid
170 breaking docs or getting translations or the homepage desynced. If you are
171 unsure about this, send a patch to mplayer-dev-eng or even better to
172 mplayer-docs, the documentation maintainers will review and commit your
173 stuff.
174 180
175 10. Subscribe to the mplayer-cvslog mailing list. The diffs of all CVS commits 181 10. Subscribe to the mplayer-cvslog mailing list. The diffs of all CVS commits
176 are sent there and reviewed by all the other developers. Bugs and possible 182 are sent there and reviewed by all the other developers. Bugs and possible
177 improvements or general questions regarding commits are discussed there. We 183 improvements or general questions regarding commits are discussed there. We
178 expect you to react if problems with your code are uncovered. 184 expect you to react if problems with your code are uncovered.
185
186 11. Update the documentation if you change behavior or add features. If you are
187 unsure how best to do this, send a patch to mplayer-docs, the documentation
188 maintainers will review and commit your stuff.
189
190 12. Revert a commit ONLY in case of a big blunder like committing something not
191 intended to be committed or committing a wrong file, the wrong version of a
192 patch, cosmetics or broken code and you are going to recommit the right
193 thing immediately.
194
195 Never revert changes made a long time ago or buggy code. Fix it in the
196 normal way instead.
179 197
180 Also read DOCS/tech/patches.txt !!!! 198 Also read DOCS/tech/patches.txt !!!!
181 199
182 We think our rules are not too hard. If you have comments, contact us. 200 We think our rules are not too hard. If you have comments, contact us.
183 201