hglib patch: fetch parents when doing hg log, et al.
alastair at alastairs-place.net
Mon Oct 29 10:52:05 CDT 2012
Please find attached a patch to python-hglib that makes the library fetch parent information automatically. This makes any iteration through the repository from the hglib client a *lot* quicker because it doesn't have to keep asking for the parent information separately.
You can get the new information from the revision tuples by asking for the "parents" property; it's encoded as a list of tuples of type parentinfo, each of which has a rev and node property.
I've also updated changectx to use this source for parent information, with the result that the parents property of a changectx will also be faster.
I was careful to add the new property at the end of the revision tuple, so that existing code that accesses it by index shouldn't be affected.
p.s. I'm not a member of the mercurial-devel mailing list, so any replies will need to be copied to me.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 4174 bytes
Desc: not available
More information about the Mercurial-devel