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
/** 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,
const char *path,
/** 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 <email@example.com>
CollabNet <> www.collab.net <> Distributed Development On Demand
Received on Wed Jun 20 20:03:26 2007