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

Re: FW: getting file or directory property/metadata

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Sat, 28 Nov 2015 17:41:23 +0000

[moving to dev@; please drop users@ from replies]

Daniel Shahaf wrote on Sat, Nov 28, 2015 at 17:26:52 +0000:
> To be fair, though, the same trick with 'svn info' would have lead you
> to svn_fs_node_created_rev(), which is documented to return "the
> revision in which @a path under @a root was created", but in fact
> returns the revision in which it was last modified.

I think the first sentence of the following docstring is wrong:

    /** Set @a *revision to the revision in which @a path under @a root was
     * created. Use @a pool for any temporary allocations. @a *revision will
     * be set to #SVN_INVALID_REVNUM for uncommitted nodes (i.e. modified nodes
     * under a transaction root). Note that the root of an unmodified transaction
     * is not itself considered to be modified; in that case, return the revision
     * upon which the transaction was based.
     */
    svn_error_t *
    svn_fs_node_created_rev(svn_revnum_t *revision,

It sounds as though it gives the answer to `svn log --stop-on-copy
--limit=1 -r 0:HEAD path_at_root`, but in fact it gives the "Last Changed
Revision" of path_at_root.

I think we need at least this patch:

    Index: subversion/include/svn_fs.h
    ===================================================================
    --- subversion/include/svn_fs.h (revision 1717002)
    +++ subversion/include/svn_fs.h (working copy)
    @@ -1775,2 +1775,2 @@
    -/** Set @a *revision to the revision in which @a path under @a root was
    - * created. Use @a pool for any temporary allocations. @a *revision will
    +/** Set @a *revision to the revision in which @a path under @a root was last
    + * modified. Use @a pool for any temporary allocations. @a *revision will

I didn't check the sibling functions for analogous docstring bugs.

I can't commit this myself due to an outstanding issue with my apache
account :-(

Cheers,

Daniel
Received on 2015-11-28 18:41:29 CET

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