[PATCH 3 of 5 py3 progress] context: add a getfileset() method so fewer things need fileset directly

Augie Fackler raf at durin42.com
Tue Feb 4 14:50:17 CST 2014


# HG changeset patch
# User Augie Fackler <raf at durin42.com>
# Date 1391545669 18000
#      Tue Feb 04 15:27:49 2014 -0500
# Node ID d8f4c1f1953e7eaaf0d03a951be9bb8ca7f34122
# Parent  46037c7c4644ae92e9b9225a0cd91ebfa92dec85
context: add a getfileset() method so fewer things need fileset directly

Allows me to break an import cycle in a subsequent change.

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -12,6 +12,7 @@
 import os, errno, stat
 import obsolete as obsmod
 import repoview
+import fileset
 
 propertycache = util.propertycache
 
@@ -79,6 +80,9 @@
     def mutable(self):
         return self.phase() > phases.public
 
+    def getfileset(self, expr):
+        return fileset.getfileset(self, expr)
+
     def obsolete(self):
         """True if the changeset is obsolete"""
         return self.rev() in obsmod.getrevs(self._repo, 'obsolete')


More information about the Mercurial-devel mailing list