annotate DOCS/tech/cvs-howto.txt @ 5721:b53597b930b1

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