Mercurial > public > mercurial-scm > hg-stable
diff mercurial/debugcommands.py @ 32444:952017471f93
match: implement __repr__() and update users (API)
fsmonitor and debugignore currently access matcher fields that I would
consider implementation details, namely patternspat, includepat, and
excludepat. Let' instead implement __repr__() and have the few users
use that instead.
Marked (API) because the fields can now be None.
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Mon, 22 May 2017 11:08:18 -0700 |
parents | c942c83ac2ec |
children | 08d02c1d7e67 |
line wrap: on
line diff
--- a/mercurial/debugcommands.py Mon May 22 10:41:32 2017 -0700 +++ b/mercurial/debugcommands.py Mon May 22 11:08:18 2017 -0700 @@ -810,11 +810,7 @@ ignore = repo.dirstate._ignore if not files: # Show all the patterns - includepat = getattr(ignore, 'includepat', None) - if includepat is not None: - ui.write("%s\n" % includepat) - else: - raise error.Abort(_("no ignore patterns found")) + ui.write("%s\n" % repr(ignore)) else: for f in files: nf = util.normpath(f)