[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: Bert Huijben <rhuijben_at_sharpsvn.net>
Date: Wed, 15 Apr 2009 17:35:09 +0200

> -----Original Message-----
> From: Edmund Wong [mailto:ed_at_kdtc.net]
> Sent: woensdag 15 april 2009 17:12
> To: dev_at_subversion.tigris.org
> Subject: Re: export of invalid revision (issue #3400)
>
> 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.)

It would be bite sized.. The code to change is just this last block, which
should return an error instead of setting *revnum.

But changing it has a lot of impact on the rest of the code for users who
might expect the current behavior... So everything depends on whether
everyone agrees this is a bug... or not.

        Bert

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1728814
Received on 2009-04-15 17:36:06 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.