# HG changeset patch # User Pierre-Yves David # Date 2013-07-14 15:23:07 # Node ID 19622224559bc68fb6b32b1cc0d5920aa77b4c40 # Parent 4da845cd854f12c03509cd875990b5aef82a4820 mq: use an unfiltered property cache for the queue object The same `queue` object should be used in all situations. This allows to store global states on the object (like the reworked shelve extension plans to). The queue object does not need to be distinct for all possible views (no reference to the repo/view used at creation time) it's even a bit surprising that mq still works with the current code. diff --git a/hgext/mq.py b/hgext/mq.py --- a/hgext/mq.py +++ b/hgext/mq.py @@ -65,6 +65,7 @@ from mercurial.lock import release from mercurial import commands, cmdutil, hg, scmutil, util, revset from mercurial import repair, extensions, error, phases from mercurial import patch as patchmod +from mercurial import localrepo import os, re, errno, shutil commands.norepo += " qclone" @@ -3410,7 +3411,7 @@ def mqphasedefaults(repo, roots): def reposetup(ui, repo): class mqrepo(repo.__class__): - @util.propertycache + @localrepo.unfilteredpropertycache def mq(self): return queue(self.ui, self.baseui, self.path)