Mercurial > mplayer.hg
annotate DOCS/tech/cvs-howto.txt @ 18706:7fb537ba7c96
More CVS --> Subversion changes
author | ivo |
---|---|
date | Wed, 14 Jun 2006 13:10:24 +0000 |
parents | 9a731c61c870 |
children | 5b89070daa50 |
rev | line source |
---|---|
2200 | 1 |
18660 | 2 About Subversion write access: |
3 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
2200 | 4 |
18705 | 5 Before everything else, you should know how to use Subversion properly. |
6 Subversion comes with some documentation. | |
11395
5484bc13e90a
Some notes about general CVS documentation added, new 'cvs admin' section
diego
parents:
9537
diff
changeset
|
7 |
18705 | 8 svn help |
9 man svn | |
10 info svn | |
11395
5484bc13e90a
Some notes about general CVS documentation added, new 'cvs admin' section
diego
parents:
9537
diff
changeset
|
11 |
18705 | 12 are a good start. The most comprehensive manual is the book "Version Control |
13 with Subversion" by Ben Collins-Sussman, Brian W. Fitzpatrick and C. Michael | |
14 Pilato. It can be viewed online at | |
11395
5484bc13e90a
Some notes about general CVS documentation added, new 'cvs admin' section
diego
parents:
9537
diff
changeset
|
15 |
18705 | 16 http://svnbook.org/ |
11395
5484bc13e90a
Some notes about general CVS documentation added, new 'cvs admin' section
diego
parents:
9537
diff
changeset
|
17 |
18705 | 18 For more information about the Subversion project, visit |
11395
5484bc13e90a
Some notes about general CVS documentation added, new 'cvs admin' section
diego
parents:
9537
diff
changeset
|
19 |
18705 | 20 http://subversion.tigris.org/ |
11395
5484bc13e90a
Some notes about general CVS documentation added, new 'cvs admin' section
diego
parents:
9537
diff
changeset
|
21 |
5484bc13e90a
Some notes about general CVS documentation added, new 'cvs admin' section
diego
parents:
9537
diff
changeset
|
22 Consult these resources whenever you have problems, they are quite exhaustive. |
5484bc13e90a
Some notes about general CVS documentation added, new 'cvs admin' section
diego
parents:
9537
diff
changeset
|
23 What follows now are MPlayer specific guidelines. |
5484bc13e90a
Some notes about general CVS documentation added, new 'cvs admin' section
diego
parents:
9537
diff
changeset
|
24 |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
25 |
2200 | 26 I. TECH SIDE: |
27 ============= | |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
28 |
18706 | 29 1. Checking out development source tree: |
2200 | 30 |
18706 | 31 svn checkout svn://svn.mplayerhq.hu/mplayer/trunk/ |
2200 | 32 |
18706 | 33 or |
12024 | 34 |
18706 | 35 svn co svn://svn.mplayerhq.hu/mplayer/trunk/ |
12024 | 36 |
18706 | 37 2. Updating source tree to latest revision: |
38 | |
39 svn update | |
12024 | 40 |
18706 | 41 or |
12024 | 42 |
18706 | 43 svn up |
12024 | 44 |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
45 3. Committing changes: |
2200 | 46 |
18706 | 47 svn up |
48 svn commit --username USERNAME filename(s) | |
12024 | 49 |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
50 Do not use comments such as: "bug fix." or "files changed" or "dunno". |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
51 You don't have to include the filename in the comment, as comments are linked |
12099 | 52 to files. If you have made several independent changes, commit them |
13288 | 53 separately, not at the same time. You will be prompted for a comment in an |
18706 | 54 editor, which is either specified by --editor-cmd on the command line, set |
55 in your personal configuration file (~/.subversion/config) or set by one of | |
56 the following environment variables: SVN_EDITOR, VISUAL or EDITOR. When | |
57 prompted for a password, type the password you got assigned by the Subversion | |
58 server admin. By default, Subversion caches all authentication tokens. This | |
59 behaviour can be disabled by setting both 'store-passwords' and | |
60 'store-auth-creds' to "no" in ~/.subversion/config. You might need to remove | |
61 previous cache files, which are located in ~/.subversion/auth, by hand. | |
12024 | 62 |
2200 | 63 4. Adding new files/dirs: |
64 | |
18706 | 65 svn add filename/dirname |
66 svn commit filename | |
12024 | 67 |
2200 | 68 5. Removing files: |
69 | |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
70 rm filename |
18706 | 71 svn delete filename |
72 svn commit filename | |
12024 | 73 |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
74 6. Checking changes: |
12024 | 75 |
18706 | 76 svn diff filename(s) |
12024 | 77 |
13288 | 78 Doublecheck your changes before committing to avoid trouble later on. |
79 This way you will see if your patch has debug stuff or indentation | |
80 changes and you can fix it before committing and triggering flames. | |
12024 | 81 |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
82 7. Checking changelog: |
2200 | 83 |
18706 | 84 svn log filename(s) |
85 | |
86 You may also find viewvc, a web frontend for Subversion, helpful. It's often | |
87 more comfortable than using svn log and svn diff. Find it here: | |
88 http://svn.mplayerhq.hu/mplayer/trunk/ | |
13288 | 89 |
18706 | 90 8. Renaming/moving files or content of files: |
12024 | 91 |
18706 | 92 svn move source destination |
93 svn commit source destination | |
2200 | 94 |
18706 | 95 Do not move or rename files before discussing it on the mplayer-dev-eng |
96 mailing list first! | |
2200 | 97 |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
98 Don't do a lot of cut'n'paste from one file to another without a very good |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
99 reason and discuss it on the mplayer-dev-eng mailing list first. It will make |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
100 those changes untraceable! |
5415 | 101 |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
102 Such actions are useless and treated as cosmetics in 99% of cases, |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
103 so try to avoid them. |
11395
5484bc13e90a
Some notes about general CVS documentation added, new 'cvs admin' section
diego
parents:
9537
diff
changeset
|
104 |
5484bc13e90a
Some notes about general CVS documentation added, new 'cvs admin' section
diego
parents:
9537
diff
changeset
|
105 9. Reverting broken commits |
5484bc13e90a
Some notes about general CVS documentation added, new 'cvs admin' section
diego
parents:
9537
diff
changeset
|
106 |
18706 | 107 There is no Subversion equivalent of the 'cvs admin -o' command. Instead, |
108 be very careful about what you commit! If somehow you broke something, | |
109 revert the changes locally and re-commit with a proper commit message. | |
110 You may want to use 'svn cat -r<revision> filename' to inspect an older | |
111 revision. | |
15227
167085fd11af
'cvs admin -o' is dangerous and should be handled with extra care.
diego
parents:
14856
diff
changeset
|
112 |
18706 | 113 10. Checking status of source tree |
12025
124734dc7c66
Explain why 'cvs admin' should only be used on the last revision of a file.
diego
parents:
12024
diff
changeset
|
114 |
18706 | 115 svn status |
11395
5484bc13e90a
Some notes about general CVS documentation added, new 'cvs admin' section
diego
parents:
9537
diff
changeset
|
116 |
18706 | 117 This will detect all the changes you made and list what actions will be |
118 taken in case of a commit (Additions, Modifications, Deletions, et cetera). | |
11395
5484bc13e90a
Some notes about general CVS documentation added, new 'cvs admin' section
diego
parents:
9537
diff
changeset
|
119 |
18706 | 120 11. Reverting local changes |
14806
6abe4fb845ff
mphq uses ssh.com, explain RSA key generation for it.
diego
parents:
14059
diff
changeset
|
121 |
18706 | 122 svn revert filename(s) |
14806
6abe4fb845ff
mphq uses ssh.com, explain RSA key generation for it.
diego
parents:
14059
diff
changeset
|
123 |
18706 | 124 In case you made a lot of local changes to a file and want to start over |
125 with a fresh checkout of that file, you can use svn revert filename(s). | |
126 NOTE: This has nothing to do with reverting changes on the Subversion | |
127 server! It only reverts changes that were not committed yet. If you need | |
128 to revert a broken commit, see 9. | |
11395
5484bc13e90a
Some notes about general CVS documentation added, new 'cvs admin' section
diego
parents:
9537
diff
changeset
|
129 |
14856 | 130 Contact the project admin <root at mplayerhq dot hu> if you have technical |
18706 | 131 problems with the Subversion server. |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
132 |
2200 | 133 |
134 | |
135 II. POLICY / RULES: | |
136 =================== | |
137 | |
13288 | 138 1. You must not commit code which breaks MPlayer! (Meaning unfinished but |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
139 enabled code which breaks compilation or compiles but does not work.) |
13288 | 140 You can commit unfinished stuff (for testing etc), but it must be disabled |
141 (#ifdef etc) by default so it does not interfere with other developers' | |
142 work. | |
2200 | 143 |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
144 2. You don't have to over-test things. If it works for you, and you think it |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
145 should work for others, too, then commit. If your code has problems |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
146 (portability, exploits compiler bugs, unusual environment etc) they will be |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
147 reported and eventually fixed. |
2200 | 148 |
13288 | 149 3. Do not commit unrelated changes together, split them into self-contained |
150 pieces. | |
2200 | 151 |
17578 | 152 4. Do not change behavior of the program (renaming options etc) or |
17579
f1ce086b5eed
Clarify feature removal policy: it must be approved on the mailing list.
rathann
parents:
17578
diff
changeset
|
153 remove functionality from the code without approval in a discussion on |
f1ce086b5eed
Clarify feature removal policy: it must be approved on the mailing list.
rathann
parents:
17578
diff
changeset
|
154 the mplayer-dev-eng mailing list. |
12024 | 155 |
13288 | 156 5. Do not commit changes to the build system (Makefiles, configure script) |
157 which change behaviour, defaults etc, without asking first. The same | |
158 applies to compiler warning fixes, trivial looking fixes and to code | |
159 maintained by other developers. We usually have a reason for doing things | |
160 the way we do. Send your changes as patches to the mplayer-dev-eng mailing | |
161 list, and if the code maintainers say OK, you may commit. This does not | |
162 apply to files you wrote and/or maintain. | |
163 | |
164 6. We refuse source indentation and other cosmetic changes if they are mixed | |
165 with functional changes, such commits will be rejected and removed. Every | |
166 developer has his own indentation style, you should not change it. Of course | |
167 if you (re)write something, you can use your own style... (Many projects | |
168 force a given indentation style - we don't.) If you really need to make | |
169 indentation changes (try to avoid this), separate them strictly from real | |
170 changes. | |
12024 | 171 |
172 NOTE: If you had to put if(){ .. } over a large (> 5 lines) chunk of code, | |
13288 | 173 do NOT change the indentation of the inner part (don't move it to the right)! |
2200 | 174 |
13288 | 175 7. Always fill out the commit log message. Describe in a few lines what you |
176 changed and why. You can refer to mailing list postings if you fix a | |
177 particular bug. Comments such as "fixed!" or "Changed it." are unacceptable. | |
2200 | 178 |
13288 | 179 8. If you apply a patch by someone else, include the name and email address in |
18660 | 180 the log message. Since the mplayer-cvslog mailing list is publicly |
13288 | 181 archived you should add some spam protection to the email address. Send an |
182 answer to mplayer-dev-eng (or wherever you got the patch from) saying that | |
17054 | 183 you applied the patch. If the patch contains a documentation change, commit |
184 that as well; do not leave it to the documentation maintainers. | |
2200 | 185 |
13288 | 186 9. Do NOT commit to code actively maintained by others without permission. Send |
187 a patch to mplayer-dev-eng instead. | |
12107
bc89ddda34b8
Developers should subscribe to mplayer-cvslog, mention mplayer-docs.
diego
parents:
12099
diff
changeset
|
188 |
18660 | 189 10. Subscribe to the mplayer-cvslog mailing list. The diffs of all commits |
12107
bc89ddda34b8
Developers should subscribe to mplayer-cvslog, mention mplayer-docs.
diego
parents:
12099
diff
changeset
|
190 are sent there and reviewed by all the other developers. Bugs and possible |
bc89ddda34b8
Developers should subscribe to mplayer-cvslog, mention mplayer-docs.
diego
parents:
12099
diff
changeset
|
191 improvements or general questions regarding commits are discussed there. We |
bc89ddda34b8
Developers should subscribe to mplayer-cvslog, mention mplayer-docs.
diego
parents:
12099
diff
changeset
|
192 expect you to react if problems with your code are uncovered. |
12024 | 193 |
13288 | 194 11. Update the documentation if you change behavior or add features. If you are |
195 unsure how best to do this, send a patch to mplayer-docs, the documentation | |
196 maintainers will review and commit your stuff. | |
197 | |
12099 | 198 Also read DOCS/tech/patches.txt !!!! |
5415 | 199 |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
200 We think our rules are not too hard. If you have comments, contact us. |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
201 |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
202 |
3258 | 203 |
204 III. Beginners Guide by David Holm | |
205 ==================== | |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
206 |
3258 | 207 When I first got CVS write access I got banned after only a few hours |
208 because I didn't fully understand this documentation. This part is for | |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
209 those of you who have just got CVS write access and want to avoid the |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
210 most common pitfalls leading to CVS ban. |
3258 | 211 I will introduce a step-by-step guide explaining how I'm making sure |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
212 that my CVS commits are proper and won't get me banned. |
3258 | 213 |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
214 1. You should set up two directoress for MPlayer, one which contains the stable |
3258 | 215 version and has the :ext: option instead of :pserver: in CVS/Root. |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
216 The other should be your development directory and have the CVS/Root set to |
3258 | 217 :pserver: instead of :ext:, that way you can't commit development code |
218 by accident (since only :ext: allows writes). | |
219 This is my setup: | |
220 ~/mplayer | |
221 /main | |
222 /main.dev | |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
223 NOTE: I'll use these directory names from here on in the guide, what you |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
224 call your directories is entirely up to you. This is _only_ an example. |
3258 | 225 |
226 2. When you are satisfied with the changes in "main.dev" and think you are | |
227 ready to commit the changes to CVS start by doing the following in the | |
228 "~/mplayer" dir": | |
229 diff -Nur -x "CVS" -x ".*" main main.dev > dev2stable | |
230 dev2stable is the filename for the patchfile, it doesn't matter what you | |
231 call it. | |
12024 | 232 |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
233 3. Now comes one of the tricky parts, editing the patch. I prefer using mcedit |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
234 (comes with Midnight Commander) since it does syntax highlighting in patches |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
235 (= it uses colors to identify lines =), But most ASCII editors should do |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
236 (meaning don't use Star Office and save it as a Star Office document for |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
237 instance ;) I will try to explain this as good as I can. |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
238 |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
239 Read through the patch and remove all occurrences of: |
3258 | 240 |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
241 * diff -Nur.... that are affecting files YOU have NOT modified. These |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
242 occur when either main or main.dev are a different version (not checked |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
243 out at the same time) |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
244 EVERYTHING from the diff -Nur... line until the next diff -Nur... line |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
245 are changes to the file specified after the diff options, and ONLY that |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
246 file. |
12024 | 247 |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
248 * Lines containing "Binary files..." if you add the 'a' switch to -N(a)ur |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
249 binary files will be added to the patch as well, making it huge and |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
250 putting a lot of unnecessary data in it (since you seldom commit any |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
251 binaries). |
12024 | 252 |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
253 * If you find changes within a diff block that you don't want to commit |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
254 you can delete them if they are the only changes ranging from the |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
255 @@ -x,y +x,y @@ until the line before the next @@ -x,y +x,y @@. You |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
256 _cannot_ remove single lines after a @@ -x,y +x,y @@ because that will |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
257 break the patch!. |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
258 Example: |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
259 ... |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
260 @@ -15,34 +15,6 @@ |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
261 - old_option; |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
262 + new_option; |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
263 @@ -65,13 +65,3 @@ |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
264 ... |
12024 | 265 |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
266 OK: |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
267 ... |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
268 @@ -65,13 +65,3 @@ |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
269 ... |
12024 | 270 |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
271 Will break patch: |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
272 ... |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
273 @@ -15,34 +15,6 @@ |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
274 old_option; |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
275 @@ -65,13 +65,3 @@ |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
276 ... |
12024 | 277 |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
278 When I end up in a situation where I have to remove just some lines from |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
279 a block, I leave it alone, remember (write down) which file it is in and |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
280 then edit the file in "main" after I've applied the patch. |
12024 | 281 |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
282 * Now it's time for applying the patch to the "main" (stable) directory. |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
283 This should be done in two steps: |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
284 1. enter "main" and run |
12024 | 285 |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
286 patch -p1 --dry-run < ../dev2stable |
12024 | 287 |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
288 -p1 means that you are one level deep (that you have entered the |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
289 "main" directory and that should be stripped when patching, if you |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
290 run it from "~/mplayer" you would use -p0). |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
291 --dry-run means that patch does everything it normally does but |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
292 without modifying ANY files. This is a great way of testing whether |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
293 your patch works or not. |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
294 "../dev2stable" is your patchfile. (don't forget the '<') |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
295 If the dry run fails, check the line it failed on and figure out |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
296 why it failed, make a new patch and try again. |
12024 | 297 |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
298 2. OK, you finally have a working patch, remove --dry-run, patch "main" |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
299 and you are done with the patching part =). |
12024 | 300 |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
301 4. It's almost time for the final step, committing the changes. But first you |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
302 MUST make sure your changes compile without breaking anything and that it |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
303 follows the Policy mentioned in section 2. (Read it until your eyes are |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
304 bleeding if you want to keep CVS access!) |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
305 Don't worry about object files etc that will be created in your "main" dir, |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
306 they won't be sent to CVS on a commit, you must use the add command to add |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
307 new files (discuss it on dev-eng before adding new files!). |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
308 Now to make sure your additions follow policy do the following on every file |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
309 you will commit: |
12024 | 310 |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
311 cvs -z3 diff -u <filename> > <filename.d> |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
312 |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
313 Of course the output file (<filename.d>) can have any name you want. This |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
314 will create a file showing the differences between the file on CVS and your |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
315 updated local file. |
3258 | 316 I will explain some of the policy rules I had a hard time understanding: |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
317 |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
318 II.5: This means that if for instance you have lines in <filename.d> that |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
319 look something like this: |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
320 |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
321 - |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
322 + |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
323 |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
324 That means you have added or removed tabs or spaces on that line. |
12904 | 325 That qualifies as a cosmetic change and is disallowed. Edit the |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
326 file and put back/remove the added/removed tabs/spaces. |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
327 Rediff the file and make sure the cosmetic changes are fixed. |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
328 |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
329 II.6: Make sure you read and understand this properly before committing |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
330 anything. Commit one file at a time! |
3258 | 331 |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
332 5. OK, you have a working patch following the CVS policy, excellent work. Now |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
333 for the final step, committing. This is really simple. Just run the |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
334 following command in "main" for each file you want to commit: |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
335 |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
336 cvs -z3 commit -m "<comment (changes)>" <filename> |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
337 cvs -z3 commit <filename> |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
338 |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
339 The latter will bring up your default text editor for writing comments (I |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
340 prefer this method). |
12024 | 341 |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
342 You are done, congratulations. If you are certain you have followed all of the |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
343 policy you shouldn't have any trouble with the CVS maintainers at all. |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
344 At first I thought the policy was too strict, but I discussed it with A'rpi and |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
345 he made some very good points, so don't complain. |