annotate DOCS/tech/svn-howto.txt @ 18769:62455ce744c9

rename cvs-howto.txt to svn-howto.txt
author ivo
date Wed, 21 Jun 2006 12:56:42 +0000
parents DOCS/tech/cvs-howto.txt@a301e6ca6aca
children 67f847c438bd
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
18660
7548a6a100da CVS --> Subversion
diego
parents: 18136
diff changeset
2 About Subversion write access:
7548a6a100da CVS --> Subversion
diego
parents: 18136
diff changeset
3 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2200
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
4
18705
9a731c61c870 CVS --> Subversion
ivo
parents: 18660
diff changeset
5 Before everything else, you should know how to use Subversion properly.
9a731c61c870 CVS --> Subversion
ivo
parents: 18660
diff changeset
6 Subversion comes with some documentation.
11395
5484bc13e90a Some notes about general CVS documentation added, new 'cvs admin' section
diego
parents: 9537
diff changeset
7
18705
9a731c61c870 CVS --> Subversion
ivo
parents: 18660
diff changeset
8 svn help
9a731c61c870 CVS --> Subversion
ivo
parents: 18660
diff changeset
9 man svn
9a731c61c870 CVS --> Subversion
ivo
parents: 18660
diff changeset
10 info svn
11395
5484bc13e90a Some notes about general CVS documentation added, new 'cvs admin' section
diego
parents: 9537
diff changeset
11
18705
9a731c61c870 CVS --> Subversion
ivo
parents: 18660
diff changeset
12 are a good start. The most comprehensive manual is the book "Version Control
9a731c61c870 CVS --> Subversion
ivo
parents: 18660
diff changeset
13 with Subversion" by Ben Collins-Sussman, Brian W. Fitzpatrick and C. Michael
9a731c61c870 CVS --> Subversion
ivo
parents: 18660
diff changeset
14 Pilato. It can be viewed online at
11395
5484bc13e90a Some notes about general CVS documentation added, new 'cvs admin' section
diego
parents: 9537
diff changeset
15
18705
9a731c61c870 CVS --> Subversion
ivo
parents: 18660
diff changeset
16 http://svnbook.org/
11395
5484bc13e90a Some notes about general CVS documentation added, new 'cvs admin' section
diego
parents: 9537
diff changeset
17
18705
9a731c61c870 CVS --> Subversion
ivo
parents: 18660
diff changeset
18 For more information about the Subversion project, visit
11395
5484bc13e90a Some notes about general CVS documentation added, new 'cvs admin' section
diego
parents: 9537
diff changeset
19
18705
9a731c61c870 CVS --> Subversion
ivo
parents: 18660
diff changeset
20 http://subversion.tigris.org/
11395
5484bc13e90a Some notes about general CVS documentation added, new 'cvs admin' section
diego
parents: 9537
diff changeset
21
5484bc13e90a Some notes about general CVS documentation added, new 'cvs admin' section
diego
parents: 9537
diff changeset
22 Consult these resources whenever you have problems, they are quite exhaustive.
5484bc13e90a Some notes about general CVS documentation added, new 'cvs admin' section
diego
parents: 9537
diff changeset
23 What follows now are MPlayer specific guidelines.
5484bc13e90a Some notes about general CVS documentation added, new 'cvs admin' section
diego
parents: 9537
diff changeset
24
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
25
2200
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
26 I. TECH SIDE:
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
18706
7fb537ba7c96 More CVS --> Subversion changes
ivo
parents: 18705
diff changeset
29 1. Checking out development source tree:
2200
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
30
18706
7fb537ba7c96 More CVS --> Subversion changes
ivo
parents: 18705
diff changeset
31 svn checkout svn://svn.mplayerhq.hu/mplayer/trunk/
2200
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
32
18706
7fb537ba7c96 More CVS --> Subversion changes
ivo
parents: 18705
diff changeset
33 2. Updating source tree to latest revision:
7fb537ba7c96 More CVS --> Subversion changes
ivo
parents: 18705
diff changeset
34
7fb537ba7c96 More CVS --> Subversion changes
ivo
parents: 18705
diff changeset
35 svn update
12024
f7980032d9ca whitespace cosmetics
diego
parents: 11679
diff changeset
36
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
37 3. Committing changes:
2200
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
38
18767
a301e6ca6aca minor Subversion-related changes
diego
parents: 18764
diff changeset
39 svn update
18706
7fb537ba7c96 More CVS --> Subversion changes
ivo
parents: 18705
diff changeset
40 svn commit --username USERNAME filename(s)
12024
f7980032d9ca whitespace cosmetics
diego
parents: 11679
diff changeset
41
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
42 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
43 You don't have to include the filename in the comment, as comments are linked
12099
8dedd440c31c Commit independent changes separately.
diego
parents: 12025
diff changeset
44 to files. If you have made several independent changes, commit them
13288
78d00bbba153 CVS policy updated as discussed on dev-eng.
diego
parents: 12904
diff changeset
45 separately, not at the same time. You will be prompted for a comment in an
18706
7fb537ba7c96 More CVS --> Subversion changes
ivo
parents: 18705
diff changeset
46 editor, which is either specified by --editor-cmd on the command line, set
7fb537ba7c96 More CVS --> Subversion changes
ivo
parents: 18705
diff changeset
47 in your personal configuration file (~/.subversion/config) or set by one of
7fb537ba7c96 More CVS --> Subversion changes
ivo
parents: 18705
diff changeset
48 the following environment variables: SVN_EDITOR, VISUAL or EDITOR. When
7fb537ba7c96 More CVS --> Subversion changes
ivo
parents: 18705
diff changeset
49 prompted for a password, type the password you got assigned by the Subversion
7fb537ba7c96 More CVS --> Subversion changes
ivo
parents: 18705
diff changeset
50 server admin. By default, Subversion caches all authentication tokens. This
7fb537ba7c96 More CVS --> Subversion changes
ivo
parents: 18705
diff changeset
51 behaviour can be disabled by setting both 'store-passwords' and
7fb537ba7c96 More CVS --> Subversion changes
ivo
parents: 18705
diff changeset
52 'store-auth-creds' to "no" in ~/.subversion/config. You might need to remove
7fb537ba7c96 More CVS --> Subversion changes
ivo
parents: 18705
diff changeset
53 previous cache files, which are located in ~/.subversion/auth, by hand.
12024
f7980032d9ca whitespace cosmetics
diego
parents: 11679
diff changeset
54
18767
a301e6ca6aca minor Subversion-related changes
diego
parents: 18764
diff changeset
55 4. Adding new files/directories:
2200
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
56
18706
7fb537ba7c96 More CVS --> Subversion changes
ivo
parents: 18705
diff changeset
57 svn add filename/dirname
18767
a301e6ca6aca minor Subversion-related changes
diego
parents: 18764
diff changeset
58 svn commit filename/dirname
12024
f7980032d9ca whitespace cosmetics
diego
parents: 11679
diff changeset
59
2200
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
60 5. Removing files:
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
61
18706
7fb537ba7c96 More CVS --> Subversion changes
ivo
parents: 18705
diff changeset
62 svn delete filename
7fb537ba7c96 More CVS --> Subversion changes
ivo
parents: 18705
diff changeset
63 svn commit filename
12024
f7980032d9ca whitespace cosmetics
diego
parents: 11679
diff changeset
64
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
65 6. Checking changes:
12024
f7980032d9ca whitespace cosmetics
diego
parents: 11679
diff changeset
66
18706
7fb537ba7c96 More CVS --> Subversion changes
ivo
parents: 18705
diff changeset
67 svn diff filename(s)
12024
f7980032d9ca whitespace cosmetics
diego
parents: 11679
diff changeset
68
13288
78d00bbba153 CVS policy updated as discussed on dev-eng.
diego
parents: 12904
diff changeset
69 Doublecheck your changes before committing to avoid trouble later on.
78d00bbba153 CVS policy updated as discussed on dev-eng.
diego
parents: 12904
diff changeset
70 This way you will see if your patch has debug stuff or indentation
78d00bbba153 CVS policy updated as discussed on dev-eng.
diego
parents: 12904
diff changeset
71 changes and you can fix it before committing and triggering flames.
12024
f7980032d9ca whitespace cosmetics
diego
parents: 11679
diff changeset
72
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
73 7. Checking changelog:
2200
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
74
18706
7fb537ba7c96 More CVS --> Subversion changes
ivo
parents: 18705
diff changeset
75 svn log filename(s)
7fb537ba7c96 More CVS --> Subversion changes
ivo
parents: 18705
diff changeset
76
7fb537ba7c96 More CVS --> Subversion changes
ivo
parents: 18705
diff changeset
77 You may also find viewvc, a web frontend for Subversion, helpful. It's often
7fb537ba7c96 More CVS --> Subversion changes
ivo
parents: 18705
diff changeset
78 more comfortable than using svn log and svn diff. Find it here:
7fb537ba7c96 More CVS --> Subversion changes
ivo
parents: 18705
diff changeset
79 http://svn.mplayerhq.hu/mplayer/trunk/
13288
78d00bbba153 CVS policy updated as discussed on dev-eng.
diego
parents: 12904
diff changeset
80
18706
7fb537ba7c96 More CVS --> Subversion changes
ivo
parents: 18705
diff changeset
81 8. Renaming/moving files or content of files:
12024
f7980032d9ca whitespace cosmetics
diego
parents: 11679
diff changeset
82
18706
7fb537ba7c96 More CVS --> Subversion changes
ivo
parents: 18705
diff changeset
83 svn move source destination
7fb537ba7c96 More CVS --> Subversion changes
ivo
parents: 18705
diff changeset
84 svn commit source destination
2200
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
85
18706
7fb537ba7c96 More CVS --> Subversion changes
ivo
parents: 18705
diff changeset
86 Do not move or rename files before discussing it on the mplayer-dev-eng
7fb537ba7c96 More CVS --> Subversion changes
ivo
parents: 18705
diff changeset
87 mailing list first!
2200
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
88
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
89 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
90 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
91 those changes untraceable!
5415
e9b15870e82f updates - thanks to Melanson...
arpi
parents: 4410
diff changeset
92
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
93 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
94 so try to avoid them.
11395
5484bc13e90a Some notes about general CVS documentation added, new 'cvs admin' section
diego
parents: 9537
diff changeset
95
5484bc13e90a Some notes about general CVS documentation added, new 'cvs admin' section
diego
parents: 9537
diff changeset
96 9. Reverting broken commits
5484bc13e90a Some notes about general CVS documentation added, new 'cvs admin' section
diego
parents: 9537
diff changeset
97
18706
7fb537ba7c96 More CVS --> Subversion changes
ivo
parents: 18705
diff changeset
98 There is no Subversion equivalent of the 'cvs admin -o' command. Instead,
7fb537ba7c96 More CVS --> Subversion changes
ivo
parents: 18705
diff changeset
99 be very careful about what you commit! If somehow you broke something,
7fb537ba7c96 More CVS --> Subversion changes
ivo
parents: 18705
diff changeset
100 revert the changes locally and re-commit with a proper commit message.
7fb537ba7c96 More CVS --> Subversion changes
ivo
parents: 18705
diff changeset
101 You may want to use 'svn cat -r<revision> filename' to inspect an older
7fb537ba7c96 More CVS --> Subversion changes
ivo
parents: 18705
diff changeset
102 revision.
15227
167085fd11af 'cvs admin -o' is dangerous and should be handled with extra care.
diego
parents: 14856
diff changeset
103
18706
7fb537ba7c96 More CVS --> Subversion changes
ivo
parents: 18705
diff changeset
104 10. Checking status of source tree
12025
124734dc7c66 Explain why 'cvs admin' should only be used on the last revision of a file.
diego
parents: 12024
diff changeset
105
18706
7fb537ba7c96 More CVS --> Subversion changes
ivo
parents: 18705
diff changeset
106 svn status
11395
5484bc13e90a Some notes about general CVS documentation added, new 'cvs admin' section
diego
parents: 9537
diff changeset
107
18706
7fb537ba7c96 More CVS --> Subversion changes
ivo
parents: 18705
diff changeset
108 This will detect all the changes you made and list what actions will be
7fb537ba7c96 More CVS --> Subversion changes
ivo
parents: 18705
diff changeset
109 taken in case of a commit (Additions, Modifications, Deletions, et cetera).
11395
5484bc13e90a Some notes about general CVS documentation added, new 'cvs admin' section
diego
parents: 9537
diff changeset
110
18706
7fb537ba7c96 More CVS --> Subversion changes
ivo
parents: 18705
diff changeset
111 11. Reverting local changes
14806
6abe4fb845ff mphq uses ssh.com, explain RSA key generation for it.
diego
parents: 14059
diff changeset
112
18706
7fb537ba7c96 More CVS --> Subversion changes
ivo
parents: 18705
diff changeset
113 svn revert filename(s)
14806
6abe4fb845ff mphq uses ssh.com, explain RSA key generation for it.
diego
parents: 14059
diff changeset
114
18706
7fb537ba7c96 More CVS --> Subversion changes
ivo
parents: 18705
diff changeset
115 In case you made a lot of local changes to a file and want to start over
7fb537ba7c96 More CVS --> Subversion changes
ivo
parents: 18705
diff changeset
116 with a fresh checkout of that file, you can use svn revert filename(s).
7fb537ba7c96 More CVS --> Subversion changes
ivo
parents: 18705
diff changeset
117 NOTE: This has nothing to do with reverting changes on the Subversion
7fb537ba7c96 More CVS --> Subversion changes
ivo
parents: 18705
diff changeset
118 server! It only reverts changes that were not committed yet. If you need
7fb537ba7c96 More CVS --> Subversion changes
ivo
parents: 18705
diff changeset
119 to revert a broken commit, see 9.
11395
5484bc13e90a Some notes about general CVS documentation added, new 'cvs admin' section
diego
parents: 9537
diff changeset
120
18764
5b89070daa50 add command for changing commit messages after the commit took place.
ivo
parents: 18706
diff changeset
121 12. Changing commit messages
5b89070daa50 add command for changing commit messages after the commit took place.
ivo
parents: 18706
diff changeset
122
5b89070daa50 add command for changing commit messages after the commit took place.
ivo
parents: 18706
diff changeset
123 svn propedit svn:log --revprop -r <revision>
5b89070daa50 add command for changing commit messages after the commit took place.
ivo
parents: 18706
diff changeset
124
5b89070daa50 add command for changing commit messages after the commit took place.
ivo
parents: 18706
diff changeset
125 If your commit message is too short or not explanatory enough, you can edit
5b89070daa50 add command for changing commit messages after the commit took place.
ivo
parents: 18706
diff changeset
126 it afterwards with svn propedit.
5b89070daa50 add command for changing commit messages after the commit took place.
ivo
parents: 18706
diff changeset
127
14856
7b1198123519 Arpi prefers root@mphq for CVS problems.
diego
parents: 14806
diff changeset
128 Contact the project admin <root at mplayerhq dot hu> if you have technical
18706
7fb537ba7c96 More CVS --> Subversion changes
ivo
parents: 18705
diff changeset
129 problems with the Subversion server.
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
130
2200
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
131
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
132
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
133 II. POLICY / RULES:
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
134 ===================
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
135
13288
78d00bbba153 CVS policy updated as discussed on dev-eng.
diego
parents: 12904
diff changeset
136 1. You must not commit code which breaks MPlayer! (Meaning unfinished but
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
137 enabled code which breaks compilation or compiles but does not work.)
13288
78d00bbba153 CVS policy updated as discussed on dev-eng.
diego
parents: 12904
diff changeset
138 You can commit unfinished stuff (for testing etc), but it must be disabled
78d00bbba153 CVS policy updated as discussed on dev-eng.
diego
parents: 12904
diff changeset
139 (#ifdef etc) by default so it does not interfere with other developers'
78d00bbba153 CVS policy updated as discussed on dev-eng.
diego
parents: 12904
diff changeset
140 work.
2200
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
141
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
142 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
143 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
144 (portability, exploits compiler bugs, unusual environment etc) they will be
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
145 reported and eventually fixed.
2200
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
146
13288
78d00bbba153 CVS policy updated as discussed on dev-eng.
diego
parents: 12904
diff changeset
147 3. Do not commit unrelated changes together, split them into self-contained
78d00bbba153 CVS policy updated as discussed on dev-eng.
diego
parents: 12904
diff changeset
148 pieces.
2200
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
149
17578
22632c215d59 Clarify policy on feature removal.
rathann
parents: 17054
diff changeset
150 4. Do not change behavior of the program (renaming options etc) or
17579
f1ce086b5eed Clarify feature removal policy: it must be approved on the mailing list.
rathann
parents: 17578
diff changeset
151 remove functionality from the code without approval in a discussion on
f1ce086b5eed Clarify feature removal policy: it must be approved on the mailing list.
rathann
parents: 17578
diff changeset
152 the mplayer-dev-eng mailing list.
12024
f7980032d9ca whitespace cosmetics
diego
parents: 11679
diff changeset
153
13288
78d00bbba153 CVS policy updated as discussed on dev-eng.
diego
parents: 12904
diff changeset
154 5. Do not commit changes to the build system (Makefiles, configure script)
78d00bbba153 CVS policy updated as discussed on dev-eng.
diego
parents: 12904
diff changeset
155 which change behaviour, defaults etc, without asking first. The same
78d00bbba153 CVS policy updated as discussed on dev-eng.
diego
parents: 12904
diff changeset
156 applies to compiler warning fixes, trivial looking fixes and to code
78d00bbba153 CVS policy updated as discussed on dev-eng.
diego
parents: 12904
diff changeset
157 maintained by other developers. We usually have a reason for doing things
78d00bbba153 CVS policy updated as discussed on dev-eng.
diego
parents: 12904
diff changeset
158 the way we do. Send your changes as patches to the mplayer-dev-eng mailing
78d00bbba153 CVS policy updated as discussed on dev-eng.
diego
parents: 12904
diff changeset
159 list, and if the code maintainers say OK, you may commit. This does not
78d00bbba153 CVS policy updated as discussed on dev-eng.
diego
parents: 12904
diff changeset
160 apply to files you wrote and/or maintain.
78d00bbba153 CVS policy updated as discussed on dev-eng.
diego
parents: 12904
diff changeset
161
78d00bbba153 CVS policy updated as discussed on dev-eng.
diego
parents: 12904
diff changeset
162 6. We refuse source indentation and other cosmetic changes if they are mixed
78d00bbba153 CVS policy updated as discussed on dev-eng.
diego
parents: 12904
diff changeset
163 with functional changes, such commits will be rejected and removed. Every
78d00bbba153 CVS policy updated as discussed on dev-eng.
diego
parents: 12904
diff changeset
164 developer has his own indentation style, you should not change it. Of course
78d00bbba153 CVS policy updated as discussed on dev-eng.
diego
parents: 12904
diff changeset
165 if you (re)write something, you can use your own style... (Many projects
78d00bbba153 CVS policy updated as discussed on dev-eng.
diego
parents: 12904
diff changeset
166 force a given indentation style - we don't.) If you really need to make
78d00bbba153 CVS policy updated as discussed on dev-eng.
diego
parents: 12904
diff changeset
167 indentation changes (try to avoid this), separate them strictly from real
78d00bbba153 CVS policy updated as discussed on dev-eng.
diego
parents: 12904
diff changeset
168 changes.
12024
f7980032d9ca whitespace cosmetics
diego
parents: 11679
diff changeset
169
f7980032d9ca whitespace cosmetics
diego
parents: 11679
diff changeset
170 NOTE: If you had to put if(){ .. } over a large (> 5 lines) chunk of code,
13288
78d00bbba153 CVS policy updated as discussed on dev-eng.
diego
parents: 12904
diff changeset
171 do NOT change the indentation of the inner part (don't move it to the right)!
2200
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
172
13288
78d00bbba153 CVS policy updated as discussed on dev-eng.
diego
parents: 12904
diff changeset
173 7. Always fill out the commit log message. Describe in a few lines what you
78d00bbba153 CVS policy updated as discussed on dev-eng.
diego
parents: 12904
diff changeset
174 changed and why. You can refer to mailing list postings if you fix a
78d00bbba153 CVS policy updated as discussed on dev-eng.
diego
parents: 12904
diff changeset
175 particular bug. Comments such as "fixed!" or "Changed it." are unacceptable.
2200
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
176
13288
78d00bbba153 CVS policy updated as discussed on dev-eng.
diego
parents: 12904
diff changeset
177 8. If you apply a patch by someone else, include the name and email address in
18660
7548a6a100da CVS --> Subversion
diego
parents: 18136
diff changeset
178 the log message. Since the mplayer-cvslog mailing list is publicly
13288
78d00bbba153 CVS policy updated as discussed on dev-eng.
diego
parents: 12904
diff changeset
179 archived you should add some spam protection to the email address. Send an
78d00bbba153 CVS policy updated as discussed on dev-eng.
diego
parents: 12904
diff changeset
180 answer to mplayer-dev-eng (or wherever you got the patch from) saying that
17054
6ae6b30282da grammar fix on the documentation-updates note
wanderer
parents: 17051
diff changeset
181 you applied the patch. If the patch contains a documentation change, commit
6ae6b30282da grammar fix on the documentation-updates note
wanderer
parents: 17051
diff changeset
182 that as well; do not leave it to the documentation maintainers.
2200
1333f6184ad3 some ifno for cvs write owners
arpi
parents:
diff changeset
183
13288
78d00bbba153 CVS policy updated as discussed on dev-eng.
diego
parents: 12904
diff changeset
184 9. Do NOT commit to code actively maintained by others without permission. Send
78d00bbba153 CVS policy updated as discussed on dev-eng.
diego
parents: 12904
diff changeset
185 a patch to mplayer-dev-eng instead.
12107
bc89ddda34b8 Developers should subscribe to mplayer-cvslog, mention mplayer-docs.
diego
parents: 12099
diff changeset
186
18660
7548a6a100da CVS --> Subversion
diego
parents: 18136
diff changeset
187 10. Subscribe to the mplayer-cvslog mailing list. The diffs of all commits
12107
bc89ddda34b8 Developers should subscribe to mplayer-cvslog, mention mplayer-docs.
diego
parents: 12099
diff changeset
188 are sent there and reviewed by all the other developers. Bugs and possible
bc89ddda34b8 Developers should subscribe to mplayer-cvslog, mention mplayer-docs.
diego
parents: 12099
diff changeset
189 improvements or general questions regarding commits are discussed there. We
bc89ddda34b8 Developers should subscribe to mplayer-cvslog, mention mplayer-docs.
diego
parents: 12099
diff changeset
190 expect you to react if problems with your code are uncovered.
12024
f7980032d9ca whitespace cosmetics
diego
parents: 11679
diff changeset
191
13288
78d00bbba153 CVS policy updated as discussed on dev-eng.
diego
parents: 12904
diff changeset
192 11. Update the documentation if you change behavior or add features. If you are
78d00bbba153 CVS policy updated as discussed on dev-eng.
diego
parents: 12904
diff changeset
193 unsure how best to do this, send a patch to mplayer-docs, the documentation
78d00bbba153 CVS policy updated as discussed on dev-eng.
diego
parents: 12904
diff changeset
194 maintainers will review and commit your stuff.
78d00bbba153 CVS policy updated as discussed on dev-eng.
diego
parents: 12904
diff changeset
195
12099
8dedd440c31c Commit independent changes separately.
diego
parents: 12025
diff changeset
196 Also read DOCS/tech/patches.txt !!!!
5415
e9b15870e82f updates - thanks to Melanson...
arpi
parents: 4410
diff changeset
197
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
198 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
199
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
200
3258
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
201
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
202 III. Beginners Guide by David Holm
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
203 ====================
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
204
3258
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
205 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
206 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
207 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
208 most common pitfalls leading to CVS ban.
3258
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
209 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
210 that my CVS commits are proper and won't get me banned.
3258
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
211
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
212 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
213 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
214 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
215 :pserver: instead of :ext:, that way you can't commit development code
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
216 by accident (since only :ext: allows writes).
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
217 This is my setup:
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
218 ~/mplayer
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
219 /main
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
220 /main.dev
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
221 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
222 call your directories is entirely up to you. This is _only_ an example.
3258
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
223
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
224 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
225 ready to commit the changes to CVS start by doing the following in the
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
226 "~/mplayer" dir":
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
227 diff -Nur -x "CVS" -x ".*" main main.dev > dev2stable
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
228 dev2stable is the filename for the patchfile, it doesn't matter what you
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
229 call it.
12024
f7980032d9ca whitespace cosmetics
diego
parents: 11679
diff changeset
230
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
231 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
232 (comes with Midnight Commander) since it does syntax highlighting in patches
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
233 (= 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
234 (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
235 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
236
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
237 Read through the patch and remove all occurrences of:
3258
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
238
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
239 * diff -Nur.... that are affecting files YOU have NOT modified. These
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
240 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
241 out at the same time)
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
242 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
243 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
244 file.
12024
f7980032d9ca whitespace cosmetics
diego
parents: 11679
diff changeset
245
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
246 * 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
247 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
248 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
249 binaries).
12024
f7980032d9ca whitespace cosmetics
diego
parents: 11679
diff changeset
250
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
251 * 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
252 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
253 @@ -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
254 _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
255 break the patch!.
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
256 Example:
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
257 ...
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
258 @@ -15,34 +15,6 @@
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
259 - old_option;
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
260 + new_option;
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
261 @@ -65,13 +65,3 @@
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
262 ...
12024
f7980032d9ca whitespace cosmetics
diego
parents: 11679
diff changeset
263
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
264 OK:
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 @@ -65,13 +65,3 @@
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
267 ...
12024
f7980032d9ca whitespace cosmetics
diego
parents: 11679
diff changeset
268
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
269 Will break patch:
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
270 ...
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
271 @@ -15,34 +15,6 @@
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
272 old_option;
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
273 @@ -65,13 +65,3 @@
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
274 ...
12024
f7980032d9ca whitespace cosmetics
diego
parents: 11679
diff changeset
275
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
276 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
277 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
278 then edit the file in "main" after I've applied the patch.
12024
f7980032d9ca whitespace cosmetics
diego
parents: 11679
diff changeset
279
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
280 * 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
281 This should be done in two steps:
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
282 1. enter "main" and run
12024
f7980032d9ca whitespace cosmetics
diego
parents: 11679
diff changeset
283
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
284 patch -p1 --dry-run < ../dev2stable
12024
f7980032d9ca whitespace cosmetics
diego
parents: 11679
diff changeset
285
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
286 -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
287 "main" directory and that should be stripped when patching, if you
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
288 run it from "~/mplayer" you would use -p0).
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
289 --dry-run means that patch does everything it normally does but
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
290 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
291 your patch works or not.
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
292 "../dev2stable" is your patchfile. (don't forget the '<')
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
293 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
294 why it failed, make a new patch and try again.
12024
f7980032d9ca whitespace cosmetics
diego
parents: 11679
diff changeset
295
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
296 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
297 and you are done with the patching part =).
12024
f7980032d9ca whitespace cosmetics
diego
parents: 11679
diff changeset
298
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
299 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
300 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
301 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
302 bleeding if you want to keep CVS access!)
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
303 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
304 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
305 new files (discuss it on dev-eng before adding new files!).
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
306 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
307 you will commit:
12024
f7980032d9ca whitespace cosmetics
diego
parents: 11679
diff changeset
308
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
309 cvs -z3 diff -u <filename> > <filename.d>
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
310
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
311 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
312 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
313 updated local file.
3258
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
314 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
315
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
316 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
317 look something like this:
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
318
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
319 -
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
320 +
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
321
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
322 That means you have added or removed tabs or spaces on that line.
12904
diego
parents: 12873
diff changeset
323 That qualifies as a cosmetic change and is disallowed. Edit the
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
324 file and put back/remove the added/removed tabs/spaces.
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
325 Rediff the file and make sure the cosmetic changes are fixed.
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
326
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
327 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
328 anything. Commit one file at a time!
3258
d7bd32263398 Added a beginners guide
mswitch
parents: 3149
diff changeset
329
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
330 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
331 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
332 following command in "main" for each file you want to commit:
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
333
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
334 cvs -z3 commit -m "<comment (changes)>" <filename>
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
335 cvs -z3 commit <filename>
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
336
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
337 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
338 prefer this method).
12024
f7980032d9ca whitespace cosmetics
diego
parents: 11679
diff changeset
339
7904
98168d30f67d Spellchecked, reworded, reformatted, small additions and corrections.
diego
parents: 5415
diff changeset
340 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
341 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
342 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
343 he made some very good points, so don't complain.