Show More
@@ -386,7 +386,7 b' def revs(mctx, x):' | |||
|
386 | 386 | matchers = [] |
|
387 | 387 | for r in revs: |
|
388 | 388 | ctx = repo[r] |
|
389 | mc = mctx.switch(ctx, _buildstatus(ctx.p1(), ctx, x)) | |
|
389 | mc = mctx.switch(ctx.p1(), ctx, _buildstatus(ctx.p1(), ctx, x)) | |
|
390 | 390 | matchers.append(getmatch(mc, x)) |
|
391 | 391 | if not matchers: |
|
392 | 392 | return mctx.never() |
@@ -414,7 +414,7 b' def status(mctx, x):' | |||
|
414 | 414 | if not revspec: |
|
415 | 415 | raise error.ParseError(reverr) |
|
416 | 416 | basectx, ctx = scmutil.revpair(repo, [baserevspec, revspec]) |
|
417 | mc = mctx.switch(ctx, _buildstatus(basectx, ctx, x)) | |
|
417 | mc = mctx.switch(basectx, ctx, _buildstatus(basectx, ctx, x)) | |
|
418 | 418 | return getmatch(mc, x) |
|
419 | 419 | |
|
420 | 420 | @predicate('subrepo([pattern])') |
@@ -454,7 +454,8 b' methods = {' | |||
|
454 | 454 | } |
|
455 | 455 | |
|
456 | 456 | class matchctx(object): |
|
457 | def __init__(self, ctx, status=None, badfn=None): | |
|
457 | def __init__(self, basectx, ctx, status=None, badfn=None): | |
|
458 | self._basectx = basectx | |
|
458 | 459 | self.ctx = ctx |
|
459 | 460 | self._status = status |
|
460 | 461 | self._badfn = badfn |
@@ -513,8 +514,8 b' class matchctx(object):' | |||
|
513 | 514 | return matchmod.nevermatcher(repo.root, repo.getcwd(), |
|
514 | 515 | badfn=self._badfn) |
|
515 | 516 | |
|
516 | def switch(self, ctx, status=None): | |
|
517 | return matchctx(ctx, status, self._badfn) | |
|
517 | def switch(self, basectx, ctx, status=None): | |
|
518 | return matchctx(basectx, ctx, status, self._badfn) | |
|
518 | 519 | |
|
519 | 520 | # filesets using matchctx.switch() |
|
520 | 521 | _switchcallers = [ |
@@ -540,7 +541,8 b' def match(ctx, expr, badfn=None):' | |||
|
540 | 541 | tree = filesetlang.parse(expr) |
|
541 | 542 | tree = filesetlang.analyze(tree) |
|
542 | 543 | tree = filesetlang.optimize(tree) |
|
543 |
mctx = matchctx(ctx, _buildstatus(ctx.p1(), ctx, tree), |
|
|
544 | mctx = matchctx(ctx.p1(), ctx, _buildstatus(ctx.p1(), ctx, tree), | |
|
545 | badfn=badfn) | |
|
544 | 546 | return getmatch(mctx, tree) |
|
545 | 547 | |
|
546 | 548 | def _buildstatus(basectx, ctx, tree): |
General Comments 0
You need to be logged in to leave comments.
Login now