[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] Extreme pickyness or just subversion coding standards?

From: Erik Huelsmann <e.huelsmann_at_gmx.net>
Date: 2003-12-03 09:01:17 CET

John, Julian,

[ Snip: extreme pickyness? ]
> No way. :-) Something I've come to understand and respect the developer's
> for
> is their extreme consistency and diligence on keeping everything looking
> the
> same. Having worked on projects that were not as stringent, I can
> honestly
> say that it has helped me to get more involved, and to get a better feel
> for
> what's going on, rather than wasting time trying to move past everyone's
> individual coding convention.

Although I was actually asking for an answer like the one above, I committed
the change before the review completed. The code originally used the %n
sprintf format operator. One I didn't know and could not find documentation about
(at first). After finding documentation for sprintf, I felt confident about
the code. Since I had it in my working copy anyway, I thought even if this
type of change generally was considered too picky later on, I had the code
anyway and throwing it away might cause doubling the effort later on. I agree
that when I submit something for review, generally I should wait 24 hours at
least for reactions to come in. ...

> > - SVN_ERR (svn_io_file_write_full (destfile, "K ", 2, NULL, pool));
> > + buf = apr_psprintf (iterpool, "%" APR_SSIZE_T_FMT, keylen);
> > + SVN_ERR (svn_io_file_write_full (destfile,
> > + buf, strlen (buf), NULL,
> > iterpool)); + SVN_ERR (svn_io_file_write_full (destfile, "\n", 1,
> > NULL, iterpool));

> Do we really want to break this up into two seperate writes?

[ snip ]

> buf = apr_psprintf (iterpool, "%" APR_SSIZE_T_FMT "\n", keylen)

In which case we can merge 3 writes into one:
  buf = apr_sprintf (iterpool, "K %" APR_SSIZE_T_FMT "\n", keylen)

Which I think is indeed a good idea.



PS: Julian (and others) most of my changes and work in progress can be
monitored at http://encorps.dnsalias.com/svn-public/patches/

+++ GMX - die erste Adresse für Mail, Message, More +++
Neu: Preissenkung für MMS und FreeMMS! http://www.gmx.net
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Dec 3 09:01:56 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.