From patchwork Thu May 15 21:16:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [17, of, 19] basectx: add _matchstatus method for factoring out last of parentworking logic From: Sean Farley X-Patchwork-Id: 4776 Message-Id: <0770226fad0f8961a755.1400188595@laptop.local> To: mercurial-devel@selenic.com Date: Thu, 15 May 2014 16:16:35 -0500 # HG changeset patch # User Sean Farley # Date 1398285570 18000 # Wed Apr 23 15:39:30 2014 -0500 # Node ID 0770226fad0f8961a755cb516c9e0604c7a4209a # Parent 5e4e31f7dca07c7883f01e339e1365c882e5d213 basectx: add _matchstatus method for factoring out last of parentworking logic diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -70,10 +70,15 @@ class basectx(object): for fn in mf.keys(): if not match(fn): del mf[fn] return mf + def _matchstatus(self, other, s, match, listignored, listclean, + listunknown): + """return match.always if match is none -- internal use only""" + return match or matchmod.always(self._repo.root, self._repo.getcwd()) + def _prestatus(self, other, s, match, listignored, listclean, listunknown): return s def _poststatus(self, other, s, match, listignored, listclean, listunknown): return s