mercurial/fileset.py
changeset 22924 325babf1de93
parent 20209 174d9b8baf5d
child 23113 c2dd79ad99cb
equal deleted inserted replaced
22923:9e893247a41c 22924:325babf1de93
   122     """``modified()``
   122     """``modified()``
   123     File that is modified according to status.
   123     File that is modified according to status.
   124     """
   124     """
   125     # i18n: "modified" is a keyword
   125     # i18n: "modified" is a keyword
   126     getargs(x, 0, 0, _("modified takes no arguments"))
   126     getargs(x, 0, 0, _("modified takes no arguments"))
   127     s = mctx.status()[0]
   127     s = mctx.status().modified
   128     return [f for f in mctx.subset if f in s]
   128     return [f for f in mctx.subset if f in s]
   129 
   129 
   130 def added(mctx, x):
   130 def added(mctx, x):
   131     """``added()``
   131     """``added()``
   132     File that is added according to status.
   132     File that is added according to status.
   133     """
   133     """
   134     # i18n: "added" is a keyword
   134     # i18n: "added" is a keyword
   135     getargs(x, 0, 0, _("added takes no arguments"))
   135     getargs(x, 0, 0, _("added takes no arguments"))
   136     s = mctx.status()[1]
   136     s = mctx.status().added
   137     return [f for f in mctx.subset if f in s]
   137     return [f for f in mctx.subset if f in s]
   138 
   138 
   139 def removed(mctx, x):
   139 def removed(mctx, x):
   140     """``removed()``
   140     """``removed()``
   141     File that is removed according to status.
   141     File that is removed according to status.
   142     """
   142     """
   143     # i18n: "removed" is a keyword
   143     # i18n: "removed" is a keyword
   144     getargs(x, 0, 0, _("removed takes no arguments"))
   144     getargs(x, 0, 0, _("removed takes no arguments"))
   145     s = mctx.status()[2]
   145     s = mctx.status().removed
   146     return [f for f in mctx.subset if f in s]
   146     return [f for f in mctx.subset if f in s]
   147 
   147 
   148 def deleted(mctx, x):
   148 def deleted(mctx, x):
   149     """``deleted()``
   149     """``deleted()``
   150     File that is deleted according to status.
   150     File that is deleted according to status.
   151     """
   151     """
   152     # i18n: "deleted" is a keyword
   152     # i18n: "deleted" is a keyword
   153     getargs(x, 0, 0, _("deleted takes no arguments"))
   153     getargs(x, 0, 0, _("deleted takes no arguments"))
   154     s = mctx.status()[3]
   154     s = mctx.status().deleted
   155     return [f for f in mctx.subset if f in s]
   155     return [f for f in mctx.subset if f in s]
   156 
   156 
   157 def unknown(mctx, x):
   157 def unknown(mctx, x):
   158     """``unknown()``
   158     """``unknown()``
   159     File that is unknown according to status. These files will only be
   159     File that is unknown according to status. These files will only be
   160     considered if this predicate is used.
   160     considered if this predicate is used.
   161     """
   161     """
   162     # i18n: "unknown" is a keyword
   162     # i18n: "unknown" is a keyword
   163     getargs(x, 0, 0, _("unknown takes no arguments"))
   163     getargs(x, 0, 0, _("unknown takes no arguments"))
   164     s = mctx.status()[4]
   164     s = mctx.status().unknown
   165     return [f for f in mctx.subset if f in s]
   165     return [f for f in mctx.subset if f in s]
   166 
   166 
   167 def ignored(mctx, x):
   167 def ignored(mctx, x):
   168     """``ignored()``
   168     """``ignored()``
   169     File that is ignored according to status. These files will only be
   169     File that is ignored according to status. These files will only be
   170     considered if this predicate is used.
   170     considered if this predicate is used.
   171     """
   171     """
   172     # i18n: "ignored" is a keyword
   172     # i18n: "ignored" is a keyword
   173     getargs(x, 0, 0, _("ignored takes no arguments"))
   173     getargs(x, 0, 0, _("ignored takes no arguments"))
   174     s = mctx.status()[5]
   174     s = mctx.status().ignored
   175     return [f for f in mctx.subset if f in s]
   175     return [f for f in mctx.subset if f in s]
   176 
   176 
   177 def clean(mctx, x):
   177 def clean(mctx, x):
   178     """``clean()``
   178     """``clean()``
   179     File that is clean according to status.
   179     File that is clean according to status.
   180     """
   180     """
   181     # i18n: "clean" is a keyword
   181     # i18n: "clean" is a keyword
   182     getargs(x, 0, 0, _("clean takes no arguments"))
   182     getargs(x, 0, 0, _("clean takes no arguments"))
   183     s = mctx.status()[6]
   183     s = mctx.status().clean
   184     return [f for f in mctx.subset if f in s]
   184     return [f for f in mctx.subset if f in s]
   185 
   185 
   186 def func(mctx, a, b):
   186 def func(mctx, a, b):
   187     if a[0] == 'symbol' and a[1] in symbols:
   187     if a[0] == 'symbol' and a[1] in symbols:
   188         return symbols[a[1]](mctx, b)
   188         return symbols[a[1]](mctx, b)