[PATCH 1 of 9 paths v2] ui: represents paths as classes
Matt Mackall
mpm at selenic.com
Tue Mar 3 17:29:52 CST 2015
On Sun, 2015-03-01 at 13:50 -0800, Gregory Szorc wrote:
> # HG changeset patch
> # User Gregory Szorc <gregory.szorc at gmail.com>
> # Date 1423341730 28800
> # Sat Feb 07 12:42:10 2015 -0800
> # Node ID c458cf1a414e2d1534841fd55274678e93c8c707
> # Parent 7a21944731557cd18dc5c53969318d80ec547e2d
> ui: represents paths as classes
> -import errno, getpass, os, socket, sys, tempfile, traceback
> +import errno, getpass, os, socket, sys, tempfile, traceback, weakref
Ok, I'm already sad. I'd really like to have fewer weakrefs (read: zero)
in the codebase rather than more. This case seems to be because we defer
loading the paths and thus need the paths object to hold a ui so we can
call ui.configitems.
Could we instead make paths a propertycache value that holds a normal
dict? Or at least a comment explaining why we went with a weakref.
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial-devel
mailing list