equal
deleted
inserted
replaced
2071 args = getargs(x, 0, 1, _('subrepo takes at most one argument')) |
2071 args = getargs(x, 0, 1, _('subrepo takes at most one argument')) |
2072 pat = None |
2072 pat = None |
2073 if len(args) != 0: |
2073 if len(args) != 0: |
2074 pat = getstring(args[0], _("subrepo requires a pattern")) |
2074 pat = getstring(args[0], _("subrepo requires a pattern")) |
2075 |
2075 |
2076 m = matchmod.exact(repo.root, repo.root, ['.hgsubstate']) |
2076 m = matchmod.exact(['.hgsubstate']) |
2077 |
2077 |
2078 def submatches(names): |
2078 def submatches(names): |
2079 k, p, m = stringutil.stringmatcher(pat) |
2079 k, p, m = stringutil.stringmatcher(pat) |
2080 for name in names: |
2080 for name in names: |
2081 if m(name): |
2081 if m(name): |