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

Re: Review 1.2 API changes - log --limit

From: Branko ─îibej <brane_at_xbc.nu>
Date: 2004-11-15 00:06:44 CET

Julian Foad wrote:

> Julian Foad wrote:
>
>> # New "limit" argument for "log" command.
>
>
> This seems fine except for two things:
>
> * We really, really should not use "unsigned" in the interface. I
> recommend reverting r11162 which converted various arguments to unsigned.

I disagree. If passing a negative value makes no sense semantically,
then the parameter should be unsigned.

> Just now I tried "svn log --limit=-5" and it listed all revisions.

Then this is a bug in parsing the value of that option. The parser
should reject negative values.

> r11162 did not solve that problem, and indeed it introduced
> signed/unsigned mismatches. Compilers can warn about signed/unsigned
> mismatches, but they are a necessary evil in many places so the
> potential to be warned about them isn't often an actual benefit.

I disagree with this, too. signed/unsigned mismatches can and should be
avoided by careful attention to detail in the implementation. When there
is absolutely no other possible fix (due to defects in other libraries,
not bugs in Subversion), then usually it's possible to find a safe way
to cast the value, and document the reason for the cast.

So I'd suggest that, in maintainer mode, we turn on these warnings where
possible. Note that they're already on by default on Win32.

-- Brane

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Nov 15 00:06:50 2004

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