equal
deleted
inserted
replaced
526 Revision contains a file matching pattern. See :hg:`help patterns` |
526 Revision contains a file matching pattern. See :hg:`help patterns` |
527 for information about file patterns. |
527 for information about file patterns. |
528 """ |
528 """ |
529 # i18n: "contains" is a keyword |
529 # i18n: "contains" is a keyword |
530 pat = getstring(x, _("contains requires a pattern")) |
530 pat = getstring(x, _("contains requires a pattern")) |
531 m = None |
|
532 s = [] |
531 s = [] |
533 if not matchmod.patkind(pat): |
532 if not matchmod.patkind(pat): |
534 for r in subset: |
533 for r in subset: |
535 if pat in repo[r]: |
534 if pat in repo[r]: |
536 s.append(r) |
535 s.append(r) |
537 else: |
536 else: |
|
537 m = None |
538 for r in subset: |
538 for r in subset: |
539 c = repo[r] |
539 c = repo[r] |
540 if not m or matchmod.patkind(pat) == 'set': |
540 if not m or matchmod.patkind(pat) == 'set': |
541 m = matchmod.match(repo.root, repo.getcwd(), [pat], ctx=c) |
541 m = matchmod.match(repo.root, repo.getcwd(), [pat], ctx=c) |
542 for f in c.manifest(): |
542 for f in c.manifest(): |