Show More
@@ -558,18 +558,12 def expandpats(pats): | |||||
558 | ret.append(p) |
|
558 | ret.append(p) | |
559 | return ret |
|
559 | return ret | |
560 |
|
560 | |||
561 |
def match(ctx |
|
561 | def match(ctx, pats=[], opts={}, globbed=False, default='relpath'): | |
562 | if pats == ("",): |
|
562 | if pats == ("",): | |
563 | pats = [] |
|
563 | pats = [] | |
564 | if not globbed and default == 'relpath': |
|
564 | if not globbed and default == 'relpath': | |
565 | pats = expandpats(pats or []) |
|
565 | pats = expandpats(pats or []) | |
566 |
|
566 | |||
567 | if hasattr(ctxorrepo, 'match'): |
|
|||
568 | ctx = ctxorrepo |
|
|||
569 | else: |
|
|||
570 | # will eventually abort here |
|
|||
571 | ctx = ctxorrepo[None] |
|
|||
572 |
|
||||
573 | m = ctx.match(pats, opts.get('include'), opts.get('exclude'), |
|
567 | m = ctx.match(pats, opts.get('include'), opts.get('exclude'), | |
574 | default) |
|
568 | default) | |
575 | def badfn(f, msg): |
|
569 | def badfn(f, msg): |
General Comments 0
You need to be logged in to leave comments.
Login now