Stephen Lau wrote:
The reason I did it that way was because those functions have to update global variables, and if they print stuff to stdout, then the only way to get at the results is to spawn them in a sub-shell ... which means they can't update the global variables.

I'm not keen on it either - but it was the only way I was able to figure out how to accomplish it.

Hmm. Yeah, you're right about the subshell vs. global variable problem. But I thought that most of the cached data ends up in /tmp instead of globals, so it could still work if output is sent to stdout.

Anyway, if this is working we should proceed with it. If you don't mind, and if I get a chance, I might take a swing at rearranging it.

The hg_revlog function seems to get the log of the entire repository back to the initial rev. Is this necessary? Wouldn't it be better to get the log of recent revs, say from hg_firstout_rev?

That's insufficient, since we need to walk the revlog backwards to determine the parent revlog of the outgoing hg_firstout_rev.

Sure, but how about starting the log from parent(hg_firstout_rev)? I would think the common case would be for there to be far fewer outgoing revs than total revs in the repository. On the other hand if this is fast enough, maybe this optimization isn't necessary.

s'marks
_______________________________________________
tools-discuss mailing list
tools-discuss@opensolaris.org

Reply via email to