annotate DOCS/tech/cvs-howto.txt @ 3378:f62a86a9ecf1

no filename needed for tv grabbing
author alex
date Sat, 08 Dec 2001 02:47:55 +0000
parents d7bd32263398
children 2618318f988b
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
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
41
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
42 6. Check changes:
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
43
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
44 cvs -z3 diff -u filename(s)
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
45
3149
fc5a2369696e extended a bit
arpi
parents: 2200
diff changeset
46 it's recommended to check changes first, before commit. especially if you
fc5a2369696e extended a bit
arpi
parents: 2200
diff changeset
47 forget what did you change :)
fc5a2369696e extended a bit
arpi
parents: 2200
diff changeset
48 and this way you will see if your patch has debug stuff or indenting change,
fc5a2369696e extended a bit
arpi
parents: 2200
diff changeset
49 and you can fix it before commiting and triggering me to use cvs-backup.
fc5a2369696e extended a bit
arpi
parents: 2200
diff changeset
50
2200
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
51 7. Check changelog:
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
52
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
53 cvs -z3 log filename(s)
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
54
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
55 8. Rename/move files:
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
56
3149
fc5a2369696e extended a bit
arpi
parents: 2200
diff changeset
57 you can NOT do that. ask CVS server admin (A'rpi) to do it!
fc5a2369696e extended a bit
arpi
parents: 2200
diff changeset
58 do NOT remove & re-add file - it will kill changelog!!!!
2200
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
59
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
60 If you have any tech problems with cvs server, contact me:
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
61 A'rpi <arpi@thot.banki.hu>
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
62
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
63
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
64 II. POLICY / RULES:
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
65 ===================
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
66
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
67 1. You shouldn't commit code which makes cvs broken!
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
68 (i mean unfinished but enabled code which break
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
69 compiling or compiles but does not work)
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
70
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
71 2. You don't have over-test things. if it works for you,
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
72 and you think it should work for others too, then commit.
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
73 If it has problems (portability, exploits compiler bugs,
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
74 unusual environment etc) they will be reported, it's ok.
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
75
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
76 3. You can commit unfinished stuff (for testing etc), but it
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
77 must be disabled (#ifdef etc) by default.
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
78
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
79 4. Do not change behaviour of the program (renaming options etc)
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
80 without discussing first at the MPlayer-dev-eng list.
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
81
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
82 5. Source indenting and other cosmetical changes are refused.
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
83 I'll remove those commits...
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
84 Every developer has its own indenting style, you shouldn't
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
85 change it. Of course if you (re)write something then you can
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
86 use your own style...
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
87 (Many projects forces a given indenting style - we don't)
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
88
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
89 6. Always fill out the comment at commiting (-m switch of cvs, or
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
90 in the editor if you left -m).
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
91 It shouldn't be such lines: "fixed!" or "Changed it."
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
92 Describe in a few lines (usually 1 line is enough) what did
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
93 you changed and why did you that. You can refer mails if bugfix.
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
94
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
95 7. If you apply patch by someone else, include his name and email
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
96 in the cvs comment!
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
97
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
98 8. I've developed something called CVS-Backup. It archives CVS
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
99 repository after each commit - so I can reverse your commits
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
100 (without messing up changelog) if they are bad.
3149
fc5a2369696e extended a bit
arpi
parents: 2200
diff changeset
101 If you think your bugfix or other change was bad and unneeded,
fc5a2369696e extended a bit
arpi
parents: 2200
diff changeset
102 ask me to reverse it instead of commiting previous version!
2200
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
103
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
104 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
105
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
106 III. Beginners Guide by David Holm
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
107 ====================
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
108 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
109 because I didn't fully understand this documentation. This part is for
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
110 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
111 most common pitfalls leading to cvs ban.
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
112 I will introduce a step-by-step guide explaining how I'm making sure
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
113 that my cvs commits are proper and won't get me banned.
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
114
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
115 1. You should set up two dirs for mplayer, one which contains the stable
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
116 version and has the :ext: option instead of :pserver: in CVS/Root.
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
117 The other should be your development dir and have the CVS/Root set to
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
118 :pserver: instead of :ext:, that way you can't commit development code
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
119 by accident (since only :ext: allows writes).
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
120 This is my setup:
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
121 ~/mplayer
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
122 /main
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
123 /main.dev
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
124 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
125 to call your dirs are entirely up to you. This is _only_ an example.
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
126
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
127 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
128 ready to commit the changes to CVS start by doing the following in the
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
129 "~/mplayer" dir":
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
130 diff -Nur -x "CVS" -x ".*" main main.dev > dev2stable
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
131 dev2stable is the filename for the patchfile, it doesn't matter what you
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
132 call it.
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
133
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
134 3. Now comes one of the tricky parts, editing the patch.
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
135 I prefer using mcedit (comes with Midnight Commander) since it does syntax
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
136 highlighting in patches (= it uses colors to identify lines =), But most
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
137 ascii editors should do (meaning don't use staroffice and save it as a
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
138 star office document for instance ;)
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
139 I will try to explain this as good as I can.
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
140 Read throught the patch and remove all occurances of:
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
141 * diff -Nur.... that are affecting files YOU have NOT modified
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
142 these occur when either main or main.dev are different version
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
143 (not checked out at the same time)
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
144 EVERYTHING from the diff -Nur... line until the next diff -Nur...
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
145 line are changes to the file specified after the diff options,
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
146 and ONLY that file.
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
147
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
148 * Lines containing "Binary files..." if you add the 'a' switch to
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
149 -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
150 huge and puts alot of unnecessary data in it (since you seldom
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
151 commit any binaries).
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
152
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
153 * If you find changes within a diff block that you don't want to
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
154 commit you can delete them if they are the only changes ranging
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
155 from the @@ -x,y +x,y @@ until the line before the next
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
156 @@ -x,y +x,y @@. You _cannot_ remove single lines after a
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
157 @@ -x,y +x,y @@ because that will break the patch!.
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
158 example:
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
159 ...
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
160 @@ -15,34 +15,6 @@
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
161 - old_option;
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
162 + new_option;
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
163 @@ -65,13 +65,3 @@
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
164 ...
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
165
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
166 Ok:
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
167 ...
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
168 @@ -65,13 +65,3 @@
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
169 ...
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
170
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
171 Will break patch:
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
172 ...
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
173 @@ -15,34 +15,6 @@
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
174 old_option;
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
175 @@ -65,13 +65,3 @@
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
176 ...
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
177
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
178 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
179 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
180 then edit the file in "main" after I've applied the patch.
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
181
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
182 * Now it's time for applying the patch to the "main" (stable) dir. This
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
183 should be done in two steps:
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
184 1. enter "main" and run "patch -p1 --dry-run < ../dev2stable"
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
185 -p1 means that you are one level deep (that you have entered
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
186 the "main" directory and that should be stripped when patching,
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
187 if you run it from "~/mplayer" you would use -p0).
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
188 --dry-run means that patch does everything it normally does
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
189 but without modifying ANY files, this is a great way of testing
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
190 whether your patch works or not.
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
191 "../dev2stable" is your patchfile. (don't forget the '<')
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
192 If the dry run fails check the line it failed on and figure out
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
193 why it failed, make a new patch, and try again.
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
194 2. Ok, you finally have a working patch, remove --dry-run and patch
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
195 "main" and you are done with the patching part =).
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
196
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
197 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
198 sure your changes compiles without breaking anything and that it follows the Policy
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
199 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
200 access!)
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
201 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
202 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
203 the list before adding new files!).
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
204 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
205 commit:
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
206 "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
207 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
208 file on cvs and your updated local file.
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
209 I will explain some of the policy rules I had a hard time understanding:
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
210 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
211 something like this:
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
212 -
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
213 +
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
214 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
215 That qualifies as cosmetical changes and is disallowed. Edit the file and put
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
216 back/remove the added/removed tab/spaces.
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
217 Do a new diff on the file and make sure it fixed the cosmetics.
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
218 6. Make sure you read and understand this properly before commiting anything. Commit
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
219 one file at a time!
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
220
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
221 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
222 final step, commiting. This is real simple. Just run the following command in "main"
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
223 for each file you want to commit:
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
224 "cvs -z3 commit -m "<comment (changes)>" <filename>" or
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
225 "cvs -z3 commit <filename>"
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
226 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
227 method).
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
228
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
229 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
230 shouldn't have any troubles with CVS maintainers at all.
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
231 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
232 very good points, so don't complain.