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

Re: How to determine ancestry (or lack thereof) between two noderevs?

From: Chia-liang Kao <clkao_at_clkao.org>
Date: 2005-07-29 02:47:05 CEST

LUCAS DE RODRIGO IGNACIO <idelucas <at> typsa.es> writes:
> To spell it out, svn_fs_compare_ids seems to distinguish between
> three "levels of relationship":
> 1) Node IDs are different ("unrelated")
> 2) Node IDs are the same, but copy IDs and/or revision IDs are
> different ("related")
> 3) All three IDs are the same ("same")
> I would need a way to distinguish case 2) between cases where one
> is an ancestor of the other, and cases when they just share a
> common ancestor.
> The only way I can imagine to do this is to repeatedly use
> svn_fs_node_history until I arrive at either a positive
> svn_fs_copied_from result with the other node, or the original
> create. This doesn't look terribly efficient, so I'd like to know
> if there's an alternative. Thanks in advance.

That's probably how you can do it at the moment. The process
should be simlified once the fs_closest_copy API lands. You will
still have to iterate over fs_closest_copy, see if one's ancestors
hit the other node.


To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Jul 29 02:48:45 2005

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.