Tags from closed branches?

Greg Ward greg-hg at gerg.ca
Tue Jun 9 10:29:57 CDT 2009


On Tue, Jun 9, 2009 at 11:16 AM, Dirkjan Ochtman<dirkjan at ochtman.nl> wrote:
> So ca8d05e1f1d1 changed the default for repo.heads() to closed=False,
> so that calls to heads() by default will not return closed heads.

That could be a huge performance win in certain cases.  In my case,
I'm looking at a repository converted from CVS with ~140 open heads.
Every operation that needs tags (e.g. "hg tip", "hg parent", "hg log")
takes 9 sec to iterate over all those heads (which is why I'm
interested in tag caching).  If I could close the ~120 old heads that
are no longer relevant, *and* those heads no longer contribute tags,
that could save most of that 9 sec overhead.

> Unfortunately, this also means that any tags from those heads will not
> be considered anymore. That seems inadvertent at best, and may be
> should be reverted. Conceptually, it seems wrong that deleting a
> branch would also delete all the tags from it. I'd like to propose
> this change:

Well, umm, yeah, correct semantics are nice too.  Just thought I'd
point out the presumed performance benefit of the change.  ;-)

Greg


More information about the Mercurial-devel mailing list