annotate DOCS/tech/cvs-howto.txt @ 8478:7988573021e8

disable DPMS handling
author pontscho
date Mon, 16 Dec 2002 19:09:34 +0000
parents 98168d30f67d
children f09239e233fe
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
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
2 About CVS write access:
2200
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
3 ~~~~~~~~~~~~~~~~~~~~~~~
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
4
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
5
2200
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
6 I. TECH SIDE:
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
7 =============
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
8
2200
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
9 1. Changing password:
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
10
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
11 As you probably got a restricted CVS-only shell, it's not trivial:
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
12
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
13 ssh LOGIN@mplayerhq.hu passwd
2200
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
14
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
15 Replace LOGIN with your login name. Leave 'passwd' unchanged, it's a command.
2200
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
16
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
17 Note: If you need a real shell for something, tell A'rpi.
2200
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
18
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
19 2. Checking out development source tree:
2200
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
20
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
21 export CVS_RSH=ssh
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
22 cvs -z3 -d:ext:LOGIN@mplayerhq.hu:/cvsroot/mplayer co main
2200
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
23
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
24 NOTE: cvs -d:pserver: mode doesn't allow writing, even with password!
3149
fc5a2369696e extended a bit
arpi
parents: 2200
diff changeset
25
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
26 3. Committing changes:
2200
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
27
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
28 cvs -z3 commit -m "comment - what you changed and why" filename(s)
2200
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
29
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
30 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
31 You don't have to include the filename in the comment, as comments are linked
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
32 to files. If you have different comments for different files, commit them
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
33 separately, not at the same time. If you leave out -m at the command line you
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
34 will be prompted for a comment in an editor.
3149
fc5a2369696e extended a bit
arpi
parents: 2200
diff changeset
35
2200
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
36 4. Adding new files/dirs:
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
37
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
38 cvs add filename/dirname
2200
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
39
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
40 5. Removing files:
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
41
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
42 rm filename
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
43 cvs remove filename
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
44 cvs commit -m "reason for removing this file" filename
2200
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
45
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
46 6. Checking changes:
2200
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
47
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
48 cvs -z3 diff -u filename(s)
2200
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
49
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
50 It's recommended to check changes before committing. especially if you forget
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
51 what you changed :)
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
52 This way you will see if your patch has debug stuff or indentation changes
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
53 and you can fix it before committing and triggering me to use cvs-backup.
3149
fc5a2369696e extended a bit
arpi
parents: 2200
diff changeset
54
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
55 7. Checking changelog:
2200
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
56
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
57 cvs -z3 log filename(s)
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
58
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
59 8. Renaming/moving files or content of files:
2200
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
60
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
61 You CANNOT do that. Ask the CVS server admin (A'rpi) to do it!
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
62 Do NOT remove & re-add a file - it will kill the changelog!!!!
2200
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
63
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
64 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
65 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
66 those changes untraceable!
5415
e9b15870e82f updates - thanks to Melanson...
arpi
parents: 4410
diff changeset
67
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
68 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
69 so try to avoid them.
5415
e9b15870e82f updates - thanks to Melanson...
arpi
parents: 4410
diff changeset
70
e9b15870e82f updates - thanks to Melanson...
arpi
parents: 4410
diff changeset
71
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
72 Contact A'rpi <arpi@thot.banki.hu> if you have technical problems with the CVS
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
73 server.
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
74
2200
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
75
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
76
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
77 II. POLICY / RULES:
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
78 ===================
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
79
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
80 1. You shouldn't commit code which breaks MPlayer! (Meaning unfinished but
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
81 enabled code which breaks compilation or compiles but does not work.)
2200
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
82
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
83 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
84 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
85 (portability, exploits compiler bugs, unusual environment etc) they will be
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
86 reported and eventually fixed.
2200
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
87
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
88 3. You can commit unfinished stuff (for testing etc), but it must be disabled
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
89 (#ifdef etc) by default.
2200
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
90
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
91 4. Do not change behavior of the program (renaming options etc) without
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
92 discussing it first at the mplayer-dev-eng mailing list. Do not remove
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
93 functionality from the code. Just improve!
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
94
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
95 5. We refuse source indentation and other cosmetical changes, such commits will
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
96 be rejected and removed. Every developer has his own indentation style, you
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
97 should not change it. Of course if you (re)write something, you can use your
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
98 own style... (Many projects force a given indentation style - we don't.)
5415
e9b15870e82f updates - thanks to Melanson...
arpi
parents: 4410
diff changeset
99
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
100 Note: If you had to put if(){ .. } over a large (> 5 lines) chunk of code,
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
101 do NOT change the indentation of the inner part (move it right)!
2200
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
102
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
103 6. Always fill out the comment at committing (-m switch of CVS, or in the
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
104 editor if you left out -m). Describe in a few lines (usually one line is
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
105 enough) what you changed and why. You can refer to mailing list postings if
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
106 you fix a particular bug. Comments such as "fixed!" or "Changed it." are not
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
107 acceptable.
2200
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
108
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
109 7. If you apply a patch by someone else, include his name and email address in
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
110 the CVS comment! Do NOT commit patches for other developer's code (code not
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
111 maintained by you) without his permission! If he didn't commit - he probably
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
112 has a reason!
2200
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
113
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
114 8. A'rpi developed something called cvs-backup. It archives the CVS repository
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
115 after each commit - so commits can be reversed (without messing up the
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
116 changelog) if they are bad. If you think your bug fix or other change was
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
117 bad and unneeded, ask A'rpi to reverse it instead of committing the previous
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
118 version!
4410
2618318f988b DOCS thingie added
arpi
parents: 3258
diff changeset
119
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
120 9. You will have write access to DOCS/. This used to be different to avoid
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
121 breaking docs or getting translations or the homepage desynced. If you are
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
122 unsure about this, send a patch to dev-eng, the documentation maintainers
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
123 will review and commit your stuff.
2200
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
124
5415
e9b15870e82f updates - thanks to Melanson...
arpi
parents: 4410
diff changeset
125 Also read patches.txt !!!!
e9b15870e82f updates - thanks to Melanson...
arpi
parents: 4410
diff changeset
126
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
127 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
128
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
129
3258
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
130
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
131 III. Beginners Guide by David Holm
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
132 ====================
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
133
3258
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
134 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
135 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
136 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
137 most common pitfalls leading to CVS ban.
3258
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
138 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
139 that my CVS commits are proper and won't get me banned.
3258
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
140
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
141 1. You should set up two directoress for MPlayer, one which contains the stable
3258
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
142 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
143 The other should be your development directory and have the CVS/Root set to
3258
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
144 :pserver: instead of :ext:, that way you can't commit development code
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
145 by accident (since only :ext: allows writes).
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
146 This is my setup:
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
147 ~/mplayer
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
148 /main
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
149 /main.dev
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
150 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
151 call your directories is entirely up to you. This is _only_ an example.
3258
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
152
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
153 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
154 ready to commit the changes to CVS start by doing the following in the
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
155 "~/mplayer" dir":
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
156 diff -Nur -x "CVS" -x ".*" main main.dev > dev2stable
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
157 dev2stable is the filename for the patchfile, it doesn't matter what you
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
158 call it.
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
159
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
160 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
161 (comes with Midnight Commander) since it does syntax highlighting in patches
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
162 (= 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
163 (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
164 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
165
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
166 Read through the patch and remove all occurrences of:
3258
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
167
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
168 * diff -Nur.... that are affecting files YOU have NOT modified. These
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
169 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
170 out at the same time)
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
171 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
172 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
173 file.
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
174
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
175 * 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
176 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
177 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
178 binaries).
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
179
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
180 * 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
181 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
182 @@ -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
183 _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
184 break the patch!.
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
185 Example:
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
186 ...
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
187 @@ -15,34 +15,6 @@
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
188 - old_option;
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
189 + new_option;
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
190 @@ -65,13 +65,3 @@
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
191 ...
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
192
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
193 OK:
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
194 ...
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
195 @@ -65,13 +65,3 @@
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
196 ...
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
197
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
198 Will break patch:
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
199 ...
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
200 @@ -15,34 +15,6 @@
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
201 old_option;
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
202 @@ -65,13 +65,3 @@
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
203 ...
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
204
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
205 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
206 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
207 then edit the file in "main" after I've applied the patch.
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
208
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
209 * 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
210 This should be done in two steps:
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
211 1. enter "main" and run
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
212
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
213 patch -p1 --dry-run < ../dev2stable
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
214
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
215 -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
216 "main" directory and that should be stripped when patching, if you
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
217 run it from "~/mplayer" you would use -p0).
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
218 --dry-run means that patch does everything it normally does but
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
219 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
220 your patch works or not.
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
221 "../dev2stable" is your patchfile. (don't forget the '<')
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
222 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
223 why it failed, make a new patch and try again.
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
224
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
225 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
226 and you are done with the patching part =).
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
227
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
228 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
229 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
230 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
231 bleeding if you want to keep CVS access!)
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
232 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
233 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
234 new files (discuss it on dev-eng before adding new files!).
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
235 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
236 you will commit:
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
237
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
238 cvs -z3 diff -u <filename> > <filename.d>
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
239
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
240 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
241 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
242 updated local file.
3258
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
243 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
244
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
245 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
246 look something like this:
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
247
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
248 -
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
249 +
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
250
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
251 That means you have added or removed tabs or spaces on that line.
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
252 That qualifies as a cosmetical change and is disallowed. Edit the
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
253 file and put back/remove the added/removed tabs/spaces.
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
254 Rediff the file and make sure the cosmetic changes are fixed.
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
255
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
256 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
257 anything. Commit one file at a time!
3258
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
258
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
259 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
260 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
261 following command in "main" for each file you want to commit:
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
262
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
263 cvs -z3 commit -m "<comment (changes)>" <filename>
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
264 cvs -z3 commit <filename>
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
265
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
266 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
267 prefer this method).
3258
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
268
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
269 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
270 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
271 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
272 he made some very good points, so don't complain.