[PATCH 2 of 3] context: introduce the nullsub() method

Matt Harbison mharbison at attotech.com
Wed Jun 3 14:11:56 CDT 2015


# HG changeset patch
# User Matt Harbison <matt_harbison at yahoo.com>
# Date 1433353887 14400
#      Wed Jun 03 13:51:27 2015 -0400
# Node ID fd43ce4eae10475c84f8de2af8786cd5ebe88164
# Parent  62e009c94b8ab987a7fb3b3fb6d328cf309067fc
context: introduce the nullsub() method

Ultimately, this will be used by scmutil.  The subrepo module already imports
it, so it can't import the subrepo module to access the underlying method.

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -251,6 +251,9 @@ class basectx(object):
     def sub(self, path):
         return subrepo.subrepo(self, path)
 
+    def nullsub(self, path, pctx):
+        return subrepo.nullsubrepo(self, path, pctx)
+
     def match(self, pats=[], include=None, exclude=None, default='glob',
               listsubrepos=False):
         r = self._repo


More information about the Mercurial-devel mailing list