equal
deleted
inserted
replaced
249 |
249 |
250 def hgignore(mctx, x): |
250 def hgignore(mctx, x): |
251 """``hgignore()`` |
251 """``hgignore()`` |
252 File that matches the active .hgignore pattern. |
252 File that matches the active .hgignore pattern. |
253 """ |
253 """ |
|
254 # i18n: "hgignore" is a keyword |
254 getargs(x, 0, 0, _("hgignore takes no arguments")) |
255 getargs(x, 0, 0, _("hgignore takes no arguments")) |
255 ignore = mctx.ctx._repo.dirstate._ignore |
256 ignore = mctx.ctx._repo.dirstate._ignore |
256 return [f for f in mctx.subset if ignore(f)] |
257 return [f for f in mctx.subset if ignore(f)] |
257 |
258 |
258 def grep(mctx, x): |
259 def grep(mctx, x): |
386 # i18n: "subrepo" is a keyword |
387 # i18n: "subrepo" is a keyword |
387 getargs(x, 0, 1, _("subrepo takes at most one argument")) |
388 getargs(x, 0, 1, _("subrepo takes at most one argument")) |
388 ctx = mctx.ctx |
389 ctx = mctx.ctx |
389 sstate = sorted(ctx.substate) |
390 sstate = sorted(ctx.substate) |
390 if x: |
391 if x: |
|
392 # i18n: "subrepo" is a keyword |
391 pat = getstring(x, _("subrepo requires a pattern or no arguments")) |
393 pat = getstring(x, _("subrepo requires a pattern or no arguments")) |
392 |
394 |
393 import match as matchmod # avoid circular import issues |
395 import match as matchmod # avoid circular import issues |
394 fast = not matchmod.patkind(pat) |
396 fast = not matchmod.patkind(pat) |
395 if fast: |
397 if fast: |