1 <?
include ("barry.inc"); ?
>
3 <?
createHeader("Submitting Patches"); ?
>
5 <?
createSubHeader("Coding Guidelines"); ?
>
7 <p
>If you are submitting code
, please have a look at the
8 <?
createLink("codingguide", "Coding Guidelines page"); ?
>.</p
>
10 <p
>Please keep some things in mind when preparing your patches
13 <li
>use one patch per logical change
</li
>
14 <li
>test all coding changes
</li
>
16 <li
>If it is a change to the build system
, make sure that
17 the test
/buildtest
.sh script still works
.</li
>
19 <li
>include some commentary above your patch in your email
</li
>
20 <li
>when mailing patches
, try to keep one patch per email
</li
>
21 <li
>do not cut
and paste patches
... either read them in
22 directly to your mail
body (preferred
),
23 or send
as an attachment
</li
>
24 <li
>add a
[PATCH
] prefix to your subject line
</li
>
29 <?
createSubHeader("Why Submit Patches?"); ?
>
31 <p
>Submitting your changes via patch is a good thing
. It may seem like
32 an extra bit of work to create a patch
and post it to the mailing
list,
33 or to make your work available in a
public git repo
, but there are good
34 reasons why Open Source works that way
:</p
>
37 <li
>Patches tell the maintainer that you
<b
>want
</b
> your change
38 to be added to the tree
. It is often too easy
for busy
39 programmers to misunderstand someone
's intentions if
40 they just send a random file. If intentions are not
41 clear, work gets dropped on the floor.</li>
42 <li>Patches show that you have worked with the source code,
43 and hopefully have tested your change.</li>
44 <li>Patches show that you have given some thought to where
45 your changes should go in the tree.</li>
46 <li>Patches to a public mailing list encourage peer review, and show
47 that you are ok with your code being included in a public
49 <li>Patches to a public mailing list or a public repository become
50 part of history, showing who did what, and when.</li>
51 <li>Patches usually get top priority from developers.</li>
52 <li>Patches make life easier for the developers, freeing up their
53 time for more features and bug fixes.</li>
54 <li>Patches turn you into a developer. Your name can be added
55 to the AUTHORS file.</li>
59 <? createSubHeader("Generating Patches"); ?>
61 <p>Generating patches depends on the method you used to get the source code.
63 <li>If you are using a tarball, expand the tarball once into
64 a pristine directory, and again into your "working
65 directory." When you are finished and
69 ./buildgen.sh cleanall
71 diff -ruN barry-orig barry-work > patchfile
75 <li>If you are using CVS, make your changes in your working
76 directory, and then do:
79 ./buildgen.sh cleanall
80 cvs diff -u > patchfile
83 Any new files that you've added to your tree will need
84 to be attached to your patch email
, as CVS has no
85 way to add files without write access to the repository
.
88 <li
>If you are using the git tree
, you can make your changes
89 in your own branch
, and then create patches
for each
93 git format-patch origin/master
101 <? createSubHeader("Methods for Submitting Patches"); ?>
103 <p>Submitting changes can happen in one of three methods:
106 <li>Send a patch to the
107 <a href="http://sourceforge.net/mail/?group_id=153722">mailing list</a>.
110 <li>Publish your own git repository (perhaps by creating a
112 <a href="http://repo.or.cz/">repo.or.cz</a>)
113 and notify the mailing list, indicating the
114 branch you want people to pull from when
117 <li
>Use the
"mob" branch on
<a href
="http://repo.or.cz/w/barry.git">
118 Barry
's git repository</a>, and....
119 send a notification to the mailing list.</li>
124 <? createSubHeader("Creating a Forked Tree on repo.or.cz"); ?>
126 <p>The git repo site repo.or.cz lets anyone create a forked tree based
127 off the official Barry repo. This saves space on repo.or.cz, and
128 adds your fork to a list at the bottom of the official Barry page.</p>
130 <p>This way, users and developers can look at everyone's changes
and
131 test
and mix them
as needed
.</p
>
133 <p
>To create a forked tree
, visit the
<a href
="http://repo.or.cz/w/barry.git">
134 Barry repo
</a
> and click
"fork" at the top
.</p
>
138 <?
createSubHeader("Using the Mob Branch"); ?
>
140 <p
>The
public git repository service at repo
.or.cz provides an interesting
141 feature
, which allows anyone to push to a
"mob" branch of a repository
,
142 if so configured by the admin
.</p
>
144 <p
> It would go something like this
:
146 # clone with mob user
147 git
clone git+ssh
://mob@repo.or.cz/srv/git/barry.git barry
150 git checkout
-b mob origin
/mob
151 git diff origin
/master
..mob
# make sure master == mob
153 git add
... && git commit
155 <
;send email to the
list, include the SHA1 sum of the commit
>
;
159 <p
> This is a novel idea
, as well
as a security risk
for anyone who blindly
160 runs whatever is in the mob branch
. Hence the recommended diff check
161 above
, to make sure you
're working on an official branch.</p>
163 <p> The mob user can only push to the mob branch, so all other branches
164 are read-only, and have been reviewed at least once by the project
167 <p> But the mob branch frees people up to use git, who may not have
168 their own hosting, or who may not want to bother setting up their
169 own git repo. People can use it to collaborate on a feature as well.
170 Let your imagination run wild.</p>
172 <p>You can read more about the ideas behind the mob branch at
173 <a href="http://repo.or.cz/mob.html">the repo.or.cz mob page</a></p>