Patchwork [3,of,6,py3,progress,v2] context: add a getfileset() method so fewer things need fileset directly

login
register
mail settings
Submitter Augie Fackler
Date Feb. 4, 2014, 10:24 p.m.
Message ID <d8f4c1f1953e7eaaf0d0.1391552677@augie-macbookair>
Download mbox | patch
Permalink /patch/3473/
State Accepted
Commit f0137d994c831a9380908dae6a4d50a6df50f001
Headers show

Comments

Augie Fackler - Feb. 4, 2014, 10:24 p.m.
# HG changeset patch
# User Augie Fackler <raf@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.

Patch

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')