subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lieven Govaerts <svn...@mobsol.be>
Subject Re: "svnlook pl --revprop" does not work on transactions?
Date Mon, 01 Mar 2010 19:33:08 GMT
On Mon, Mar 1, 2010 at 7:42 PM, C. Michael Pilato <cmpilato@collab.net> wrote:
> C. Michael Pilato wrote:
>> Ryan Schmidt wrote:
>>>> Did I miss something in the original problem description?  Is that precisely
>>>> what is being attempted here and yet it's not working?
>>> That is my understanding:
>>>
>>> On Fri, 2010-02-26 at 22:15 -0800, Alexey Neyman wrote:
>>>> 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'
>>> I can replicate this error message with svn 1.6.9 on Mac OS X. "svnlook
>>> pl -t" works fine, but "svnlook pl --revprop -t" complains that revision number
>>> '-1' is invalid, though I specified a correct in-progress transaction number.
>>
>> Okay -- sorry for the noise, then.  That was my fault for not parsing the
>> conversation correctly.
>>
>> Yes, this I believe this is a bug.  (I'll even grant that using an option
>> named "--revprops" does nothing for the illusion that revisions aren't
>> really just "special transactions".)
>
> I think the attached patch fixes this, and I plan to commit as much after
> some more testing.
>
> --
> C. Michael Pilato <cmpilato@collab.net>
> CollabNet   <>   www.collab.net   <>   Distributed Development On Demand
>
> * subversion/svnlook/main.c
>  (do_plist): Correctly handle invocations of 'svnlook plist --revprop' when
>    used with '-t TXN_NAME' instead of '-r REV'.
>
> Reported by: Alexey Neyman <stilor{_AT_}att.net>
> --This line, and those below, will be ignored--
>
> Index: subversion/svnlook/main.c
> ===================================================================
> --- subversion/svnlook/main.c   (revision 916775)
> +++ subversion/svnlook/main.c   (working copy)
> @@ -1685,11 +1685,16 @@
>       SVN_ERR(verify_path(&kind, root, path, pool));
>       SVN_ERR(svn_fs_node_proplist(&props, root, path, pool));
>     }
> -  else
> +  else if (c->is_revision)
>     {
>       SVN_ERR(svn_fs_revision_proplist(&props, c->fs, c->rev_id, pool));
>       revprop = TRUE;
>     }
> +  else
> +    {
> +      SVN_ERR(svn_fs_txn_proplist(&props, c->txn, pool));
> +      revprop = TRUE;
> +    }
>
>   if (xml)
>     {
> @@ -1703,8 +1708,16 @@
>       if (revprop)
>         {
>           /* "<revprops ...>" */
> -          svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "revprops",
> -                                "rev", revstr, NULL);
> +          if (c->is_revision)
> +            {
> +              svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "revprops",
> +                                    "rev", revstr, NULL);
> +            }
> +          else
> +            {
> +              svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "revprops",
> +                                    "txn", c->txn_name, NULL);
> +            }
>         }
He, thanks for also fixing the XML part. I was in fact, working on a
regression test, as none of the svnlook options seem to be tested on
transactions.

I'll commit the test when I'm finished and add it to your backport proposal.

Lieven

Mime
View raw message