##// END OF EJS Templates
fileset: extract function that builds status tuple only if necessary...
Yuya Nishihara -
r31191:3c3ab84e default
parent child Browse files
Show More
@@ -526,7 +526,9 b' def _buildsubset(ctx, status):'
526 526
527 527 def getfileset(ctx, expr):
528 528 tree = parse(expr)
529 return getset(fullmatchctx(ctx, _buildstatus(ctx, tree)), tree)
529 530
531 def _buildstatus(ctx, tree):
530 532 # do we need status info?
531 533 if (_intree(_statuscallers, tree) or
532 534 # Using matchctx.existing() on a workingctx requires us to check
@@ -536,12 +538,10 b' def getfileset(ctx, expr):'
536 538 ignored = _intree(['ignored'], tree)
537 539
538 540 r = ctx.repo()
539 status = r.status(ctx.p1(), ctx,
541 return r.status(ctx.p1(), ctx,
540 542 unknown=unknown, ignored=ignored, clean=True)
541 543 else:
542 status = None
543
544 return getset(fullmatchctx(ctx, status), tree)
544 return None
545 545
546 546 def prettyformat(tree):
547 547 return parser.prettyformat(tree, ('string', 'symbol'))
General Comments 0
You need to be logged in to leave comments. Login now