Mercurial > mplayer.hg
annotate DOCS/tech/cvs-howto.txt @ 18660:7548a6a100da
CVS --> Subversion
author | diego |
---|---|
date | Fri, 09 Jun 2006 13:33:44 +0000 |
parents | 3dcb3aaeb7cb |
children | 9a731c61c870 |
rev | line source |
---|---|
2200 | 1 |
18660 | 2 About Subversion write access: |
3 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
2200 | 4 |
11395
5484bc13e90a
Some notes about general CVS documentation added, new 'cvs admin' section
diego
parents:
9537
diff
changeset
|
5 Before everything else, you should know how to use CVS properly. CVS comes with |
5484bc13e90a
Some notes about general CVS documentation added, new 'cvs admin' section
diego
parents:
9537
diff
changeset
|
6 some documentation, as usual |
5484bc13e90a
Some notes about general CVS documentation added, new 'cvs admin' section
diego
parents:
9537
diff
changeset
|
7 |
5484bc13e90a
Some notes about general CVS documentation added, new 'cvs admin' section
diego
parents:
9537
diff
changeset
|
8 cvs --help |
5484bc13e90a
Some notes about general CVS documentation added, new 'cvs admin' section
diego
parents:
9537
diff
changeset
|
9 man cvs |
5484bc13e90a
Some notes about general CVS documentation added, new 'cvs admin' section
diego
parents:
9537
diff
changeset
|
10 |
5484bc13e90a
Some notes about general CVS documentation added, new 'cvs admin' section
diego
parents:
9537
diff
changeset
|
11 are a good start. The most comprehensive manual is the book "Version Management |
5484bc13e90a
Some notes about general CVS documentation added, new 'cvs admin' section
diego
parents:
9537
diff
changeset
|
12 with CVS" by Per Cederqvist. It may be available on your system via |
5484bc13e90a
Some notes about general CVS documentation added, new 'cvs admin' section
diego
parents:
9537
diff
changeset
|
13 |
5484bc13e90a
Some notes about general CVS documentation added, new 'cvs admin' section
diego
parents:
9537
diff
changeset
|
14 info cvs |
5484bc13e90a
Some notes about general CVS documentation added, new 'cvs admin' section
diego
parents:
9537
diff
changeset
|
15 |
5484bc13e90a
Some notes about general CVS documentation added, new 'cvs admin' section
diego
parents:
9537
diff
changeset
|
16 or online at |
5484bc13e90a
Some notes about general CVS documentation added, new 'cvs admin' section
diego
parents:
9537
diff
changeset
|
17 |
5484bc13e90a
Some notes about general CVS documentation added, new 'cvs admin' section
diego
parents:
9537
diff
changeset
|
18 http://www.cvshome.org/docs/manual/ |
5484bc13e90a
Some notes about general CVS documentation added, new 'cvs admin' section
diego
parents:
9537
diff
changeset
|
19 |
5484bc13e90a
Some notes about general CVS documentation added, new 'cvs admin' section
diego
parents:
9537
diff
changeset
|
20 Another very good resource is "The CVS Book - Open Source Development with CVS" |
5484bc13e90a
Some notes about general CVS documentation added, new 'cvs admin' section
diego
parents:
9537
diff
changeset
|
21 by Karl Fogel and Moshe Bar. It is also available online: |
5484bc13e90a
Some notes about general CVS documentation added, new 'cvs admin' section
diego
parents:
9537
diff
changeset
|
22 |
5484bc13e90a
Some notes about general CVS documentation added, new 'cvs admin' section
diego
parents:
9537
diff
changeset
|
23 http://cvsbook.red-bean.com/ |
5484bc13e90a
Some notes about general CVS documentation added, new 'cvs admin' section
diego
parents:
9537
diff
changeset
|
24 |
5484bc13e90a
Some notes about general CVS documentation added, new 'cvs admin' section
diego
parents:
9537
diff
changeset
|
25 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
|
26 What follows now are MPlayer specific guidelines. |
5484bc13e90a
Some notes about general CVS documentation added, new 'cvs admin' section
diego
parents:
9537
diff
changeset
|
27 |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
28 |
2200 | 29 I. TECH SIDE: |
30 ============= | |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
31 |
2200 | 32 1. Changing password: |
33 | |
34 As you probably got a restricted CVS-only shell, it's not trivial: | |
35 | |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
36 ssh LOGIN@mplayerhq.hu passwd |
12024 | 37 |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
38 Replace LOGIN with your login name. Leave 'passwd' unchanged, it's a command. |
12024 | 39 |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
40 2. Checking out development source tree: |
12024 | 41 |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
42 export CVS_RSH=ssh |
11679
16c01dbca208
Pruning empty directories is a good idea and even better is using the
diego
parents:
11395
diff
changeset
|
43 cvs -z3 -d:ext:LOGIN@mplayerhq.hu:/cvsroot/mplayer co -P main |
12024 | 44 |
11395
5484bc13e90a
Some notes about general CVS documentation added, new 'cvs admin' section
diego
parents:
9537
diff
changeset
|
45 Replace LOGIN with your login name. |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
46 NOTE: cvs -d:pserver: mode doesn't allow writing, even with password! |
12024 | 47 |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
48 3. Committing changes: |
2200 | 49 |
13288 | 50 cvs -z3 update -dPA |
51 cvs -z3 commit filename(s) | |
12024 | 52 |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
53 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
|
54 You don't have to include the filename in the comment, as comments are linked |
12099 | 55 to files. If you have made several independent changes, commit them |
13288 | 56 separately, not at the same time. You will be prompted for a comment in an |
57 editor (see 'cvs -e', usually vi). | |
12024 | 58 |
2200 | 59 4. Adding new files/dirs: |
60 | |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
61 cvs add filename/dirname |
13288 | 62 cvs commit filename |
63 | |
14059
384ae6f896cf
Explain how (not) to handle execute permissions and binary files.
diego
parents:
13288
diff
changeset
|
64 Directories are added immediately, no commit necessary. Make sure you do not |
384ae6f896cf
Explain how (not) to handle execute permissions and binary files.
diego
parents:
13288
diff
changeset
|
65 wrongly commit non-executable files with execute permissions set as this has |
384ae6f896cf
Explain how (not) to handle execute permissions and binary files.
diego
parents:
13288
diff
changeset
|
66 to be fixed manually in the repository. Binary files must be added with |
384ae6f896cf
Explain how (not) to handle execute permissions and binary files.
diego
parents:
13288
diff
changeset
|
67 'cvs add -kb'. |
12024 | 68 |
2200 | 69 5. Removing files: |
70 | |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
71 rm filename |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
72 cvs remove filename |
13288 | 73 cvs commit filename |
12024 | 74 |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
75 6. Checking changes: |
12024 | 76 |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
77 cvs -z3 diff -u filename(s) |
12024 | 78 |
13288 | 79 Doublecheck your changes before committing to avoid trouble later on. |
80 This way you will see if your patch has debug stuff or indentation | |
81 changes and you can fix it before committing and triggering flames. | |
12024 | 82 |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
83 7. Checking changelog: |
2200 | 84 |
12024 | 85 cvs -z3 log filename(s) |
13288 | 86 cvs -z3 annotate filename(s) |
87 | |
88 You may also find viewcvs, a web frontend for CVS helpful. It's often more | |
89 comfortable than using cvs log, cvs annotate and cvs diff. Find it here: | |
90 http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main | |
12024 | 91 |
9537
5476bc1c5cf6
Empty directories can only be removed by the CVS admin.
diego
parents:
9263
diff
changeset
|
92 8. Renaming/moving files or content of files, removing empty directories: |
2200 | 93 |
18136 | 94 You CANNOT do that. Ask the CVS server admin to do it! |
13288 | 95 Do NOT remove & readd a file - it will kill the changelog!!!! |
2200 | 96 |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
97 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
|
98 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
|
99 those changes untraceable! |
5415 | 100 |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
101 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
|
102 so try to avoid them. |
11395
5484bc13e90a
Some notes about general CVS documentation added, new 'cvs admin' section
diego
parents:
9537
diff
changeset
|
103 |
5484bc13e90a
Some notes about general CVS documentation added, new 'cvs admin' section
diego
parents:
9537
diff
changeset
|
104 9. Reverting broken commits |
5484bc13e90a
Some notes about general CVS documentation added, new 'cvs admin' section
diego
parents:
9537
diff
changeset
|
105 |
15227
167085fd11af
'cvs admin -o' is dangerous and should be handled with extra care.
diego
parents:
14856
diff
changeset
|
106 Should you commit something really broken, notice it quickly and wish to undo |
167085fd11af
'cvs admin -o' is dangerous and should be handled with extra care.
diego
parents:
14856
diff
changeset
|
107 it completely, the 'cvs admin -o' command can be used as a last resort. This |
167085fd11af
'cvs admin -o' is dangerous and should be handled with extra care.
diego
parents:
14856
diff
changeset
|
108 command removes entries from the revision history of a file. For the corner |
167085fd11af
'cvs admin -o' is dangerous and should be handled with extra care.
diego
parents:
14856
diff
changeset
|
109 case of removing the last revision (and only then!) this amounts to reverting |
167085fd11af
'cvs admin -o' is dangerous and should be handled with extra care.
diego
parents:
14856
diff
changeset
|
110 a commit. The HEAD version is not affected by removing revisions that came |
167085fd11af
'cvs admin -o' is dangerous and should be handled with extra care.
diego
parents:
14856
diff
changeset
|
111 before, only revision history will be lost and holes left in the revision |
167085fd11af
'cvs admin -o' is dangerous and should be handled with extra care.
diego
parents:
14856
diff
changeset
|
112 numbering. ONLY EVER use this command to delete the LAST revision of a file. |
167085fd11af
'cvs admin -o' is dangerous and should be handled with extra care.
diego
parents:
14856
diff
changeset
|
113 |
167085fd11af
'cvs admin -o' is dangerous and should be handled with extra care.
diego
parents:
14856
diff
changeset
|
114 In short, if you use this improperly you can wreak permanent havoc. Employ it |
167085fd11af
'cvs admin -o' is dangerous and should be handled with extra care.
diego
parents:
14856
diff
changeset
|
115 only if you are completely sure of what you are doing. |
12025
124734dc7c66
Explain why 'cvs admin' should only be used on the last revision of a file.
diego
parents:
12024
diff
changeset
|
116 |
124734dc7c66
Explain why 'cvs admin' should only be used on the last revision of a file.
diego
parents:
12024
diff
changeset
|
117 Assuming that 1.123 is the last revision |
11395
5484bc13e90a
Some notes about general CVS documentation added, new 'cvs admin' section
diego
parents:
9537
diff
changeset
|
118 |
12024 | 119 cvs -z3 admin -o1.123 filename |
11395
5484bc13e90a
Some notes about general CVS documentation added, new 'cvs admin' section
diego
parents:
9537
diff
changeset
|
120 |
12025
124734dc7c66
Explain why 'cvs admin' should only be used on the last revision of a file.
diego
parents:
12024
diff
changeset
|
121 will remove revision 1.123, thus reverting the file back to revision 1.122. |
124734dc7c66
Explain why 'cvs admin' should only be used on the last revision of a file.
diego
parents:
12024
diff
changeset
|
122 |
14806
6abe4fb845ff
mphq uses ssh.com, explain RSA key generation for it.
diego
parents:
14059
diff
changeset
|
123 10. RSA authentication |
6abe4fb845ff
mphq uses ssh.com, explain RSA key generation for it.
diego
parents:
14059
diff
changeset
|
124 |
6abe4fb845ff
mphq uses ssh.com, explain RSA key generation for it.
diego
parents:
14059
diff
changeset
|
125 Since mplayerhq.hu uses ssh.com and not OpenSSH you will have to convert your |
6abe4fb845ff
mphq uses ssh.com, explain RSA key generation for it.
diego
parents:
14059
diff
changeset
|
126 OpenSSH RSA keys to IETF SECSH format with |
6abe4fb845ff
mphq uses ssh.com, explain RSA key generation for it.
diego
parents:
14059
diff
changeset
|
127 |
6abe4fb845ff
mphq uses ssh.com, explain RSA key generation for it.
diego
parents:
14059
diff
changeset
|
128 ssh-keygen -e |
6abe4fb845ff
mphq uses ssh.com, explain RSA key generation for it.
diego
parents:
14059
diff
changeset
|
129 |
6abe4fb845ff
mphq uses ssh.com, explain RSA key generation for it.
diego
parents:
14059
diff
changeset
|
130 if you want to use RSA authentication. See ssh(1) and ssh-keygen(1) for |
6abe4fb845ff
mphq uses ssh.com, explain RSA key generation for it.
diego
parents:
14059
diff
changeset
|
131 details. |
6abe4fb845ff
mphq uses ssh.com, explain RSA key generation for it.
diego
parents:
14059
diff
changeset
|
132 |
11395
5484bc13e90a
Some notes about general CVS documentation added, new 'cvs admin' section
diego
parents:
9537
diff
changeset
|
133 |
14856 | 134 Contact the project admin <root at mplayerhq dot hu> if you have technical |
135 problems with the CVS server. | |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
136 |
2200 | 137 |
138 | |
139 II. POLICY / RULES: | |
140 =================== | |
141 | |
13288 | 142 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
|
143 enabled code which breaks compilation or compiles but does not work.) |
13288 | 144 You can commit unfinished stuff (for testing etc), but it must be disabled |
145 (#ifdef etc) by default so it does not interfere with other developers' | |
146 work. | |
2200 | 147 |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
148 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
|
149 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
|
150 (portability, exploits compiler bugs, unusual environment etc) they will be |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
151 reported and eventually fixed. |
2200 | 152 |
13288 | 153 3. Do not commit unrelated changes together, split them into self-contained |
154 pieces. | |
2200 | 155 |
17578 | 156 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
|
157 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
|
158 the mplayer-dev-eng mailing list. |
12024 | 159 |
13288 | 160 5. Do not commit changes to the build system (Makefiles, configure script) |
161 which change behaviour, defaults etc, without asking first. The same | |
162 applies to compiler warning fixes, trivial looking fixes and to code | |
163 maintained by other developers. We usually have a reason for doing things | |
164 the way we do. Send your changes as patches to the mplayer-dev-eng mailing | |
165 list, and if the code maintainers say OK, you may commit. This does not | |
166 apply to files you wrote and/or maintain. | |
167 | |
168 6. We refuse source indentation and other cosmetic changes if they are mixed | |
169 with functional changes, such commits will be rejected and removed. Every | |
170 developer has his own indentation style, you should not change it. Of course | |
171 if you (re)write something, you can use your own style... (Many projects | |
172 force a given indentation style - we don't.) If you really need to make | |
173 indentation changes (try to avoid this), separate them strictly from real | |
174 changes. | |
12024 | 175 |
176 NOTE: If you had to put if(){ .. } over a large (> 5 lines) chunk of code, | |
13288 | 177 do NOT change the indentation of the inner part (don't move it to the right)! |
2200 | 178 |
13288 | 179 7. Always fill out the commit log message. Describe in a few lines what you |
180 changed and why. You can refer to mailing list postings if you fix a | |
181 particular bug. Comments such as "fixed!" or "Changed it." are unacceptable. | |
2200 | 182 |
13288 | 183 8. If you apply a patch by someone else, include the name and email address in |
18660 | 184 the log message. Since the mplayer-cvslog mailing list is publicly |
13288 | 185 archived you should add some spam protection to the email address. Send an |
186 answer to mplayer-dev-eng (or wherever you got the patch from) saying that | |
17054 | 187 you applied the patch. If the patch contains a documentation change, commit |
188 that as well; do not leave it to the documentation maintainers. | |
2200 | 189 |
13288 | 190 9. Do NOT commit to code actively maintained by others without permission. Send |
191 a patch to mplayer-dev-eng instead. | |
12107
bc89ddda34b8
Developers should subscribe to mplayer-cvslog, mention mplayer-docs.
diego
parents:
12099
diff
changeset
|
192 |
18660 | 193 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
|
194 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
|
195 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
|
196 expect you to react if problems with your code are uncovered. |
12024 | 197 |
13288 | 198 11. Update the documentation if you change behavior or add features. If you are |
199 unsure how best to do this, send a patch to mplayer-docs, the documentation | |
200 maintainers will review and commit your stuff. | |
201 | |
12099 | 202 Also read DOCS/tech/patches.txt !!!! |
5415 | 203 |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
204 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
|
205 |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
206 |
3258 | 207 |
208 III. Beginners Guide by David Holm | |
209 ==================== | |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
210 |
3258 | 211 When I first got CVS write access I got banned after only a few hours |
212 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
|
213 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
|
214 most common pitfalls leading to CVS ban. |
3258 | 215 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
|
216 that my CVS commits are proper and won't get me banned. |
3258 | 217 |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
218 1. You should set up two directoress for MPlayer, one which contains the stable |
3258 | 219 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
|
220 The other should be your development directory and have the CVS/Root set to |
3258 | 221 :pserver: instead of :ext:, that way you can't commit development code |
222 by accident (since only :ext: allows writes). | |
223 This is my setup: | |
224 ~/mplayer | |
225 /main | |
226 /main.dev | |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
227 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
|
228 call your directories is entirely up to you. This is _only_ an example. |
3258 | 229 |
230 2. When you are satisfied with the changes in "main.dev" and think you are | |
231 ready to commit the changes to CVS start by doing the following in the | |
232 "~/mplayer" dir": | |
233 diff -Nur -x "CVS" -x ".*" main main.dev > dev2stable | |
234 dev2stable is the filename for the patchfile, it doesn't matter what you | |
235 call it. | |
12024 | 236 |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
237 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
|
238 (comes with Midnight Commander) since it does syntax highlighting in patches |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
239 (= 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
|
240 (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
|
241 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
|
242 |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
243 Read through the patch and remove all occurrences of: |
3258 | 244 |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
245 * diff -Nur.... that are affecting files YOU have NOT modified. These |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
246 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
|
247 out at the same time) |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
248 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
|
249 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
|
250 file. |
12024 | 251 |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
252 * 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
|
253 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
|
254 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
|
255 binaries). |
12024 | 256 |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
257 * 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
|
258 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
|
259 @@ -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
|
260 _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
|
261 break the patch!. |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
262 Example: |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
263 ... |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
264 @@ -15,34 +15,6 @@ |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
265 - old_option; |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
266 + new_option; |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
267 @@ -65,13 +65,3 @@ |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
268 ... |
12024 | 269 |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
270 OK: |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
271 ... |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
272 @@ -65,13 +65,3 @@ |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
273 ... |
12024 | 274 |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
275 Will break patch: |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
276 ... |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
277 @@ -15,34 +15,6 @@ |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
278 old_option; |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
279 @@ -65,13 +65,3 @@ |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
280 ... |
12024 | 281 |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
282 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
|
283 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
|
284 then edit the file in "main" after I've applied the patch. |
12024 | 285 |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
286 * 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
|
287 This should be done in two steps: |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
288 1. enter "main" and run |
12024 | 289 |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
290 patch -p1 --dry-run < ../dev2stable |
12024 | 291 |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
292 -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
|
293 "main" directory and that should be stripped when patching, if you |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
294 run it from "~/mplayer" you would use -p0). |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
295 --dry-run means that patch does everything it normally does but |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
296 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
|
297 your patch works or not. |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
298 "../dev2stable" is your patchfile. (don't forget the '<') |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
299 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
|
300 why it failed, make a new patch and try again. |
12024 | 301 |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
302 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
|
303 and you are done with the patching part =). |
12024 | 304 |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
305 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
|
306 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
|
307 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
|
308 bleeding if you want to keep CVS access!) |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
309 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
|
310 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
|
311 new files (discuss it on dev-eng before adding new files!). |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
312 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
|
313 you will commit: |
12024 | 314 |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
315 cvs -z3 diff -u <filename> > <filename.d> |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
316 |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
317 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
|
318 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
|
319 updated local file. |
3258 | 320 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
|
321 |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
322 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
|
323 look something like this: |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
324 |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
325 - |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
326 + |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
327 |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
328 That means you have added or removed tabs or spaces on that line. |
12904 | 329 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
|
330 file and put back/remove the added/removed tabs/spaces. |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
331 Rediff the file and make sure the cosmetic changes are fixed. |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
332 |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
333 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
|
334 anything. Commit one file at a time! |
3258 | 335 |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
336 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
|
337 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
|
338 following command in "main" for each file you want to commit: |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
339 |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
340 cvs -z3 commit -m "<comment (changes)>" <filename> |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
341 cvs -z3 commit <filename> |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
342 |
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
343 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
|
344 prefer this method). |
12024 | 345 |
7904
98168d30f67d
Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents:
5415
diff
changeset
|
346 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
|
347 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
|
348 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
|
349 he made some very good points, so don't complain. |