You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Alexey Neyman <st...@att.net> on 2010/02/27 02:25:11 UTC

"svnlook pl --revprop" does not work on transactions?

Hi all,

It seems that I encountered a bug in 'svnlook pl --revprop': it fails with 
the following message:

$ svnlook pl --revprop -t 10547-86b /svn/test-svn
svnlook: Invalid revision number '-1'

Observed with Subversion 1.6.6. Looks like offending code is this block in 
do_plist():

==============================
  if (path != NULL)
    ...
  else
    {
      SVN_ERR(svn_fs_revision_proplist(&props, c->fs, c->rev_id, pool));
      revprop = TRUE;
    }
==============================

Note that it always uses svn_fs_revision_proplist(), even when '-t TXN' is 
passed. In this case, c->rev_id == SVN_INVALID_REVNUM (-1), and 
svn_fs_revision_proplist() rightfully fails.

Shouldn't it be using svn_fs_txn_proplist() instead, just as 
get_property() chooses between svn_fs_txn_prop() and 
svn_fs_revision_prop()?

This conditional is still in /trunk, so most likely, bug is also 
reproducible with top-of-trunk Subversion.

Regards,
Alexey.

Re: "svnlook pl --revprop" does not work on transactions?

Posted by Alexey Neyman <st...@att.net>.
On Saturday 27 February 2010 11:35:24 am Lieven Govaerts wrote:
> > Note that it always uses svn_fs_revision_proplist(), even when '-t TXN'
> > is passed. In this case, c->rev_id == SVN_INVALID_REVNUM (-1), and
> > svn_fs_revision_proplist() rightfully fails.
> >
> > Shouldn't it be using svn_fs_txn_proplist() instead, just as
> > get_property() chooses between svn_fs_txn_prop() and
> > svn_fs_revision_prop()?
> 
> Think so. Do you want to submit a patch to fix this issue?

Sure, attached.

Alexey.

Re: "svnlook pl --revprop" does not work on transactions?

Posted by Lieven Govaerts <sv...@mobsol.be>.
On Sat, Feb 27, 2010 at 3:25 AM, Alexey Neyman <st...@att.net> wrote:
> Hi all,
>
> It seems that I encountered a bug in 'svnlook pl --revprop': it fails with
> the following message:
>
> $ svnlook pl --revprop -t 10547-86b /svn/test-svn
> svnlook: Invalid revision number '-1'

Reproducible with trunk@911289.

>
> Observed with Subversion 1.6.6. Looks like offending code is this block in
> do_plist():
>
> ==============================
>  if (path != NULL)
>    ...
>  else
>    {
>      SVN_ERR(svn_fs_revision_proplist(&props, c->fs, c->rev_id, pool));
>      revprop = TRUE;
>    }
> ==============================
>
> Note that it always uses svn_fs_revision_proplist(), even when '-t TXN' is
> passed. In this case, c->rev_id == SVN_INVALID_REVNUM (-1), and
> svn_fs_revision_proplist() rightfully fails.
>
> Shouldn't it be using svn_fs_txn_proplist() instead, just as
> get_property() chooses between svn_fs_txn_prop() and
> svn_fs_revision_prop()?

Think so. Do you want to submit a patch to fix this issue?

Lieven