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

Re: [bug] backwards compatibility APIs in 1.2 aren't really

From: <kfogel_at_collab.net>
Date: 2005-06-23 20:21:38 CEST

Stephen Davis <subversion@soundgeek.org> writes:
> In 1.2, a bunch of the APIs adopted a peg_revision argument and the
> implementations of the backwards-compatibility code for the 1.1. APIs
> just call the new versions like so:
>
> svn_client_cat( stream, path, revision, context, pool )
> {
> return svn_client_cat2( stream, path, revision, revision,
> context, pool );
> }
>
> [It is not possible to produce a script with the 1.2 client that will
> reproduce the error since this is at the API level so I'll just list
> the appropriate pseudo-steps.]
>
> 1. create a repository
> 2. Add a file to trunk, let's call it test.c (r1)
> 3. Create a branch in branches/broken (r2)
> 4. Modify test.c in the branch (r3)
> 5. Set up and call to svn_client_cat() like so:
> svn_opt_revision rev = { svn_opt_revision_number, { 1 } };
> svn_client_cat( stream, ./test.c, &rev, ctx, pool )
>
> You'll get an error like:
>
> svn: File not found: revision 1, path '/branches/broken/test.c'
>
> What you need to pass in the compatibility wrapper is
> svn_opt_unspecified for the peg_revision argument to svn_client_cat2().
>
> Note that you can reproduce the behavior by doing:
>
> svn cat -r 1 test.c@1
>
> but in this case, that is the correct behavior since that's what you
> explicitly told it. However, it mimics what "svn cat -r 1 test.c"
> would do if it were calling the svn_client_cat() function, not
> svn_client_cat2().
>
> In addition, the 1.2 svn log *command* appears to have this bug too.
>
> svn log -r 1 test.c
>
> svn: File not found: revision 1, path '/branches/broken/test.c'
>
> If you do, "svn log -r 1:BASE test.c" then it works.
>
> Per the issue tracker guidelines, I'm posting this here first but
> it's pretty clear that it's a bug. :-)

Thanks for the investigation. This probably will lead to filing a
bug, and thence quickly to fixing, since it's so simple, but first:

   $ svn info README
   Path: README
   Name: README
   URL: http://svn.collab.net/repos/svn/trunk/README
   Repository Root: http://svn.collab.net/repos/svn
   Repository UUID: 65390229-12b7-0310-b90b-f21a5aa7ec8e
   Revision: 15156
   Node Kind: file
   Schedule: normal
   Last Changed Author: kfogel
   Last Changed Rev: 12812
   Last Changed Date: 2005-01-21 14:33:50 -0600 (Fri, 21 Jan 2005)
   Text Last Updated: 2005-04-01 16:28:41 -0600 (Fri, 01 Apr 2005)
   Properties Last Updated: 2005-04-01 16:28:41 -0600 (Fri, 01 Apr 2005)
   Checksum: ef2f4639c3ebe8c7490ed064a6b11311
   $ svn log -r1 README
   ------------------------------------------------------------------------
   r1 | svn | 2001-08-30 23:24:14 -0500 (Thu, 30 Aug 2001) | 1 line
   
   Initial import.
   ------------------------------------------------------------------------
   $

That's with head of trunk today. I don't have a 1.2 subversion
around, but can you tell us the output of 'svn info test.c' in your
last recipe above?

I've added dev@ to the recipients, by the way. You can take users@
off on your next reply, I just wanted to let people there know that
this had been acknowledged over on dev@.

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Jun 23 21:09:46 2005

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

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