You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by cr...@apache.org on 2003/11/18 03:45:06 UTC
cvs commit: cocoon-site/src/documentation/content/xdocs/community committer.xml book.xml
crossley 2003/11/17 18:45:06
Modified: src/documentation/content/xdocs site.xml
src/documentation/content/xdocs/community book.xml
Added: src/documentation/content/xdocs/community committer.xml
Log:
Add new document for "Committer tips".
Revision Changes Path
1.15 +1 -0 cocoon-site/src/documentation/content/xdocs/site.xml
Index: site.xml
===================================================================
RCS file: /home/cvs/cocoon-site/src/documentation/content/xdocs/site.xml,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- site.xml 13 Nov 2003 13:50:34 -0000 1.14
+++ site.xml 18 Nov 2003 02:45:06 -0000 1.15
@@ -34,6 +34,7 @@
<wiki label="Wiki docs" href="http://wiki.cocoondev.org/"/>
<members label="Members" href="members.html"/>
<contributing label="Contributing" href="contrib.html"/>
+ <committer-tips label="Committer Tips" href="committer.html"/>
<mail-lists label="Mail Lists" href="mail-lists.html"/>
<mail-archives label="Mail Archives" href="mail-archives.html"/>
</community>
1.2 +2 -1 cocoon-site/src/documentation/content/xdocs/community/book.xml
Index: book.xml
===================================================================
RCS file: /home/cvs/cocoon-site/src/documentation/content/xdocs/community/book.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- book.xml 6 Aug 2003 16:15:00 -0000 1.1
+++ book.xml 18 Nov 2003 02:45:06 -0000 1.2
@@ -12,8 +12,9 @@
<menu label="Community">
<menu-item label="Members" href="members.html"/>
<menu-item label="Contributing" href="contrib.html"/>
+ <menu-item label="Committer Tips" href="committer.html"/>
<menu-item label="Mail Lists" href="mail-lists.html"/>
<menu-item label="Mail Archives" href="mail-archives.html"/>
</menu>
-</book>
\ No newline at end of file
+</book>
1.1 cocoon-site/src/documentation/content/xdocs/community/committer.xml
Index: committer.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.2//EN" "document-v12.dtd">
<document>
<header>
<title>Tips for committers</title>
</header>
<body>
<section id="overview">
<title>Overview</title>
<p>
These are some tips to help committers to keep our CVS clean.
See also
<link href="http://www.apache.org/dev/committers.html">Committers FAQ</link>.
</p>
</section>
<section id="style">
<title>Coding Style Guidelines</title>
<p>
We do not want to get too concerned about style, other than a few
obvious things such as whitespace. Basically just follow the style
that is already used by the files that you are working on.
We loosely follow the Sun Java Style Guide.
</p>
</section>
<section id="whitespace">
<title>Consistent whitespace</title>
<p>
Whitespace can cause big problems with CVS. If it is inconsistent,
then diffs are very hard to follow - actual changes become lost in
the noise of whitespace changes. Some developers use editors that
attempt to automatically format the whitespace. The trouble is
that if CVS files are inconsistent, some of those editors just
make it worse.
</p>
<p>
The solution is that some committers who have a proper editor
should occasionally correct the whitespace across all CVS files,
applying the following rules.
</p>
<p>For all text files:</p>
<ul>
<li>Replace all tabs with spaces.</li>
<li>No trailing whitespace.</li>
<li>No M$-DOS line endings.</li>
<li>Newline at end-of-file.</li>
<li>Single whitespace between words.</li>
</ul>
<p>For all Java source files, as for text files plus:</p>
<ul>
<li>Use 4-space indentation.</li>
</ul>
<p>For all XML source files, as for text files plus:</p>
<ul>
<li>Use 2-space indentation.</li>
<li>No whitespace at start-of-file.</li>
<li>No whitespace at end-of-file (except of course a newline).</li>
</ul>
</section>
<section id="dos2unix">
<title>dos2unix and other control-characters</title>
<p>
If you are on a UNIX system, when you receive a patch from a
contributor on Windows then do a 'dos2unix'. If you are on a
Windows system, then ensure that you have a proper CVS client
(it is supposed to convert to UNIX line-endings when you commit).
</p>
<p>
Here is one way to find files that have DOS line-endings:
<code>find . -type f | xargs grep -l '^M'</code>
(to add the ^M use "Ctrl-v Ctrl-m" at the command-line).
</p>
<p>
Here is one way to find files that have any hidden control
characters:
<code>find . -type f | xargs grep -l '[[:cntrl:]]'</code>
</p>
</section>
</body>
</document>
Re: cvs commit:
cocoon-site/src/documentation/content/xdocs/community committer.xml book.xml
Posted by David Crossley <cr...@indexgeo.com.au>.
Vadim Gritsenko wrote:
> crossley
>
> > Here is one way to find files that have DOS line-endings:
> > <code>find . -type f | xargs grep -l '^M'</code>
> > (to add the ^M use "Ctrl-v Ctrl-m" at the command-line).
> >
> > Here is one way to find files that have any hidden control
> > characters:
> > <code>find . -type f | xargs grep -l '[[:cntrl:]]'</code>
>
> THANK YOU!!! That's the piece of wisdom which I was missing! :-) :-) :-)
So now that your wisdom is complete, where do you evolve to? :-)
I am glad that i could help. It took me a whole day to figure that
all out and test it. There was a stack of textbooks open on my desk
to no avail. Google was running hot and provided the final answers.
--David
Re: cvs commit: cocoon-site/src/documentation/content/xdocs/community
committer.xml book.xml
Posted by Vadim Gritsenko <va...@verizon.net>.
crossley@apache.org wrote:
> Here is one way to find files that have DOS line-endings:
> <code>find . -type f | xargs grep -l '^M'</code>
> (to add the ^M use "Ctrl-v Ctrl-m" at the command-line).
>
>
> Here is one way to find files that have any hidden control
> characters:
> <code>find . -type f | xargs grep -l '[[:cntrl:]]'</code>
>
THANK YOU!!! That's the piece of wisdom which I was missing! :-) :-) :-)
Vadim