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

Re: export of invalid revision (issue #3400)

From: Edmund Wong <ed_at_kdtc.net>
Date: Wed, 15 Apr 2009 23:12:20 +0800

Bert Huijben wrote:

>> I would call these bugs.
>
> Confirmed on svn 1.6.1. Also with svn info.
>
> I'm not sure if I would call it a bug; moving this thread to dev_at_s.t.o for
> further discussion on whether this is a bug or not.

I suppose it depends on one's preference to how to take
that 10000 or whatever number is being used and is way
more than the current revision.

1) Assume the user meant that he/she wanted the latest
    revision but can't be bothered to find it out the
    hard way. (Newbie question: How does one find out
    what the latest revision is, aside for doing a
    'svn update'?)

2) Assume the user didn't know what was going on and
    give him/her an error :

     "You've given me an invalid revision number."

The important issue here is consistency, IMHO. A consistent
behaviour of dealing with invalid (again, depends on
point of view) input will help subversion be more
effective. Just my $0.02.

>
> All these functions use svn_client__ra_session_from_path() to parse the
> revision conversion. This in turn calls svn_client__get_revision_number()
> which has this code fragment:

But what I DO know from this issue and your response to
it is the following:

   1) I still have WAYS to go in figuring this code out.
   2) I was barking up the wrong tree. I was looking at
      the source code under libsvn_client/ and svn/.

> /* Final check -- if our caller provided a youngest revision, and
> the number we wound up with is younger than that revision, we need
> to stick to our caller's idea of "youngest". */
> if (youngest_rev
> && SVN_IS_VALID_REVNUM(*youngest_rev)
> && SVN_IS_VALID_REVNUM(*revnum)
> && (*revnum > *youngest_rev))
> *revnum = *youngest_rev;
>

In any event, *if* it is a bug, would it be considered
a bite-sized one? (This is coming from someone looking
for 'easy' bite-size tasks without being too overwhelmed.
i.e. issue 3342, which I'm still pondering.)

Again, just my humble $0.02.

Edmund

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1728399
Received on 2009-04-15 17:13:43 CEST

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.