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