##// END OF EJS Templates
fileset: allow to specify a basectx for status...
Pierre-Yves David -
r31194:016c63d6 default
parent child Browse files
Show More
@@ -566,17 +566,23 b' def getfileset(ctx, expr):'
566 tree = parse(expr)
566 tree = parse(expr)
567 return getset(fullmatchctx(ctx, _buildstatus(ctx, tree)), tree)
567 return getset(fullmatchctx(ctx, _buildstatus(ctx, tree)), tree)
568
568
569 def _buildstatus(ctx, tree):
569 def _buildstatus(ctx, tree, basectx=None):
570 # do we need status info?
570 # do we need status info?
571
572 # temporaty boolean to simplify the next conditional
573 purewdir = ctx.rev() is None and basectx is None
574
571 if (_intree(_statuscallers, tree) or
575 if (_intree(_statuscallers, tree) or
572 # Using matchctx.existing() on a workingctx requires us to check
576 # Using matchctx.existing() on a workingctx requires us to check
573 # for deleted files.
577 # for deleted files.
574 (ctx.rev() is None and _intree(_existingcallers, tree))):
578 (purewdir and _intree(_existingcallers, tree))):
575 unknown = _intree(['unknown'], tree)
579 unknown = _intree(['unknown'], tree)
576 ignored = _intree(['ignored'], tree)
580 ignored = _intree(['ignored'], tree)
577
581
578 r = ctx.repo()
582 r = ctx.repo()
579 return r.status(ctx.p1(), ctx,
583 if basectx is None:
584 basectx = ctx.p1()
585 return r.status(basectx, ctx,
580 unknown=unknown, ignored=ignored, clean=True)
586 unknown=unknown, ignored=ignored, clean=True)
581 else:
587 else:
582 return None
588 return None
General Comments 0
You need to be logged in to leave comments. Login now