API question: ancestors of B that are not ancestors of A

Greg Ward greg-hg at gerg.ca
Wed Dec 9 15:41:02 CST 2009


On Wed, Dec 9, 2009 at 4:18 PM, Steve Losh <steve at stevelosh.com> wrote:
> Would "hg log --template '{rev}\n' --rev B:0 --follow --prune A" do what you
> need?

Yes, that seems to work.  I didn't know you could do that with --follow.  Huh.

But 1) I'm working in Python, not shell, so it's easier to make calls
to the Mercurial API and 2) my repository has 104,000 changesets, so
"--rev B:0" takes a while (~60 sec without --follow, ~130 sec with
--follow).  If A and B are only 100 changesets "apart" (whatever that
means), I don't want to visit 104,000 changesets to find those 100.

Greg


More information about the Mercurial-devel mailing list