[PATCH] context: use common __repr__() implementation for all classes
Matt Mackall
mpm at selenic.com
Wed Jul 22 02:04:55 UTC 2009
On Tue, 2009-07-21 at 14:29 -0400, Greg Ward wrote:
> # HG changeset patch
> # User Greg Ward <greg-hg at gerg.ca>
> # Date 1248200963 14400
> # Node ID 4a01bd7064a1a7a3e8e33631f0ab9aec745775db
> # Parent 0de7cf8db5fdde298d314225432a07e32bb16dfb
> context: use common __repr__() implementation for all classes.
>
> Before this, subclasses used their parent's __repr__(), which had
> hardcoded class names. That made repr() of a workingctx object
> indistinguishable from repr() of a changectx.
Let's use inheritance here?
If we can't have everything inherit from context easily, then just add a
new base class.
--
http://selenic.com : development and support for Mercurial and Linux
More information about the Mercurial-devel
mailing list