[tree-conflicts] On calculating youngest common ancestor
From: C. Michael Pilato <cmpilato_at_collab.net>
Date: 2007-11-25 06:38:25 CET
Stephen, Stefan:
The other day we had a conversation that caused me to recommend to you the
Anyway, here's the API:
svn_ra_get_location_segments()
This basically drives a custom callback, feeding it svn_location_segment_t
There's a wrapper around it that de-streamifies it, too:
svn_client__repos_location_segments()
To determine youngest common ancestor between two locations (path@rev) is
1. fetch the location segments for path1@rev1
2. fetch the location segments for path2@rev2
3. compare them -- they are sorted by revision, so starting with
There's even a Python-bindings-based tool in the trunk to play with here.
$ alias get-locations=./tools/examples/get-location-segments.py
A little bit of data crunching shows that /trunk@19523 is the youngest
WARNING: This API can be really slow against pre-1.5 servers due to having
Another method is to call svn_ra_get_logs() on the longest common path of
-- C. Michael Pilato <cmpilato@collab.net> CollabNet <> www.collab.net <> Distributed Development On Demand
|
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.