##// END OF EJS Templates
fileset: extract function that builds initial subset from ctx or status...
Yuya Nishihara -
r31189:3c32a3fd default
parent child Browse files
Show More
@@ -514,6 +514,15 b' def _intree(funcs, tree):'
514 return True
514 return True
515 return False
515 return False
516
516
517 def _buildsubset(ctx, status):
518 if status:
519 subset = []
520 for c in status:
521 subset.extend(c)
522 return subset
523 else:
524 return list(ctx.walk(ctx.match([])))
525
517 def getfileset(ctx, expr):
526 def getfileset(ctx, expr):
518 tree = parse(expr)
527 tree = parse(expr)
519
528
@@ -528,13 +537,10 b' def getfileset(ctx, expr):'
528 r = ctx.repo()
537 r = ctx.repo()
529 status = r.status(ctx.p1(), ctx,
538 status = r.status(ctx.p1(), ctx,
530 unknown=unknown, ignored=ignored, clean=True)
539 unknown=unknown, ignored=ignored, clean=True)
531 subset = []
532 for c in status:
533 subset.extend(c)
534 else:
540 else:
535 status = None
541 status = None
536 subset = list(ctx.walk(ctx.match([])))
537
542
543 subset = _buildsubset(ctx, status)
538 return getset(fullmatchctx(ctx, subset, status), tree)
544 return getset(fullmatchctx(ctx, subset, status), tree)
539
545
540 def prettyformat(tree):
546 def prettyformat(tree):
General Comments 0
You need to be logged in to leave comments. Login now