Mercurial > hg
changeset 21481:2f1567ef70ba
basectx: add _matchstatus method for factoring out last of parentworking logic
This patch paves the way to allow a workingctx to override the match object
with a custom 'bad' method for cases where status is sent a directory pattern.
author | Sean Farley <sean.michael.farley@gmail.com> |
---|---|
date | Wed, 23 Apr 2014 15:39:30 -0500 |
parents | d19f491e5d5b |
children | 869a28d016e9 |
files | mercurial/context.py |
diffstat | 1 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/context.py Thu Apr 24 08:34:44 2014 -0500 +++ b/mercurial/context.py Wed Apr 23 15:39:30 2014 -0500 @@ -78,6 +78,15 @@ del mf[fn] return mf + def _matchstatus(self, other, s, match, listignored, listclean, + listunknown): + """return match.always if match is none + + This internal method provides a way for child objects to override the + match operator. + """ + return match or matchmod.always(self._repo.root, self._repo.getcwd()) + def _prestatus(self, other, s, match, listignored, listclean, listunknown): """provide a hook to allow child objects to preprocess status results