Help with extension writing
bboissin at gmail.com
Wed May 5 04:48:07 CDT 2010
On Thu, Apr 15, 2010 at 8:32 AM, Dirkjan Ochtman <dirkjan at ochtman.nl> wrote:
> On Thu, Apr 15, 2010 at 03:28, Greg Ward <greg-hg at gerg.ca> wrote:
>>> One last question: Sometimes when a file has 2 parents, we may want to find
>>> the closest changectx mergepoint for the 2 ancestor revisions (I guess there
>>> could be more than one, but there would be 1 that is closer or as close as
>>> the others) - like changectx.ancestor(self, c2), but for descendants - there
>>> doesn't appear to be one on changectx, is there something like this
>> Doesn't the linkrev of the parent file revs give what you want? If
>> memory serves, filectx.parents() returns 1 or 2 other filectxs, each
>> of which has a linkrev(). I believe linkrev() is a revnum in the
>> changelog. I think that is as close as you're going to get. If not,
>> can you show us a cooked example where that doesn't work?
> It sounds like he's trying to get the common descendant for two
> divergent filerevs.
> I don't know about any API we have for that, but maybe someone else
> (Benoit) does?
I missed this thread, you should have cc'ed me.
No there is no API to get the common descendant, maybe for discovery
we'll grow a more "abstract" DAG library (could be useful for relink
More information about the Mercurial-devel