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

Re: [RFE] uuid needed as an automatic property

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: 2007-06-20 20:03:01 CEST

Thomas Swan wrote:
> To track files moving we desperately need to have a uuid or equivalent
> assigned to each object placed into the repository perhaps as a property
> called svn:uuid (suggestion).
>
> Case in point, tracking file movement isn't pretty but it can be managed
> by checking the uuid of the deleted object against the uuid of added
> objects in a post/pre-commit hook. I know other work is going on in
> this area, but this would be a step in the right direction.

A pre- or post-commit hook should be able to use the Subversion APIs
svn_fs_compare_ids() or svn_fs_check_related() in conjunction with the
values returned by svn_fs_node_id() to answer relationship questions like
this today.

/** Get the id of a node.
 *
 * Set @a *id_p to the node revision ID of @a path in @a root, allocated in
 * @a pool.
 *
 * If @a root is the root of a transaction, keep in mind that other
 * changes to the transaction can change which node @a path refers to,
 * and even whether the path exists at all.
 */
svn_error_t *svn_fs_node_id(const svn_fs_id_t **id_p,
                            svn_fs_root_t *root,
                            const char *path,
                            apr_pool_t *pool);

/** Return -1, 0, or 1 if node revisions @a a and @a b are unrelated,
 * equivalent, or otherwise related (respectively).
 */
int svn_fs_compare_ids(const svn_fs_id_t *a, const svn_fs_id_t *b);

-- 
C. Michael Pilato <cmpilato@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

Received on Wed Jun 20 20:03:26 2007

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.