comparison mercurial/revset.py @ 42104:4b86f4f199a9

revset: short docstring for checkstatus This is where all the action happens for the status-related revsets, and a little documentation doesn't hurt.
author Jordi Guti?rrez Hermoso <jordigh@octave.org>
date Fri, 05 Apr 2019 14:30:52 -0400
parents cab19d49f8bd
children a0c5e06e9b1a
comparison
equal deleted inserted replaced
42103:362726923ba3 42104:4b86f4f199a9
596 except AttributeError: 596 except AttributeError:
597 raise error.Abort(_("no bundle provided - specify with -R")) 597 raise error.Abort(_("no bundle provided - specify with -R"))
598 return subset & bundlerevs 598 return subset & bundlerevs
599 599
600 def checkstatus(repo, subset, pat, field): 600 def checkstatus(repo, subset, pat, field):
601 """Helper for status-related revsets (adds, removes, modifies).
602 The field parameter says which kind is desired:
603 0: modified
604 1: added
605 2: removed
606 """
601 hasset = matchmod.patkind(pat) == 'set' 607 hasset = matchmod.patkind(pat) == 'set'
602 608
603 mcache = [None] 609 mcache = [None]
604 def matches(x): 610 def matches(x):
605 c = repo[x] 611 c = repo[x]