2200
|
1
|
|
2 About CVS write access: by A'rpi
|
|
3 ~~~~~~~~~~~~~~~~~~~~~~~
|
|
4
|
|
5 I. TECH SIDE:
|
|
6 =============
|
|
7 1. Changing password:
|
|
8
|
|
9 As you probably got a restricted CVS-only shell, it's not trivial:
|
|
10
|
|
11 ssh LOGIN@mplayerhq.hu passwd
|
|
12
|
|
13 (replace LOGIN with your loginname. leave 'passwd' unchanged, it's command)
|
|
14
|
|
15 Note: if you need real shell for something, tell me.
|
|
16
|
|
17 2. Checkout devel. source tree:
|
|
18
|
|
19 export CVS_RSH=ssh
|
|
20 cvs -z3 -d:ext:LOGIN@mplayerhq.hu:/cvsroot/mplayer co main
|
|
21
|
3149
|
22 NOTE: cvs -d:pserver: mode doesn't allow writting, even with password!
|
|
23
|
2200
|
24 3. Commiting changes:
|
|
25
|
|
26 cvs -z3 commit -m "comment - what and why did you change" filename(s)
|
|
27
|
3149
|
28 Do not use such comments: "bugfix." or "files changed" or "dunno"
|
|
29 You don't have to include filename in comment, as comments are linked
|
|
30 to files. If you have different comments for files, commit them separated,
|
|
31 not at same time.
|
|
32
|
2200
|
33 4. Adding new files/dirs:
|
|
34
|
|
35 cvs add filename/dirname
|
|
36
|
|
37 5. Removing files:
|
|
38
|
|
39 rm filename
|
|
40 cvs remove filename
|
|
41
|
|
42 6. Check changes:
|
|
43
|
|
44 cvs -z3 diff -u filename(s)
|
|
45
|
3149
|
46 it's recommended to check changes first, before commit. especially if you
|
|
47 forget what did you change :)
|
|
48 and this way you will see if your patch has debug stuff or indenting change,
|
|
49 and you can fix it before commiting and triggering me to use cvs-backup.
|
|
50
|
2200
|
51 7. Check changelog:
|
|
52
|
|
53 cvs -z3 log filename(s)
|
|
54
|
|
55 8. Rename/move files:
|
|
56
|
3149
|
57 you can NOT do that. ask CVS server admin (A'rpi) to do it!
|
|
58 do NOT remove & re-add file - it will kill changelog!!!!
|
2200
|
59
|
|
60 If you have any tech problems with cvs server, contact me:
|
|
61 A'rpi <arpi@thot.banki.hu>
|
|
62
|
|
63
|
|
64 II. POLICY / RULES:
|
|
65 ===================
|
|
66
|
|
67 1. You shouldn't commit code which makes cvs broken!
|
|
68 (i mean unfinished but enabled code which break
|
|
69 compiling or compiles but does not work)
|
|
70
|
|
71 2. You don't have over-test things. if it works for you,
|
|
72 and you think it should work for others too, then commit.
|
|
73 If it has problems (portability, exploits compiler bugs,
|
|
74 unusual environment etc) they will be reported, it's ok.
|
|
75
|
|
76 3. You can commit unfinished stuff (for testing etc), but it
|
|
77 must be disabled (#ifdef etc) by default.
|
|
78
|
|
79 4. Do not change behaviour of the program (renaming options etc)
|
|
80 without discussing first at the MPlayer-dev-eng list.
|
|
81
|
|
82 5. Source indenting and other cosmetical changes are refused.
|
|
83 I'll remove those commits...
|
|
84 Every developer has its own indenting style, you shouldn't
|
|
85 change it. Of course if you (re)write something then you can
|
|
86 use your own style...
|
|
87 (Many projects forces a given indenting style - we don't)
|
|
88
|
|
89 6. Always fill out the comment at commiting (-m switch of cvs, or
|
|
90 in the editor if you left -m).
|
|
91 It shouldn't be such lines: "fixed!" or "Changed it."
|
|
92 Describe in a few lines (usually 1 line is enough) what did
|
|
93 you changed and why did you that. You can refer mails if bugfix.
|
|
94
|
|
95 7. If you apply patch by someone else, include his name and email
|
|
96 in the cvs comment!
|
|
97
|
|
98 8. I've developed something called CVS-Backup. It archives CVS
|
|
99 repository after each commit - so I can reverse your commits
|
|
100 (without messing up changelog) if they are bad.
|
3149
|
101 If you think your bugfix or other change was bad and unneeded,
|
|
102 ask me to reverse it instead of commiting previous version!
|
2200
|
103
|
|
104 I think our rules aren't too hard. If you have comments, contact me.
|
3258
|
105
|
|
106 III. Beginners Guide by David Holm
|
|
107 ====================
|
|
108 When I first got CVS write access I got banned after only a few hours
|
|
109 because I didn't fully understand this documentation. This part is for
|
|
110 those of you who have just got cvs write access and want to avoid the
|
|
111 most common pitfalls leading to cvs ban.
|
|
112 I will introduce a step-by-step guide explaining how I'm making sure
|
|
113 that my cvs commits are proper and won't get me banned.
|
|
114
|
|
115 1. You should set up two dirs for mplayer, one which contains the stable
|
|
116 version and has the :ext: option instead of :pserver: in CVS/Root.
|
|
117 The other should be your development dir and have the CVS/Root set to
|
|
118 :pserver: instead of :ext:, that way you can't commit development code
|
|
119 by accident (since only :ext: allows writes).
|
|
120 This is my setup:
|
|
121 ~/mplayer
|
|
122 /main
|
|
123 /main.dev
|
|
124 NOTE: I'll use these dir names from hereon in the guide, what you want
|
|
125 to call your dirs are entirely up to you. This is _only_ an example.
|
|
126
|
|
127 2. When you are satisfied with the changes in "main.dev" and think you are
|
|
128 ready to commit the changes to CVS start by doing the following in the
|
|
129 "~/mplayer" dir":
|
|
130 diff -Nur -x "CVS" -x ".*" main main.dev > dev2stable
|
|
131 dev2stable is the filename for the patchfile, it doesn't matter what you
|
|
132 call it.
|
|
133
|
|
134 3. Now comes one of the tricky parts, editing the patch.
|
|
135 I prefer using mcedit (comes with Midnight Commander) since it does syntax
|
|
136 highlighting in patches (= it uses colors to identify lines =), But most
|
|
137 ascii editors should do (meaning don't use staroffice and save it as a
|
|
138 star office document for instance ;)
|
|
139 I will try to explain this as good as I can.
|
|
140 Read throught the patch and remove all occurances of:
|
|
141 * diff -Nur.... that are affecting files YOU have NOT modified
|
|
142 these occur when either main or main.dev are different version
|
|
143 (not checked out at the same time)
|
|
144 EVERYTHING from the diff -Nur... line until the next diff -Nur...
|
|
145 line are changes to the file specified after the diff options,
|
|
146 and ONLY that file.
|
|
147
|
|
148 * Lines containing "Binary files..." if you add the 'a' switch to
|
|
149 -N(a)ur binary files will be added to the patch as well, making it
|
|
150 huge and puts alot of unnecessary data in it (since you seldom
|
|
151 commit any binaries).
|
|
152
|
|
153 * If you find changes within a diff block that you don't want to
|
|
154 commit you can delete them if they are the only changes ranging
|
|
155 from the @@ -x,y +x,y @@ until the line before the next
|
|
156 @@ -x,y +x,y @@. You _cannot_ remove single lines after a
|
|
157 @@ -x,y +x,y @@ because that will break the patch!.
|
|
158 example:
|
|
159 ...
|
|
160 @@ -15,34 +15,6 @@
|
|
161 - old_option;
|
|
162 + new_option;
|
|
163 @@ -65,13 +65,3 @@
|
|
164 ...
|
|
165
|
|
166 Ok:
|
|
167 ...
|
|
168 @@ -65,13 +65,3 @@
|
|
169 ...
|
|
170
|
|
171 Will break patch:
|
|
172 ...
|
|
173 @@ -15,34 +15,6 @@
|
|
174 old_option;
|
|
175 @@ -65,13 +65,3 @@
|
|
176 ...
|
|
177
|
|
178 When I end up in situation where I have to remove just smoe lines from
|
|
179 a block I leave it alone, remember (write down) which file it is in and
|
|
180 then edit the file in "main" after I've applied the patch.
|
|
181
|
|
182 * Now it's time for applying the patch to the "main" (stable) dir. This
|
|
183 should be done in two steps:
|
|
184 1. enter "main" and run "patch -p1 --dry-run < ../dev2stable"
|
|
185 -p1 means that you are one level deep (that you have entered
|
|
186 the "main" directory and that should be stripped when patching,
|
|
187 if you run it from "~/mplayer" you would use -p0).
|
|
188 --dry-run means that patch does everything it normally does
|
|
189 but without modifying ANY files, this is a great way of testing
|
|
190 whether your patch works or not.
|
|
191 "../dev2stable" is your patchfile. (don't forget the '<')
|
|
192 If the dry run fails check the line it failed on and figure out
|
|
193 why it failed, make a new patch, and try again.
|
|
194 2. Ok, you finally have a working patch, remove --dry-run and patch
|
|
195 "main" and you are done with the patching part =).
|
|
196
|
|
197 4. It's almost time for the final step, commiting the changes. But first you MUST make
|
|
198 sure your changes compiles without breaking anything and that it follows the Policy
|
|
199 mentioned in section 2. (Read it until your eyes are bleeding if you want to keep CVS
|
|
200 access!)
|
|
201 Don't worry about object files etc that will be created in your "main" dir, they won't
|
|
202 be sent to CVS on commit, you must use the add command to add new files (discuss it on
|
|
203 the list before adding new files!).
|
|
204 Now to make sure your additions follow policy do the following on every file you will
|
|
205 commit:
|
|
206 "cvs -z3 diff -u <filename> > <filename.d> of course the output file (<filename.d>) can
|
|
207 have any name you want. This will create a file showing the differences between the
|
|
208 file on cvs and your updated local file.
|
|
209 I will explain some of the policy rules I had a hard time understanding:
|
|
210 5. This means that if for instance you have lines in <filename.d> that look
|
|
211 something like this:
|
|
212 -
|
|
213 +
|
|
214 That means that you have either added or removed a tab or spaces on that line.
|
|
215 That qualifies as cosmetical changes and is disallowed. Edit the file and put
|
|
216 back/remove the added/removed tab/spaces.
|
|
217 Do a new diff on the file and make sure it fixed the cosmetics.
|
|
218 6. Make sure you read and understand this properly before commiting anything. Commit
|
|
219 one file at a time!
|
|
220
|
|
221 5. Ok, you have a working patch following the cvs policy, excellent work. Now for the
|
|
222 final step, commiting. This is real simple. Just run the following command in "main"
|
|
223 for each file you want to commit:
|
|
224 "cvs -z3 commit -m "<comment (changes)>" <filename>" or
|
|
225 "cvs -z3 commit <filename>"
|
|
226 The latter will bring up your default text editor for writing comments (I prefer this
|
|
227 method).
|
|
228
|
|
229 You are done, congratulations. If you are certain you have followed all the policies you
|
|
230 shouldn't have any troubles with CVS maintainers at all.
|
|
231 At first I thought the policy was too strict, I discussed it with Arpi and he made some
|
|
232 very good points, so don't complain.
|