mercurial/fileset.py
changeset 31254 2140e12d3258
parent 31195 6b098ac4542e
child 31697 992882cef7e1
equal deleted inserted replaced
31253:64596338ba10 31254:2140e12d3258
   439             s.append(f)
   439             s.append(f)
   440     return s
   440     return s
   441 
   441 
   442 @predicate('revs(revs, pattern)')
   442 @predicate('revs(revs, pattern)')
   443 def revs(mctx, x):
   443 def revs(mctx, x):
   444     """``revs(set, revspec)``
   444     """Evaluate set in the specified revisions. If the revset match multiple
   445 
   445     revs, this will return file matching pattern in any of the revision.
   446     Evaluate set in the specified revisions. If the revset match multiple revs,
       
   447     this will return file matching pattern in any of the revision.
       
   448     """
   446     """
   449     # i18n: "revs" is a keyword
   447     # i18n: "revs" is a keyword
   450     r, x = getargs(x, 2, 2, _("revs takes two arguments"))
   448     r, x = getargs(x, 2, 2, _("revs takes two arguments"))
   451     # i18n: "revs" is a keyword
   449     # i18n: "revs" is a keyword
   452     revspec = getstring(r, _("first argument to revs must be a revision"))
   450     revspec = getstring(r, _("first argument to revs must be a revision"))
   463                 result.append(f)
   461                 result.append(f)
   464     return result
   462     return result
   465 
   463 
   466 @predicate('status(base, rev, pattern)')
   464 @predicate('status(base, rev, pattern)')
   467 def status(mctx, x):
   465 def status(mctx, x):
   468     """``status(base, rev, revspec)``
   466     """Evaluate predicate using status change between ``base`` and
   469 
       
   470     Evaluate predicate using status change between ``base`` and
       
   471     ``rev``. Examples:
   467     ``rev``. Examples:
   472 
   468 
   473     - ``status(3, 7, added())`` - matches files added from "3" to "7"
   469     - ``status(3, 7, added())`` - matches files added from "3" to "7"
   474     """
   470     """
   475     repo = mctx.ctx.repo()
   471     repo = mctx.ctx.repo()