[PATCH 8 of 9 V2] repo: move visibleheads and visiblebranchmap logic on repo

Matt Mackall mpm at selenic.com
Sun Jul 15 14:12:32 CDT 2012


On Fri, 2012-07-06 at 19:54 +0200, pierre-yves.david at logilab.fr wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david at ens-lyon.org>
> # Date 1341532735 -7200
> # Node ID a4f7ce4f78987bad5054ca91acd2b614fb982104
> # Parent  6c0a3b9bcb4c319714a0edd07ee99dea4487f3c4
> repo: move visibleheads and visiblebranchmap logic on repo.

I don't like this, sorry. The localrepo class already has way too many
methods and we're trying to limit that. The general rule should now be:
only add new member functions if a) it's needed internal to the class
(and thus can have an underbar) or b) if it's going to have LOTS of
users so that the convenience of doing:

  repo.somemethod(x)

vs

  module.somefunction(repo, x)

actually matters.

I've queued patches 1-7 for default, thanks.

[backlog 61]

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list