mq: use an unfiltered property cache for the queue object
authorPierre-Yves David <pierre-yves.david@ens-lyon.org>
Sun, 14 Jul 2013 17:23:07 +0200
changeset 19395 19622224559b
parent 19394 4da845cd854f
child 19396 afc23eddc324
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.
hgext/mq.py
--- a/hgext/mq.py	Mon Jul 15 15:19:43 2013 -0700
+++ b/hgext/mq.py	Sun Jul 14 17:23:07 2013 +0200
@@ -65,6 +65,7 @@
 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 reposetup(ui, repo):
     class mqrepo(repo.__class__):
-        @util.propertycache
+        @localrepo.unfilteredpropertycache
         def mq(self):
             return queue(self.ui, self.baseui, self.path)