Show More
@@ -386,7 +386,8 b' def revs(mctx, x):' | |||||
386 | matchers = [] |
|
386 | matchers = [] | |
387 | for r in revs: |
|
387 | for r in revs: | |
388 | ctx = repo[r] |
|
388 | ctx = repo[r] | |
389 |
m |
|
389 | mc = mctx.switch(ctx, _buildstatus(ctx.p1(), ctx, x)) | |
|
390 | matchers.append(getmatch(mc, x)) | |||
390 | if not matchers: |
|
391 | if not matchers: | |
391 | return mctx.never() |
|
392 | return mctx.never() | |
392 | if len(matchers) == 1: |
|
393 | if len(matchers) == 1: | |
@@ -413,7 +414,8 b' def status(mctx, x):' | |||||
413 | if not revspec: |
|
414 | if not revspec: | |
414 | raise error.ParseError(reverr) |
|
415 | raise error.ParseError(reverr) | |
415 | basectx, ctx = scmutil.revpair(repo, [baserevspec, revspec]) |
|
416 | basectx, ctx = scmutil.revpair(repo, [baserevspec, revspec]) | |
416 |
|
|
417 | mc = mctx.switch(ctx, _buildstatus(basectx, ctx, x)) | |
|
418 | return getmatch(mc, x) | |||
417 |
|
419 | |||
418 | @predicate('subrepo([pattern])') |
|
420 | @predicate('subrepo([pattern])') | |
419 | def subrepo(mctx, x): |
|
421 | def subrepo(mctx, x): | |
@@ -538,18 +540,16 b' def match(ctx, expr, badfn=None):' | |||||
538 | tree = filesetlang.parse(expr) |
|
540 | tree = filesetlang.parse(expr) | |
539 | tree = filesetlang.analyze(tree) |
|
541 | tree = filesetlang.analyze(tree) | |
540 | tree = filesetlang.optimize(tree) |
|
542 | tree = filesetlang.optimize(tree) | |
541 | mctx = matchctx(ctx, _buildstatus(ctx, tree), badfn=badfn) |
|
543 | mctx = matchctx(ctx, _buildstatus(ctx.p1(), ctx, tree), badfn=badfn) | |
542 | return getmatch(mctx, tree) |
|
544 | return getmatch(mctx, tree) | |
543 |
|
545 | |||
544 |
def _buildstatus(ctx, tree |
|
546 | def _buildstatus(basectx, ctx, tree): | |
545 | # do we need status info? |
|
547 | # do we need status info? | |
546 |
|
548 | |||
547 | if _intree(_statuscallers, tree): |
|
549 | if _intree(_statuscallers, tree): | |
548 | unknown = _intree(['unknown'], tree) |
|
550 | unknown = _intree(['unknown'], tree) | |
549 | ignored = _intree(['ignored'], tree) |
|
551 | ignored = _intree(['ignored'], tree) | |
550 |
|
552 | |||
551 | if basectx is None: |
|
|||
552 | basectx = ctx.p1() |
|
|||
553 | return basectx.status(ctx, listunknown=unknown, listignored=ignored, |
|
553 | return basectx.status(ctx, listunknown=unknown, listignored=ignored, | |
554 | listclean=True) |
|
554 | listclean=True) | |
555 | else: |
|
555 | else: |
General Comments 0
You need to be logged in to leave comments.
Login now